[rrd-users] rrdupdate corruption on Mac Snow Leopard

Brent Barr b.barr at f5.com
Fri May 18 22:37:18 CEST 2012


###
I've been using RRDTool for years on a linux box (redhat). I collect various
house sensor data. However, that system just went belly up, so I moved the
collection applications to a mac mini.  I used a bundled version of rrdtool
1.4.5 that had various other libraries collected to make the mac build work
statically linked together.  With minor build problems, I have rrdtool
working.
###

Since there were no other replies, have you considered using flock at the OS level to prevent conflicting writes?
Another option would be to make sure the apps are running in cron (and exiting each update cycle), and space them apart so they can't interfere.

My temperature reading apps do the above, and looks like this in cron-
# Min Hr DoM  M  DoW Command
*/1   *    *  *   *  flock -xn /var/lock/remote_read_1m.py /usr/local/bin/remote_read_1m.py --debug=3 &> /var/www/html/rrdt/lastrun_1m.txt
*/4   *    *  *   *  sleep 30; flock -xn /var/lock/starline.py /usr/local/bin/starline.py   --debug=3 &> /var/www/html/rrdt/lastrun.txt

The first one runs every minute, and is a python program that does SNMP reads to my remote devices and updates the rrdt. The second one runs on gear that I don't need 1 minute data on, so runs every 4 minutes. If something hangs, they won't continue to generate additional instances though. They will abort and I'll loose that minute's worth of data, which in my case is better than having the server lagging due to a bunch of delayed reads.

Note also that the log files from the last run are put where my web browser can get to them, if I need to remotely debug.



More information about the rrd-users mailing list