- 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:
Ruediger Oertel 2019-12-05 15:35:07 +00:00 committed by Git OBS Bridge
parent bb1beac553
commit 0cb710c31c
3 changed files with 13 additions and 0 deletions

View File

@ -75,6 +75,12 @@ if (-d "$disk") {
# directory specified ...
my $mp = `stat --format '\%m' $disk`;
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");
while(<MOUNTS>) {
chomp($_);

View File

@ -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

View File

@ -5,6 +5,7 @@
#include <abstractions/perl>
/usr/bin/iostat rix,
/{usr/,}bin/bash rix,
/{usr/,}bin/stat rix,
/usr/bin/which rix,
/sys/devices/system/cpu/ r,
/proc/meminfo r,