summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnagios-check-libs8
1 files changed, 4 insertions, 4 deletions
diff --git a/nagios-check-libs b/nagios-check-libs
index de5c138..022c261 100755
--- a/nagios-check-libs
+++ b/nagios-check-libs
@@ -64,16 +64,16 @@ sub getUsers() {
-print STDERR "Running $LSOF -n +L\n" if $params->{'verbose'};
-open (LSOF, "$LSOF -n +L|") or die ("Cannot run $LSOF -n +L: $!\n");
+print STDERR "Running $LSOF -n\n" if $params->{'verbose'};
+open (LSOF, "$LSOF -n|") or die ("Cannot run $LSOF -n: $!\n");
my @lsof=<LSOF>;
close LSOF;
if ($CHILD_ERROR) { # program failed
- die("$LSOF -n +L returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
+ die("$LSOF -n returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
};
for my $line (@lsof) {
- if ($line =~ m/path inode=/) {
+ if ($line =~ m/\.dpkg-/) {
my ($process, $pid, $user, $rest) = split /\s+/, $line;
#$processes{$user}->{$process} = [] unless defined $processes{$user}->{$process};
$processes{$user}->{$process}->{$pid} = 1;