Ben, I don't know if it is the answer to your issue or not, but I've found that if your process doesn't write a /var/lock/subsys/ file on startup, the shutdown script will not be called.
A good reference for this is: http://www.redhat.com/magazine/008jun05/departments/tips_tricks/ This was not the way I remember writing init scripts "when I was growing up" in Linux. Let me know if it fixes your problem or not. Thanks, --- James T. Richardson, Jr. [EMAIL PROTECTED] eXcellence in IS Solutions, Inc. 713-862-9200 x226 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Hartshorne Sent: Friday, July 13, 2007 12:18 PM To: Ofer Inbar Cc: [email protected] Subject: Re: [Ganglia-general] RRDs in memory On Wed, Jul 11, 2007 at 03:34:41PM -0400, Ofer Inbar wrote: > gmetad is very write-intensive, because it updates hundreds of RRD > files about every minute or two. Has anyone tried running it with the > rrd directory on a RAM disk (tmpfs) ? I'll toss in my $.02 here as well, though many people have already said the same thing. I created a ramdisk when my cluster grew beyond ~50 nodes (I report a lot of extra statistics). I use an actual ramdisk instead of tmpfs (though I chose it out of ignorance when I first set it up, wikipedia[*] says that tmpfs might swap to disk whereas ramfs is just straight up in memory, nothing fancy). Instead of reconfiguring ganglia to keep the repositories in /mnt/ram0/rrds or mounting the ramdisk in /var/lib/ganglia/rrds, I mounted the ramdisk in /mnt/ram0 and made /var/lib/ganglia/rrds a symlink to /mnt/ram0/rrds. Just my preference... I wrote a new script to drop in /etc/init.d/ called, inventively enough, setup_gmetad_ramdisk, which starts before gmetad and stops after it. It creates the ramdisk, formats it, and copies over the backed up rrds. When stopped, it backs up the rrds. Theoretically, this should make system bootup and shutdown work the same as though it were on disk. Unfortunately, I am missing some part of installing the stop script correctly (in the right runlevel or something) so it doesn't actually work on shutdown. :( I imagine the fix is pretty simple, but I havn't bothered yet. I had to edit grub.conf to adjust the size of the ramdisk. By default they're 64MB, but with an argument to the kernel start line, you can set it to whatever size you need. I chose 4x the current RRD directory, to accomodate new hosts and more metrics. It is unfortunate that a reboot is required to change the size of the ramdisk. I also set up a cronjob to backup the rrds themselves every hour, but unlike the folks so far, instead of rsyncing or keeping just one copy, I keep 8 days worth of hourly snapshots, so that if something goes wrong, I can get back to a healthy snapshot. (Note - I have never actually used any snapshot further back than the most recent... ;) (Note2 - the first version of this used 'find' to get anything >8d old, and it started really tearing up the disk as the number of hosts/metrics grew. Now I use perl to create the timestamp from 8 days ago and just rm the directory. This will fail if the host is down for more than an hour, but that's OK by me.) The backup cronjob and new ramdisk start script are all available off my website http://ben.hartshorne.net/ganglia/ -ben [*] http://en.wikipedia.org/wiki/TMPFS -- Ben Hartshorne email: [EMAIL PROTECTED] http://ben.hartshorne.net NOTICE: This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Ganglia-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-general

