Updated log file location to dump to /var/log/zfs instead of /var/log
authorAlan J. Pippin <ajp@pippins.net>
Fri, 22 Aug 2008 03:16:47 +0000 (21:16 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Fri, 22 Aug 2008 03:16:47 +0000 (21:16 -0600)
zfs-autosnap
zfs-autosnap-wrapper
zfs-log-parser
zfs-replicate
zfs-replicate-wrapper
zfs-scrub
zfs-scrub-usb-drive
zfs-snapshot-totals-cron

index 7273e57cde7dc78d142de34734bbe571d795c16a..795c80259d1cd28aca9c8215b1558603b799e080 100755 (executable)
@@ -7,7 +7,7 @@
 
 test=0
 
-[ $test == 0 ] && exec >> /var/log/zfs-autosnap.log 2>&1
+[ $test == 0 ] && exec >> /var/log/zfs/zfs-autosnap.log 2>&1
 
 # This script makes the following assumptions/requirements:
 #  * this script only handles one zfs filesystem, a wrapper should be created
index 2e500e1196b284796dd349712aba697d1e138579..ad8f4fc371fec7c7e4ab7a993c6a812c161c822d 100755 (executable)
@@ -6,7 +6,7 @@
 
 # Setup some default values
 autosnap="/usr/local/etc/bin/zfs-autosnap"
-logfile="/var/log/zfs-autosnap.log"
+logfile="/var/log/zfs/zfs-autosnap.log"
 numsnapshots=20
 maxagedays=365
 
index c277e142bf63cc094e0a6657dfc22831d8be80da..2167493f9676a2d91fd538b6a569a28605acec40 100755 (executable)
@@ -82,7 +82,11 @@ sub parse_replicate_logfile {
        $duration=adjust_duration($totals{$date}{duration});
        $data=adjust_data($totals{$date}{data});
        $transfertime=adjust_duration($totals{$date}{transfertime});
-       $rate = adjust_data(int($totals{$date}{data}/$totals{$date}{transfertime}));
+        if($totals{$date}{transfertime} > 0) { 
+         $rate = adjust_data(int($totals{$date}{data}/$totals{$date}{transfertime}));
+        } else { 
+          $rate = 0;
+        }
        print "$date: data=${data} transfertime=$transfertime rate=${rate}/sec duration=$duration\n";
     }
 }
index f878518c4d84f68d7b206448ef9efb415e3b00b5..9a6b82e3655d680e2f645c00cd24fe247b4bdbf4 100755 (executable)
@@ -10,7 +10,7 @@
 # In test mode (test=1) commands are echoed, not executed
 test=0
 
-[ $test == 0 ] && exec >> /var/log/zfs-replicate.log 2>&1
+[ $test == 0 ] && exec >> /var/log/zfs/zfs-replicate.log 2>&1
 
 # Usage: zfs-backup [filesystem] [destination_pool]
 # This script has a limitation with children under a given filesystem.
index cd815936454c31f8ad4bc10262a271277cc2453a..faeaeb0eecce314f4961afca0606f254683c4df2 100755 (executable)
@@ -7,7 +7,7 @@
 # Setup some default values
 replicate="/usr/local/etc/bin/zfs-replicate"
 logfile_parser="/usr/local/etc/bin/zfs-log-parser"
-logfile="/var/log/zfs-replicate.log"
+logfile="/var/log/zfs/zfs-replicate.log"
 lockdir="/tmp/zfs-admin-lock"
 destpool="backups"
 maxsleeptime=60
index 2bff3d367539d6e8ff6c77ac6328ba0cb351c97f..1b068d41dafa0c504a6a64c5d8fbcf4cfb71c1fd 100755 (executable)
--- a/zfs-scrub
+++ b/zfs-scrub
@@ -7,7 +7,7 @@
 #              This serializes the zfs scrub process for each pool.
 
 maxsleeptime=360
-logfile=/var/log/zfs-scrub.log
+logfile=/var/log/zfs/zfs-scrub.log
 
 for i in tank storage
 do
index 1b735052667ba5a00f96c808e2a054da5a14fdc0..6136fab09767fef0bba5cd14c9cae30502aa679d 100755 (executable)
@@ -8,7 +8,7 @@
 
 maxsleeptime=360
 mailto=root
-logfile=/var/log/zfs-scrub.log
+logfile=/var/log/zfs/zfs-scrub.log
 
 for i in backups
 do
index e2eb9ed02ec0ca5a683dbd700a15a8383720767f..726ce3c45801b01dfd60a2e59d01ec1b14a543b6 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 snapshot_totals="/usr/local/etc/bin/zfs-snapshot-totals"
-logfile="/var/log/zfs-snapshot-totals.log"
+logfile="/var/log/zfs/zfs-snapshot-totals.log"
 
 date >> $logfile
 $snapshot_totals >> $logfile