From 194a28993d17fd5c74927ff2a9c61eddc04e5e6e Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Wed, 15 Mar 2000 00:15:13 +0000 Subject: [PATCH] current program status written to $0 in main program loop --- src/spong-network.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spong-network.pl b/src/spong-network.pl index 1b95974..ed06155 100755 --- a/src/spong-network.pl +++ b/src/spong-network.pl @@ -22,6 +22,8 @@ use lib "@@LIBDIR@@"; $CRIT_WARN_LEVEL = 1; +$0 = "spong-network"; + use Sys::Hostname; use Net::Ping; use Socket; @@ -69,6 +71,7 @@ while( 1 ) { my $check; foreach $check (('ping',split(/\s+/,$HOSTS{$host}->{'services'}))) { + $0 = "spong-network (checking $host/$check)"; &do_check($host,$check); } } @@ -83,6 +86,7 @@ while( 1 ) { my $sleep = int($SPONGSLEEP - (.05 * $SPONGSLEEP) + rand(.1 * $SPONGSLEEP)); &debug( "sleeping for $sleep seconds" ); + $0 = "spong-network (sleeping)"; sleep $sleep; } } -- 2.30.2