I’ve just finished a relatively minor update to the ZFS Automatic Snapshots SMF Service.
The main change here, was due to Bill complaining (nicely) that the service was a bit noisy when running from the cron script. Too right! Every time the service ran, it would spew the
FMRI for the service – even when everything was working properly, it’d still print it, resulting in a noisier than necessary output.
(For some reason, I’m now quite sensitive to unexpected spewing, and can definitely sympathise about babies^H^H^H^H^H^Hdaemons that are noisier than they could be (Bananas had her 2 month immunisations today, and the poor wee soul is a bit under the weather as a result))
So as well as fixing that, I had another look at the way the method script is doing logging. Before, stdout from the script was being handled by cron, mailing the output to root. I’ve now changed all of the logging in the script, so that messages are now reported via
syslogd(1M) : I’d still love to have the messages land in the appropriate SMF log for each instance, but since we’re running the script from cron, not SMF, this is a bit tricky. With these changes, when running the service now, you’ll messages in syslog like:
Nov 27 11:55:16 haiiro zfs-auto-snap: [ID 702911 daemon.notice]
space/timf@zfs-auto-snap:frequent-2006-10-28-22:30:00 being destroyed as
per retention policy.
– the service isn’t too verbose, but let me know if you’ve any feedback. I’ve updated the README to mention this.
The new version is now available in zfs-auto-snapshot-0.7.tar.gz