Update check-netapp-ng.pl

Fixed issue #27
This commit is contained in:
Alexandre Rigaud 2017-06-02 15:55:43 +02:00 committed by GitHub
parent fc9c1902ab
commit 300651b80a
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ use File::Basename;
use Getopt::Long;
use Time::Local;
use IPC::Cmd qw(run_forked);
use Time::HiRes qw[ time alarm ];
Getopt::Long::Configure('bundling');
@ -538,6 +539,7 @@ if (!defined($counterFilePath)) {
# Starting Alarm
$SIG{ALRM} = sub {print "Script execution timeout\n"; exit 2};
alarm($TIMEOUT);
# Establish SNMP Session