projects
/
mirror
/
dsa-nagios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3590b13
)
correctly parse % in sw raid resync (e.g. "resync = 1.7%")
author
Peter Palfrader
<peter@palfrader.org>
Fri, 2 Aug 2019 08:53:44 +0000
(10:53 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Fri, 2 Aug 2019 08:54:01 +0000
(10:54 +0200)
dsa-nagios-checks/checks/dsa-check-raid-sw
patch
|
blob
|
history
diff --git
a/dsa-nagios-checks/checks/dsa-check-raid-sw
b/dsa-nagios-checks/checks/dsa-check-raid-sw
index
0297036
..
7707348
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-raid-sw
+++ b/
dsa-nagios-checks/checks/dsa-check-raid-sw
@@
-99,7
+99,7
@@
while (<FH>) {
}
elsif ( $line =~ / resync /) {
# [==>..................] resync = 10.3% (15216320/146994624) finish=2153.2min speed=1018K/sec
- my ($percent) = ($line =~ m# resync
=
([0-9.]+%)#);
+ my ($percent) = ($line =~ m# resync
*= *
([0-9.]+%)#);
my ($finish) = ($line =~ m# finish=([0-9.]+min)#);
my ($speed) = ($line =~ m# speed=([0-9.]+K/sec)#);
push @resyncing, "$device ($percent done, finish in $finish at $speed)";