- check_iostat: exit with OK if running on tmpfs
- check_iostat: fix apparmor profile to allow stat call OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=19
This commit is contained in:
parent
bb1beac553
commit
0cb710c31c
@ -75,6 +75,12 @@ if (-d "$disk") {
|
|||||||
# directory specified ...
|
# directory specified ...
|
||||||
my $mp = `stat --format '\%m' $disk`;
|
my $mp = `stat --format '\%m' $disk`;
|
||||||
chomp($mp);
|
chomp($mp);
|
||||||
|
my $fstype = `stat --file-system --format '\%T' $mp`;
|
||||||
|
chomp($fstype);
|
||||||
|
if ($fstype eq "tmpfs") {
|
||||||
|
print "OK - $disk (mountpoint $mp is tmpfs)\n";
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
open(MOUNTS,"/proc/mounts");
|
open(MOUNTS,"/proc/mounts");
|
||||||
while(<MOUNTS>) {
|
while(<MOUNTS>) {
|
||||||
chomp($_);
|
chomp($_);
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 5 16:34:19 CET 2019 - ro@suse.de
|
||||||
|
|
||||||
|
- check_iostat: exit with OK if running on tmpfs
|
||||||
|
- check_iostat: fix apparmor profile to allow stat call
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 5 14:40:38 CET 2019 - ro@suse.de
|
Thu Dec 5 14:40:38 CET 2019 - ro@suse.de
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <abstractions/perl>
|
#include <abstractions/perl>
|
||||||
/usr/bin/iostat rix,
|
/usr/bin/iostat rix,
|
||||||
/{usr/,}bin/bash rix,
|
/{usr/,}bin/bash rix,
|
||||||
|
/{usr/,}bin/stat rix,
|
||||||
/usr/bin/which rix,
|
/usr/bin/which rix,
|
||||||
/sys/devices/system/cpu/ r,
|
/sys/devices/system/cpu/ r,
|
||||||
/proc/meminfo r,
|
/proc/meminfo r,
|
||||||
|
Loading…
Reference in New Issue
Block a user