mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
no backticks edition
This commit is contained in:
parent
f17084e802
commit
53ef521b45
@ -1,13 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# =LLC= © (C)opyright 2016 Boojum Consulting LLC / Dave Bechtel, All rights reserved.
|
||||
## NOTICE: Only Boojum Consulting LLC personnel may use or redistribute this code,
|
||||
## Unless given explicit permission by the author - see http://www.boojumconsultingsa.com
|
||||
#
|
||||
# 2014 Dave Bechtel
|
||||
# arg1 is poolname
|
||||
|
||||
sdate=`date`
|
||||
sdate=$(date)
|
||||
|
||||
#mv ~/scrublog.log ~/scrublog-prev.log
|
||||
#> ~/scrublog.log
|
||||
@ -16,9 +13,8 @@ sdate=`date`
|
||||
while :; do
|
||||
clear
|
||||
|
||||
echo "Pool: $1 - NOW: `date` -- Watchresilver started: $sdate"
|
||||
# E WORKY! - note, egrep 4 canceled not breakloop
|
||||
# zpool status $1 |tee -a ~/scrublog.log |grep -A 2 'resilver in progress' || break 2
|
||||
echo "Pool: $1 - NOW: $(date) -- Watchresilver started: $sdate"
|
||||
|
||||
zpool status $1 |grep -A 2 'resilver in progress' || break 2
|
||||
zpool iostat -v $1 2 3 &
|
||||
# zpool iostat -T d -v $1 2 3 & # with timestamp
|
||||
@ -28,39 +24,21 @@ while :; do
|
||||
|
||||
done
|
||||
|
||||
ndate=`date`
|
||||
ndate=$(date)
|
||||
|
||||
zpool status $1
|
||||
zpool status -v $1 |awk 'NF>0' # skip blank lines
|
||||
echo "o Resilver watch $1 start: $sdate // Completed: $ndate"
|
||||
|
||||
hd-power-status
|
||||
#hd-power-status
|
||||
|
||||
exit;
|
||||
|
||||
# zpool status |egrep -B 2 -A 2 "scrub in progress|bigvaiterazfs" # $1
|
||||
|
||||
zpool status
|
||||
pool: tank0
|
||||
state: ONLINE
|
||||
scan: none requested
|
||||
config:
|
||||
|
||||
NAME STATE READ WRITE
|
||||
CKSUM
|
||||
tank0 ONLINE 0 0
|
||||
0
|
||||
gptid/8194f816-80cd-11e1-8a71-00221516e8b8 ONLINE 0 0
|
||||
0
|
||||
|
||||
errors: No known data errors
|
||||
|
||||
pool: tank1
|
||||
pool: tank1
|
||||
state: ONLINE
|
||||
scan: scrub in progress since Tue May 1 23:28:07 2012
|
||||
146G scanned out of 1.24T at 177M/s, 1h47m to go
|
||||
0 repaired, 11.56% done
|
||||
config:
|
||||
|
||||
NAME STATE READ WRITE CKSUM
|
||||
tank1 ONLINE 0 0 0
|
||||
raidz1-0 ONLINE 0 0 0
|
||||
@ -68,5 +46,4 @@ config:
|
||||
label/zdisk2 ONLINE 0 0 0
|
||||
label/zdisk3 ONLINE 0 0 0
|
||||
label/zdisk4 ONLINE 0 0 0
|
||||
|
||||
errors: No known data errors
|
||||
|
Loading…
x
Reference in New Issue
Block a user