projects
/
mirror
/
dsa-nagios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fab0c8
)
dsa-check-libs: Ignore deleted files that are open via normal file handles
author
Peter Palfrader
<peter@palfrader.org>
Mon, 9 Feb 2015 09:26:34 +0000
(10:26 +0100)
committer
Peter Palfrader
<peter@palfrader.org>
Mon, 9 Feb 2015 09:26:34 +0000
(10:26 +0100)
dsa-nagios-checks/checks/dsa-check-libs
patch
|
blob
|
history
diff --git
a/dsa-nagios-checks/checks/dsa-check-libs
b/dsa-nagios-checks/checks/dsa-check-libs
index
89d7f3a
..
5d49855
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-libs
+++ b/
dsa-nagios-checks/checks/dsa-check-libs
@@
-170,6
+170,9
@@
LINE: for my $line (@lsof) {
my $inode = $fields{i};
my $path = $fields{n};
if ($path =~ m/\.dpkg-/ || $path =~ m/\(deleted\)/ || $path =~ /path inode=/ || $path =~ m#/\.nfs# || $fd eq 'DEL') {
+ my $deleted_in_path = ($path =~ m/\(deleted\)/);
+ next if ($deleted_in_path && $fd =~ /^[0-9]*$/); # Ignore deleted files that are open via normal file handles.
+
$path =~ s/^\(deleted\)//; # in some cases "(deleted)" is at the beginning of the string
for my $i (@{$config->{'ignorelist'}}) {
my $ignore = eval($i);