--- projects/cms/source/host/ihost-perl/ihost.pl 2001/01/29 16:51:50 1.9 +++ projects/cms/source/host/ihost-perl/ihost.pl 2001/02/01 09:10:52 1.11 @@ -9,7 +9,7 @@ # - pjm2@ukc.ac.uk # # $Author: pjm2 $ -# $Id: ihost.pl,v 1.9 2001/01/29 16:51:50 pjm2 Exp $ +# $Id: ihost.pl,v 1.11 2001/02/01 09:10:52 pjm2 Exp $ #------------------------------------------------------------ $| = 1; @@ -77,10 +77,14 @@ sub tcp_configure() { PeerAddr => $filter_manager_addr, PeerPort => $filter_manager_port, Proto => 'tcp' - ) or die "Could not perform configuration via TCP: $!\n"; + ); + if (!defined $sock) { + print "IHOST ERROR: Could not connect to $filter_manager_addr:$filter_manager_port.\n"; + print "Please check that there is an i-scream server at this address.\n"; + print "Program ended.\n"; + exit(1); + } - die "Could not connect to the i-scream filter manager: $!\n" unless $sock; - # Now run through the configuration process. my($response); @@ -201,6 +205,7 @@ sub send_udp_packet() { $packet{"packet.os.platform"} $packet{"packet.os.sysname"} $packet{"packet.os.version"} + $packet{"packet.os.uptime"} $packet{"packet.users.count"} @@ -253,9 +258,11 @@ sub send_tcp_heartbeat() { PeerAddr => $filter_addr, PeerPort => $tcp_port, Proto => 'tcp' - ) or die "Could not perform heartbeat via TCP: $!\n"; - - die "Could not connect to the i-scream filter: $!\n" unless $sock; + ); + if (!defined $sock) { + print "IHOST WARNING: Failed to deliver a heartbeat to the i-scream filter.\n"; + return; + } # Now run through the configuration process. my($response);