summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2007-01-25 15:27:42 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2007-01-25 15:27:42 +0000
commitcc433764c974d9a0f936ce0e7950c632c15b44d8 (patch)
tree8b33a9ea413d74c311633d8c4b042442327f7fee
parent069fb4e1a0338fbbf4262ca2ca719e68c5a4164e (diff)
Ignore files in /proc
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@252 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 cdf94bc..e8c3203 100755
--- a/nagios-check-libs
+++ b/nagios-check-libs
@@ -74,7 +74,8 @@ if ($CHILD_ERROR) { # program failed
for my $line (@lsof) {
if ($line =~ m/\.dpkg-/ || $line =~ m/path inode=/) {
- my ($process, $pid, $user, $rest) = split /\s+/, $line;
+ my ($process, $pid, $user, undef, undef, undef, undef, $path, $rest) = split /\s+/, $line;
+ next if $path =~ m#^/proc/#;
#$processes{$user}->{$process} = [] unless defined $processes{$user}->{$process};
$processes{$user}->{$process}->{$pid} = 1;
};