Hi all,

I want a perl ping script (console based) to monitor server up/down state.

So far I have tried two different approaches, though none of them were
successful.

*First Approach*

Call the operating system "ping" command from the Perl program and get the
server up/down state. Call this program every few minutes using operating
system specific scheduler.

*Second Approach*

Instead of operating system "ping", use "Net::Ping" module from CPAN.

The program with both the approaches are that they are reactive in nature
rather than proactive. If the server goes down and goes up again between two
consecutive instances of perl program execution, the perl program will never
get to know about the same. Lowering the interval might help here but
instead increases the workload on the server (probably).

Having said all that, I have following doubts.

1. Is there a way to implement a daemon sort of a thing in Perl which will
continuously listen at one port and proactively monitor the "ping" state of
the server ?

2. I have heard about SNMP and also know about perl Net::SNMP and SNMP
modules. Will they be of any help here ?

Thanks & Regards,
Amit Saxena

Reply via email to