projects
/
zfs-nexenta
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a8586d8
)
Updated log file location to dump to /var/log/zfs instead of /var/log
author
Alan J. Pippin
<ajp@pippins.net>
Fri, 22 Aug 2008 03:16:47 +0000
(21:16 -0600)
committer
Alan J. Pippin
<ajp@pippins.net>
Fri, 22 Aug 2008 03:16:47 +0000
(21:16 -0600)
zfs-autosnap
patch
|
blob
|
history
zfs-autosnap-wrapper
patch
|
blob
|
history
zfs-log-parser
patch
|
blob
|
history
zfs-replicate
patch
|
blob
|
history
zfs-replicate-wrapper
patch
|
blob
|
history
zfs-scrub
patch
|
blob
|
history
zfs-scrub-usb-drive
patch
|
blob
|
history
zfs-snapshot-totals-cron
patch
|
blob
|
history
diff --git
a/zfs-autosnap
b/zfs-autosnap
index 7273e57cde7dc78d142de34734bbe571d795c16a..795c80259d1cd28aca9c8215b1558603b799e080 100755
(executable)
--- a/
zfs-autosnap
+++ b/
zfs-autosnap
@@
-7,7
+7,7
@@
test=0
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
# This script makes the following assumptions/requirements:
# * this script only handles one zfs filesystem, a wrapper should be created
diff --git
a/zfs-autosnap-wrapper
b/zfs-autosnap-wrapper
index 2e500e1196b284796dd349712aba697d1e138579..ad8f4fc371fec7c7e4ab7a993c6a812c161c822d 100755
(executable)
--- a/
zfs-autosnap-wrapper
+++ b/
zfs-autosnap-wrapper
@@
-6,7
+6,7
@@
# Setup some default values
autosnap="/usr/local/etc/bin/zfs-autosnap"
# 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
numsnapshots=20
maxagedays=365
diff --git
a/zfs-log-parser
b/zfs-log-parser
index c277e142bf63cc094e0a6657dfc22831d8be80da..2167493f9676a2d91fd538b6a569a28605acec40 100755
(executable)
--- a/
zfs-log-parser
+++ b/
zfs-log-parser
@@
-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});
$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";
}
}
print "$date: data=${data} transfertime=$transfertime rate=${rate}/sec duration=$duration\n";
}
}
diff --git
a/zfs-replicate
b/zfs-replicate
index f878518c4d84f68d7b206448ef9efb415e3b00b5..9a6b82e3655d680e2f645c00cd24fe247b4bdbf4 100755
(executable)
--- a/
zfs-replicate
+++ b/
zfs-replicate
@@
-10,7
+10,7
@@
# In test mode (test=1) commands are echoed, not executed
test=0
# 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.
# Usage: zfs-backup [filesystem] [destination_pool]
# This script has a limitation with children under a given filesystem.
diff --git
a/zfs-replicate-wrapper
b/zfs-replicate-wrapper
index cd815936454c31f8ad4bc10262a271277cc2453a..faeaeb0eecce314f4961afca0606f254683c4df2 100755
(executable)
--- a/
zfs-replicate-wrapper
+++ b/
zfs-replicate-wrapper
@@
-7,7
+7,7
@@
# Setup some default values
replicate="/usr/local/etc/bin/zfs-replicate"
logfile_parser="/usr/local/etc/bin/zfs-log-parser"
# 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
lockdir="/tmp/zfs-admin-lock"
destpool="backups"
maxsleeptime=60
diff --git
a/zfs-scrub
b/zfs-scrub
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
# 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
for i in tank storage
do
diff --git
a/zfs-scrub-usb-drive
b/zfs-scrub-usb-drive
index 1b735052667ba5a00f96c808e2a054da5a14fdc0..6136fab09767fef0bba5cd14c9cae30502aa679d 100755
(executable)
--- a/
zfs-scrub-usb-drive
+++ b/
zfs-scrub-usb-drive
@@
-8,7
+8,7
@@
maxsleeptime=360
mailto=root
maxsleeptime=360
mailto=root
-logfile=/var/log/zfs-scrub.log
+logfile=/var/log/zfs
/zfs
-scrub.log
for i in backups
do
for i in backups
do
diff --git
a/zfs-snapshot-totals-cron
b/zfs-snapshot-totals-cron
index e2eb9ed02ec0ca5a683dbd700a15a8383720767f..726ce3c45801b01dfd60a2e59d01ec1b14a543b6 100755
(executable)
--- a/
zfs-snapshot-totals-cron
+++ b/
zfs-snapshot-totals-cron
@@
-1,7
+1,7
@@
#!/bin/bash
snapshot_totals="/usr/local/etc/bin/zfs-snapshot-totals"
#!/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
date >> $logfile
$snapshot_totals >> $logfile