[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 01/01: Make check_libs faster.
Bernd Zeimetz
bernd at bzed.de
Mon Jan 26 14:24:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
bzed pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.
commit 1e398f95bd4eb90832448db7b9aa238986c2feff
Author: Bernd Zeimetz <bernd at bzed.de>
Date: Mon Jan 26 15:23:49 2015 +0100
Make check_libs faster.
---
debian/patches/check_libs/lsof-nP | 11 -----------
debian/patches/check_libs/lsof-speedup | 27 +++++++++++++++++++++++++++
debian/patches/series | 2 +-
3 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/debian/patches/check_libs/lsof-nP b/debian/patches/check_libs/lsof-nP
deleted file mode 100644
index 189ffdf..0000000
--- a/debian/patches/check_libs/lsof-nP
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/check_libs/nagios-check-libs
-+++ b/check_libs/nagios-check-libs
-@@ -29,7 +29,7 @@ use Getopt::Long;
- $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
- delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
-
--my $LSOF = '/usr/bin/lsof -F0';
-+my $LSOF = '/usr/bin/lsof -nPF0';
- my $VERSION = '0.2012042101';
-
- # nagios exit codes
diff --git a/debian/patches/check_libs/lsof-speedup b/debian/patches/check_libs/lsof-speedup
new file mode 100644
index 0000000..5315e6b
--- /dev/null
+++ b/debian/patches/check_libs/lsof-speedup
@@ -0,0 +1,27 @@
+--- a/check_libs/nagios-check-libs
++++ b/check_libs/nagios-check-libs
+@@ -29,7 +29,7 @@ use Getopt::Long;
+ $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
+ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
+
+-my $LSOF = '/usr/bin/lsof -F0';
++my $LSOF = '/usr/bin/lsof -nPF0 -a +L1';
+ my $VERSION = '0.2012042101';
+
+ # nagios exit codes
+@@ -141,12 +141,12 @@ sub inVserver() {
+
+ my $INVSERVER = inVserver();
+
+-print STDERR "Running $LSOF -n\n" if $params->{'verbose'};
+-open (LSOF, "$LSOF -n|") or dief ("Cannot run $LSOF -n: $!\n");
++print STDERR "Running $LSOF\n" if $params->{'verbose'};
++open (LSOF, "$LSOF|") or dief ("Cannot run $LSOF: $!\n");
+ my @lsof=<LSOF>;
+ close LSOF;
+ if ($CHILD_ERROR) { # program failed
+- dief("$LSOF -n returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
++ dief("$LSOF returned with non-zero exit code: ".($CHILD_ERROR / 256)."\n");
+ };
+
+ my ($process, $pid, $user);
diff --git a/debian/patches/series b/debian/patches/series
index ead8b37..1e0ff8f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,7 +9,7 @@ check_email_delivery/paths
check_haproxy/epn
check_httpd_status/epn
check_imap_quota/syntax_error_fix
-check_libs/lsof-nP
+check_libs/lsof-speedup
check_libs/config_path
check_libs/space_before_deleted
check_lm_sensors/manpage_whatis_fix
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git
More information about the Pkg-nagios-changes
mailing list