[ First - *please* don't mail me privately, without copying any responses to the mailing list. I don't have the time or inclination to offer private, unpaid, SNMP consultancy at the best of times - let alone at the moment. Keep discussions to the list, where others can both learn and offer advice. Thanks. ]
On 2 November 2012 05:03, Jatin Bodarya <jatin.boda...@elitecore.com> wrote: > Actually sir I have tried this way also....but as sscanf was a failure to > "NULL" value handling There is a possibility to mismatch the returned data. > Here in case like.. > 1,2,3 > 1,, > ,2,4 > > It was not returning 0 value at the NULL reading, but the next value. Two thoughts here: If there should only be the occasional "incomplete" line, then you could start by using sscanf, and then fall back to a more detailed parser. i.e. something like: if ( sscanf(line, "%ld,%ld,%ld", &record[i].a,&record[i].b,&record[i].c) != 3 ) { my_robust_parser( line, &record[i] ); } If a significant proportion of the lines would be affected, you could have an external process that took the raw data file, and pre-processed it to insert the missing 0s. (Either tweaking the code that produces this file in the first place, or some intermediate process) Or that process could convert from text-based CSV, to a binary data file. The point here is that the "slow" processing would be taken out of the time-critical portion - i.e. the agent's processing of an incoming request. That's assuming that this is the cause of the problem, of course. As I said yesterday, you probably need to do some timing tests to check that. Dave ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders