summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2010-01-23 14:46:06 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2010-01-23 14:46:06 +0000
commit030b5363115ebf794602536c3b6299e2416e173f (patch)
tree826b9ea1227bdf4ccc6ec3c7bb2c43c3b1ae9973
parent83007bf993ed650dfb7619badb00a3a3cdc26838 (diff)
Patch by Rhonda to make nagios-check-libs useful on more recent kernels/systems
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@439 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xnagios-check-libs3
1 files changed, 2 insertions, 1 deletions
diff --git a/nagios-check-libs b/nagios-check-libs
index 8270faa..3bfd837 100755
--- a/nagios-check-libs
+++ b/nagios-check-libs
@@ -111,10 +111,11 @@ if ($CHILD_ERROR) { # program failed
};
for my $line (@lsof) {
- if ($line =~ m/\.dpkg-/ || $line =~ m/path inode=/) {
+ if ($line =~ m/\.dpkg-/ || $line =~ m/path inode=/ || $line =~ m/ DEL /) {
my ($process, $pid, $user, undef, undef, undef, undef, $path, $rest) = split /\s+/, $line;
next if $path =~ m#^/proc/#;
next if $path =~ m#^/var/tmp/#;
+ next if $path =~ m#^/SYS#;
next if ($INVSERVER && ($process eq 'init') && ($pid == 1) && ($user eq 'root'));
#$processes{$user}->{$process} = [] unless defined $processes{$user}->{$process};
$processes{$user}->{$process}->{$pid} = 1;