[Tutor] reading output from a c executable.

Lie Ryan lie.1296 at gmail.com
Fri Dec 12 12:33:55 CET 2008


On Fri, 12 Dec 2008 03:13:16 -0800, Ravi Kondamuru wrote:

> Denis, These are 32bit, 64bit counters (essentially numbers). Bob, There
> are well over 10K counters in the log file that are updated every 5
> secs. If a counter1's graph was requested, log will have to be parsed
> once to get the data points. If a user asked for a counter2, now it
> needs to be retrieved from the log file. Which essentially means having
> to go through the logfile again. This is because i want to try to avoid
> using a database to store values after parsing the file. thanks,
> Ravi.

Instead of using a file, why not use pipes? Using pipes is surely much 
faster than reading from a file, and using pipes allow you to send log 
entries in "messages" which means you don't need to reparse the whole 
logfile on every update, just the parts that have changed.



More information about the Tutor mailing list