PingER2 at SLAC resides under /afs/slac/package/pinger/pinger2/share/pinger/. This directory contains all the scripts, needed by PingER2 except for lynx, ping,ping6,dig and other similar binaries. The directory contains:
PingER2 throws all the error messages at the same time, when the time to notification is achieved. The default value is 12 hours. If you wish to store this information instead, in a log file, replace the
<AlarmCmd>echo "%message\n-----------------\n" >> /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger.log </AlarmCmd> |
Final Configuration values:
<MaxProcessCount>25</MaxProcessCount> <PingV4Cmd>/bin/ping \-n \-w %deadline \-c %count \-i %interval \-s %packetsize %destination</PingV4Cmd> <PingV6Cmd>/bin/ping6 \-n \-w %deadline \-c %count \-i %interval \-s %packetsize %destination</PingV6Cmd> <SrcName>pinger.slac.stanford.edu</SrcName> <Version>2.0.1</Version> <dnsV4Cmd>/afs/slac/package/pinger/pinger2/share/pinger/dnsV4Cmd.pl %destination</dnsV4Cmd> <dnsV6Cmd>/usr/bin/dig \-t aaaa \+short %destination</dnsV6Cmd> <doRandomWait>false</doRandomWait> <modifiedTime>Tue Feb 9 17:17:31 2010</modifiedTime> <waitInterval>30</waitInterval> |
The main, perl script to do all the PingER2 tasks, including ping. There is detailed information on the Pinger data Flow.
There are logs at:
This script, alleviates the need to pass multiple arguments to PingER2 everytime it needs to be run. It has some default values, that make the cronjob and the whole running a clean process.
With out this script a typical run would look like:
cd /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger ; perl /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger2.pl > /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pingerCronStat.stdout; |
However using pinger_startup.pl, this becomes:
/afs/slac/package/pinger/pinger2/share/pinger/pinger_startup.pl |
This Command utilises the Perl utility gethostbyname() to determine, the ip address of a host, given a hostname.