forked from pool/monitoring-plugins-sar-perf
- check_iostat: sanitize dev name to properly match iostat output
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=20
This commit is contained in:
parent
0cb710c31c
commit
2f4e862ed2
13
check_iostat
13
check_iostat
@ -90,16 +90,17 @@ if (-d "$disk") {
|
||||
close(MOUNTS);
|
||||
}
|
||||
|
||||
$disk =~ s/^\/dev\/mapper\///;
|
||||
$disk =~ s/^\/dev\///;
|
||||
|
||||
if (! -b "/dev/$disk") {
|
||||
if (-b "/dev/mapper/$disk") {
|
||||
my @f = stat("/dev/mapper/$disk");
|
||||
$f[6] %= 256;
|
||||
$disk = "dm-$f[6]";
|
||||
} elsif (-b $disk) {
|
||||
# take as is
|
||||
$f[6] %= 256;
|
||||
$disk = "dm-$f[6]";
|
||||
} else {
|
||||
warn "ERROR: Device incorrectly specified\n";
|
||||
HELP_MESSAGE();
|
||||
warn "ERROR: Device incorrectly specified\n";
|
||||
HELP_MESSAGE();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 11 18:10:48 CET 2019 - ro@suse.de
|
||||
|
||||
- check_iostat: sanitize dev name to properly match iostat output
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 5 16:34:19 CET 2019 - ro@suse.de
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user