summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-09-05 14:38:41 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2005-09-05 14:38:41 +0000
commit35918d2dab51d689a8dc97647e39da93901cb2c8 (patch)
tree3ad0bfd25cc5865f2364e40396e9e911158f2069
parent9094c77fd1c365a325d4d44a6ce59cbd90f95762 (diff)
Use new logic suggested by aba
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@14 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-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;