Added an already running check
[zfs-nexenta/.git] / zfs-snapshot-totals-cron
1 #!/bin/bash
2
3 # Place this script in your crontab to run daily.
4 # It produces a log file that can be parsed by the
5 # zfs-log-parser script to display a nice table
6 # showing how much space the snapshots are taking up.
7
8 # source our configuration
9 config="${0%/*}/zfs-scripts.conf"
10 [ -e "${config}.dist" ] && . ${config}.dist
11 [ -e "${config}" ] && . ${config}
12
13 logfile="$logdir/zfs-snapshot-totals.log"
14
15 date >> $logfile
16 zfs-snapshot-totals >> $logfile
17 echo >> $logfile
18