Reputation: 1590
Im looking for a quick and dirty way to get a graph to show a rate of lines added to a log file, such as php.log, or any text file for that matter.
Know of any open source projects out there?
I know there are a lot of charting tools out there and am familiar with rrd and such, but the answer I'm interested in is the actual nuts and bolts of implementing the solution for any of those charting systems.
Upvotes: 0
Views: 61
Reputation: 599
If you are familiar with rrd, then you can make a simple database which stores the actual line count of the log file, then visualize with the standard rrd tools.
You can update your database with the following snippet:
rrdtool update test.rrd `date +%s`:`wc -l logfile.txt`
Upvotes: 1