diff options
Diffstat (limited to 'nagios-check-libs')
-rwxr-xr-x | nagios-check-libs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nagios-check-libs b/nagios-check-libs index f38fcbc..de5c138 100755 --- a/nagios-check-libs +++ b/nagios-check-libs @@ -50,7 +50,7 @@ my %processes; sub getPIDs($$) { my ($user, $process) = @_; - return join(', ', sort @{ $processes{$user}->{$process} }); + return join(', ', sort keys %{ $processes{$user}->{$process} }); }; sub getProcs($) { my ($user) = @_; @@ -76,7 +76,7 @@ for my $line (@lsof) { if ($line =~ m/path inode=/) { my ($process, $pid, $user, $rest) = split /\s+/, $line; #$processes{$user}->{$process} = [] unless defined $processes{$user}->{$process}; - push @{ $processes{$user}->{$process} }, $pid; + $processes{$user}->{$process}->{$pid} = 1; }; }; |