When I use Spong( a monitoring package for services), I get 
 the following
 messages in my syslog everytime
 Spong checks to see if the service is open:
 Did not receive identification string from xxx.xxx.xxx.xxx.
 The question I have is, what is a good way to keep this from 
 Switch the loglevel to warn rather than info? 
 Here is the perl script I used to duplicate this error. It is 
 taken from the
 spong source:
 use warnings;
 use Sys::Hostname;
 use Socket;
 use IO::Socket;
 $iaddr = inet_aton( $ip )                    || return -1;
 $paddr = sockaddr_in( $port, $iaddr );
 local $SIG{'ALRM'} = sub { die "Socket timed out"; };
 socket( SOCK, PF_INET, SOCK_STREAM, $proto ) || die "socket: $!";
 connect( SOCK, $paddr )                      || die "connect: $!";
 select((select(SOCK), $| = 1)[0]);
 print SOCK "$data";
 recv( SOCK, $line, 256, 0 );  # just grab a chunk from the service.
 close( SOCK ) || die "close: $!";
 Austin Gonyou
 Systems Architect, CCNA
 Coremetrics, Inc.
 Phone: 512-796-9023

Reply via email to