RSS Feed for This PostCurrent Article

RPM Enhancements

This afternoon I worked on Ticket #160, which is supposed to add cronjob support to the RPM distribution. I think this is a pretty important ticket because there are some pretty significant performance improvements that can be gained by running some maintenance commands periodically. There are also some housekeeping activities that should be run periodically that will make your local system administrator quite happy when you run them.

The /tmp/renderserver directory contains PNG images for every graph that rrdtool creates. Over time the contents of this directory can grow to be quite large. In fact, on our development server we had over 3,200 files in the directory. This number was so large that “rm -f *” could not run because the number of command line arguments was too much! One of the cron jobs we’re adding in 1.1 is run on a daily basis and it will clean up the /tmp/renderserver directory by deleting the PNG files.

Another cronjob we’re adding is a call to the zenbackup.py command. Jason Stevens wrote zenbackup.py a few weeks ago and it’s a great utility that can be used to dump the contents of both the Zeo and Events database to a tarball. The tarball can then be archived off and restored later in case of a catastrophic system failure. We’re going to start running this command nightly and timestamping the backups. Not to worry tho - we’re also going to add support for deleting backup tarballs that are over 2 weeks old.

The last cronjob we’re adding packs the ZEO database. As objects are deleted from the object space the space they possessed is not reclaimed. This leads to an ever-growing disk footprint as devices are added and removed. A pack of the database is used to reclaim the space that was previously occupied by objects that have since been deleted. We’re now going to start running this once a week.
I was also very surprised to learn that anacron and vixie-cron do not declare themselves as providing “cron”. This is somewhat frustrating because our RPM install base spans FC, RHEL, CentOS, and SLES and they do not all use the same cron daemon. As a result I was hoping to include “Requires: cron” in our .spec file so that users are forced to have cron in order to install our RPM, but due to the lack of the provides definition I can’t do so. I didn’t include a dependency on cron so that way if people have cron then they can use the jobs we’ve set up. If they don’t have cron then the files just sit there dormant.

Sphere: Related Content

Trackback URL

RSS Feed for This PostPost a Comment