Hi All, I am having a system which receive data from around 30K gps . Each unit will be inserting concurrently around 1 minute. 1.What tweak should I add to cater for this? I target my ram to be 48Gb with 24 cpus. 2. Once the data grow should I do partition or leave it . I am worried as the data grow the insert will be slow? 3. What should I anticipate and handling for heavy traffic? 4. I plan to have replication data so that the reading can be done from the slave? But what I am worried …

Member Avatar
Member Avatar
+0 forum 36

I have the following socket connection codes. Where for every connection is one new thread. After receiving the data which is done via the producer then I put into a queue for next database processor which is the consumer. This works fine but the moment the queue gets build up it can hang or even take even hours to clear cause is like so many producers and just one single consumer. I am thinking is it possible for me to have one consumer handles one producer meaning each message goes into its own queue gets process and that it. What …

Member Avatar
Member Avatar
+0 forum 1

I have done a socket programming using bonecp as the database pooling for mysql. Suddenly I notice a lot of socket connection made but then after a few hours I got too many open files. I have set the timeout but somehow it did not timeout I don't know why. Why did the timeout did not trigger or worked in this scenario? I need to know is this due to database pooling or socket problem? Below is snippet of my code. In my code I notice in the logs the connection is made and stops at this line- System.out.println("\n\n Trying …

Member Avatar
Member Avatar
+0 forum 2

Dear All, I am looking for a tool which can help me generate reports and multiple types of charts. Can any one recommend based on their experience? I would like to manage to export minimal to excel and pdf too. I have seen one the php report maker unfortunately it does not have the pdf export functionality.

Member Avatar
Member Avatar
+0 forum 11

I have the following snippet of codes first each of the thread is a socket waitign for connection where its gets a connection does all he necessary. Thereafter another section in the run it does this //run a new db connection and does a select where all those have not been updated will be send to webservice and later update their status. The weird part I notice at times this section is ran twice? Could it be the previous thread was not closed? public void run() { try{ //socket connection codes which does all the necessary and finally close the …

Member Avatar
Member Avatar
+0 forum 1

I am working on a small as2 message passing. Below are my codes. First is the host which will send the header and data to the server. Then the server is suppose to form a reply in this format http://www.edidev.net/edidev-ca/help/Using/Using_AS2/Using_MDN/MDNRequestFromAs2SubjMsg.htm <?php $header = "HTTP/1.0\r\n"; $header.= "CONNECTION: Keep-Alive \r\n\r\n"; // Here is the data we will be sending to the service $some_data = array( 'message' =>'Test1', 'name' => 'Chad' ); $curl = curl_init(); // You can also set the URL you want to communicate with by doing this: // $curl = curl_init('http://localhost/echoservice'); // We POST the data curl_setopt($curl, CURLOPT_POST, 1); // …

Member Avatar
+0 forum 0

I have a very simple php curl application where below is my codes I used to send header and body to server. <?php $xml_data = "<Request><NewOrder>"; $URL = "http://localhost/rece1.php"; $header =""; // Build header as array for cURL option $header = "HTTP/1.0\r\n"; $header.= "MIME-Version: 1.0\r\n"; //$header.= "Content-type: application/PTI46\r\n"; $header.= "Content-length: ".strlen($xml_data)."\r\n"; $header.= "Content-transfer-encoding: text\r\n"; $header.= "Request-number: 1\r\n"; $header.= "Document-type: Request\r\n"; $header.= "Interface-Version: Test 1.4\r\n"; $header.= "Connection: close \r\n\r\n"; $header.= $xml_data; // Define cURL options, then connect to server while saving response $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$URL); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FRESH_CONNECT, TRUE); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, …

Member Avatar
+0 forum 0

Hi, Currently we have legacy system which is build purely using java and runs on jboss. We notice its using a lot of jms and also httpurl connectivity to pass on files. The system basically supports rossetta net framework where it allows file transfers between trading partners. We notice with the currenty technology we can build the all front end interface and run fully on apache httpd server and leave the back end running on java which deals on http connectivity. Is this the right move for us to proceed or stay put with jboss ?

Member Avatar
Member Avatar
+0 forum 2

I have googling a lot about this debate to move from table to div. What are your advices here to move or not. I have below my codes building layout using div. The issue I find with div for example below codes which I am referring to a template . MY issue is that on different resolution it looks different there is not like fix size. For eg. in some resolution its just nice and some it shrink. What is the best solution to ensure it stay in every resolution which I know if I would go back to table …

Member Avatar
Member Avatar
+1 forum 6

Dear All, I have a c# application where on normal I used a paper size fixed that is half letter(8.5 X 5.5). The problem now I want to design for a new paper size A4 but when I choose print it keep coming in the 8.5 by 5.5 size. Any solution? Thank you.

Member Avatar
Member Avatar
+0 forum 1

I am linking to a webservice all works fine. Below is my codes. private static void printSOAPResponse(SOAPMessage soapResponse) throws Exception { TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); Source sourceContent = soapResponse.getSOAPPart().getContent(); System.out.print("\nResponse SOAP Message = \n"); StreamResult result = new StreamResult(System.out); transformer.transform(sourceContent, result); } I am not too sure of the transformerfactory. What I need to do now is to traverse through the results and look for below tag. <Table diffgr:id="Table1" > and there after there will be few tags in it for e.g. <rID>1212</rID> <sNo>15677</sNo> So what is the best way as some require to covert it …

Member Avatar
Member Avatar
+0 forum 1

I have a webservice to be accessed which is based on request and response. Below is how my php codes are works perfectly fine. class fNewRequest { function fNewReq($pTK, $pVID) { $this->pTK= $pTK; $this->pVID= $pVID; } } /* Initialize webservice with your WSDL */ $client = new SoapClient("http://**.**.**.*/**/**/***/webservice.asmx?WSDL"); /* Set your parameters for the request */ $params = array( "pTK" => "asa", "pVID" => "1134", ); /* Invoke webservice method with your parameters, in this case: Function1 */ $response = $client->__soapCall("fNewRequests", array($params)); /* Print webservice response */ var_dump($response); print_r($params); I am now trying to do the same via java. Below …

Member Avatar
+0 forum 0

I have UDP socket as below. I need to send back data to the client. I tried to capture both the ip and port but it shows me as Port is : -1 and InetAddress : null. What can I do to rectify on this? class ReceiverThread implements Runnable { private DatagramSocket receivedSocketConn1; ReceiverThread(DatagramSocket receivedSocketConn1) { System.out.println("Thread Received"); this.receivedSocketConn1=receivedSocketConn1; } public void run(){ while (true){ try{ InetAddress IPAddress = receivedSocketConn1.getInetAddress(); int port = receivedSocketConn1.getPort(); final byte[] buffer = new byte[1024]; final DatagramPacket receivePacket = new DatagramPacket(buffer, buffer.length); receivedSocketConn1.receive(receivePacket); String sentence = new String( receivePacket.getData()); System.out.println("RECEIVED: " + sentence); byte[] sendData …

Member Avatar
Member Avatar
+0 forum 3

I am going to develop a web based point of sales system. It is going to be based on linux and php. Users will access it via internet and using browser as the tool. Problem is if the web server is down? The user want to be still able to do their business locally and update the central database once the web server is up? What best solution can I do here? So is web the right way to go or should I just build some windows based application.

Member Avatar
Member Avatar
+0 forum 6

I have a char all[1500]; which will store each network packet. I will convert the hex value into humand readable. Finally I need to extract the url. For e.g. I have this GET /mail/ HTTP/1.1\r\n. I know I can use first to decide if the word GET and HTTP/1.1. exist using this. So I am stuck how to extract the word say in given example "/mail/" ? char *getPointer = strstr (all, "GET"); char *httpPointer = strstr (all, "HTTP/1."); if (strstr (all, "GET") !==NULL && strstr (all, "HTTP/1."))

Member Avatar
Member Avatar
+0 forum 12

We have a socket application with lots of queries in it. The problem after doing some sample of jmap -histo we notice the number of sockets keep growing and resultsets fluctuates. Checked through and ensure all the resultset are closed and finally even the socket is close just based on closing the outputsream as suggested here http://stackoverflow.com/questions/3428127/what-is-the-difference-between-closing-input-outputstream-and-closing-socket-dir. Below is snippet of my codes. What worries is in my full application the socket number have reached cross 8000 and not droppping at all. BoneCP connectionPool = null; class ConnectionHandler implements Runnable { private Socket receivedSocketConn1; ConnectionHandler(Socket receivedSocketConn1) { this.receivedSocketConn1=receivedSocketConn1; } Connection …

Member Avatar
Member Avatar
+0 forum 25

I have my codes working where I got separate date and time columns. I would like to add one more column which have both date and time in. For the existing codes this how I did sprintf(all,'%02d:%02d:%02d.%06u%03u',CURDATE(),s / 3600, (s % 3600) / 60, s % 60, usec, nsec) I tried this does not work and got error too many argument for format and also format expect type inta but argument has 16 has type achar *a sprintf(all,'%02d:%02d:%02d.%06u%03u',CURDATE(),'CURDATE() %02d:%02d:%02d.%06u%03u',s / 3600, (s % 3600) / 60, s % 60, usec, nsec,s / 3600, (s % 3600) / 60, s % …

Member Avatar
Member Avatar
+0 forum 4

I have been taking few different heap snapshots. What I see is that the memory usage is not the same as reported by this codes. So how to know the exact memory is being used by my java application. I also see my leak report from MAT reports a lot of finalize stuff is that any thing danger there. Runtime runtime = Runtime.getRuntime(); // Run the garbage collector //runtime.gc(); // Calculate the used memory long memory = runtime.totalMemory() - runtime.freeMemory(); System.out.println("\n\nUsed memory is bytes: " + memory); //Print the jvm heap size. long heapSize = runtime.totalMemory(); System.out.println("\n\nHeap Size = " …

Member Avatar
Member Avatar
+0 forum 8

Dear All, I have 2 tables one tblAssociate and tblData. The link between them is one to many. My search will be based on date time range where if I find even one data in tblData between the set range then I want to show the tblAssociate data. So I have build this query but the problem it takes more then 20 seconds at time. Any idea how to improve this query? SELECT tblLocationFrom.geoFenceName As locationFrom, tblLocationTo.geoFenceName As locationTo, tblAssociate.associateID, CAST(DATE_ADD(tblAssociate.dateTimeStartJourney, INTERVAL '+08:00' HOUR_MINUTE) AS CHAR) As dateTimeStartJourney, CAST(DATE_ADD(tblAssociate.dateTimeEndJourney, INTERVAL '+08:00' HOUR_MINUTE) AS CHAR) As dateTimeEndJourney, tblAssociate.totalC, tblAssociate.totalD, tblAssociate.totalE, tblAssociate.totalP, …

Member Avatar
Member Avatar
+0 forum 5

We are able to capture the whole packet hex values. The issue now from the hex values we want to dissect the level 3 protocol, application level protocol and also if the url value is present in the packet. How best to achieve this in C?

Member Avatar
Member Avatar
+0 forum 74

I am trying to install ossec on a centos 6.4 machine but only repo which have .rpm file are from atomicrepo but then installing it require to upgrade my mysql I am reluctant to do it so I have used mock to rebuild and manage to yum install later from the build folder. My concern is that any security issue with regards to this issue or any other known issue and also how much extra space will this take?

Member Avatar
Member Avatar
+0 forum 5

Hi All,We have a java application which does deal with lots of insert,update and select statement.We are using bonecp. So we took some sample heap and analyse it with MAT and its pointing to jdbc leaking. Thus we went into the codes and ensure that all resultset,statement and connection are closed accordingly. Below is the sample of the donimator tree which is pointing to lots of java.util.HashMap. What could help to exactly the identify the correct problem? Class Name | Shallow Heap | Retained Heap | Percentage -------------------------------------------------------------------------------------------------------------------------------- | | | com.mysql.jdbc.JDBC4Connection @ 0xf016d728 | 1,120 | 1,467,296 | 6.22% …

Member Avatar
Member Avatar
+0 forum 33

We have socket application which sends out quite a number of email out. So we decided to send huge number message into it which will trigger emails. Eventually we see the email are taking hours before it reach any of the inboxes either gmail,hotmail or yahoo etc. We have this codes in the begining. public class commuSe { BoneCP connectionPool = null; class ConnectionHandler implements Runnable { private Socket receivedSocketConn1; ConnectionHandler(Socket receivedSocketConn1) { this.receivedSocketConn1=receivedSocketConn1; } public void run() { ..... } void sendClientEmail(String emailMessageString) { try { Properties props = new Properties(); props.put("mail.smtp.host", "**********"); props.put("mail.smtp.socketFactory.port", "******"); //props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.port", …

Member Avatar
+0 forum 0

We have a packet capture function which is as below. The issue now each of the hex value of packet I read and concat into a char *hex2Value using this code below. I would like to know is this the most efficienct method to concat all into one single string ? Secondly now this one long string I want to reach each 2 value into isprint function to print the readable character how best to do this? char *hex2Value=""; while(*p) { //printf("\n\nstr: %s\n", p); asprintf(&hexValue,"%s%02x",hex2Value,p); //asprintf(&hexValue,"%s%02x",hexValue,p); p++; } void dummyProcesssPacket(const struct pfring_pkthdr *h, const u_char *p, const u_char *user_bytes) { …

Member Avatar
Member Avatar
+0 forum 6

We have a java application running on Centos 6.4 what we notice is that the RES is around 370m which is more then the allocated max that is 256m. Does this signify that we the application is leaking? But overall the jstat gcutil does not show any FGC but quite a number of young GC. So this is a normal scenario in Centos with regards to its memory management or something to worry here? Any good tools in Centos other then top to diagnose this?

Member Avatar
+0 forum 0

Dear All, I am trying to install pf_ring on centos 6 using its user guide. I am stuck at page 10 for this command [ICODE]$ cd <PF_RING PATH>/userland/lib $ ./configure $ make[/ICODE] I get this error [CODE] make ar x libs/libpfring_dna_x86_64.a ar x libs/libpfring_mod_virtual_x86_64.a gcc -g -Wall -fPIC -I../../kernel -I../../vPF_RING/guest/kernel -D HAVE_DNA -D HAVE_VIRTUAL -c pfring_mod.c -o pfring_mod.o pfring_mod.c:22:30: error: linux/net_tstamp.h: No such file or directory pfring_mod.c: In function ‘pfring_enable_hw_timestamp’: pfring_mod.c:64: error: storage size of ‘hwconfig’ isn’t known pfring_mod.c:74: error: ‘HWTSTAMP_TX_OFF’ undeclared (first use in this function) pfring_mod.c:74: error: (Each undeclared identifier is reported only once pfring_mod.c:74: error: for each …

Member Avatar
Member Avatar
+0 forum 81

We have a simple query and insert using C code linking to mysql db. The issue now on itself the script works fine. But when we put to run as a cron job the select query gives empty results and when we run back on the db there is results. It really puzzle as to what extra should be done for it to a cron job?

Member Avatar
Member Avatar
+0 forum 11

We are trying to send several emails via C language on a centos 6.2 platform. Below are the codes. I added and left char *filename = ""; the I get error as sh: TEST: No such file or directory sh: TEST: No such file or directory sh: TEST: No such file or directory. If I add a message to it give me another error warning: incompatible implicit declaration of built-in function âsprintfâ How to solve this issue? #include <stdio.h> #include <stdlib.h> #include <string.h> #define cknull(x) if((x)==NULL) {perror(""); exit(EXIT_FAILURE);} #define cknltz(x) if((x)<0) {perror(""); exit(EXIT_FAILURE);} #define LIST_LEN 4 void main() { char …

Member Avatar
Member Avatar
+0 forum 11

We have a php page inserting into mysql db. The problem all the tables in mysql we have been just using the default collation and character set as the latin1_swedish_ci. All have been working well where I can insert russian character and view it well. But I notice in the db is stored in this format the russian characters e.g Доставка груза. The issue now we also have java based backend system which reads from the db and read as this only Доставка груза ? So what is the resolution to this problem. I know is encoding issue.

Member Avatar
Member Avatar
+0 forum 3

I have a dropdown list on each cell of table row. Now what I need is dynamically add more dropdownlist on a particular cells with pressing the add button. Any code snippet to help on this? Thank you.

Member Avatar
Member Avatar
+0 forum 8

The End.