Introduction
PingER2 at SLAC resides under /afs/slac/package/pinger/pinger2/share/pinger/. This directory contains all the scripts, needed by PingER2 except for wget, ping, ping6,dig, and other similar standard Linux binaries. The directory contains:
pinger.xml
- These files contain the configuration values for pinger2. They are created atomically every 6 hours from the Oracle NODEDETAILS database as a result of running write_offsitenodes.pl from the pinger@pinger.slac.stanford.edu trscronjob. There are actually two files:
- For the SLAC monitoring host: /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger.xml
- For other (non-SLAC) monitoring hosts: http://www-iepm.slac.stanford.edu/pinger/pinger.xml
- Non-SLAC hosts by default update their beacons every 30 days.
- The last update time can be found by:
cottrell@pinger $ ls -l /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger.xml
-rw-r--r-- 1 fahad sg 233552 Dec 27 09:51 /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger.xml
- This file has four parts:
- Beacon List, containing a list of all the beacon sites.
- Beacon List Config, containing configuration values for the beacon list. This includes:
- BeaconListURL: Location of beacon.txt file
- HttpGetBin: Location of lynx
- RefreshInterval: Used to determine, when the list should be refreshed.
- DataDirectory: Indicating where the data gathered by PingER2 should reside.
- DefaultHost: Values here determine what a default host looks like. For the host list, any value that is not in there for a host is picked up from here.
- It is advised that DNS Caching be turned off, to cause PingER2 to do a new DNS request every time.
PingER2 throws all the error messages at the same time when the time to the 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>
- HostList: List of hosts, PingER2 gathers data from.
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>
pinger2.pl
The main, perl script to do all the PingER2 tasks, including ping. There is detailed information on the Pinger data Flow.
- Example of IPv6 output:
Logs
There are logs at:
/afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger.log- /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pingerCronStat.stderr
- /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pingerCronStat.stdout
[slaconly]pinger_startup.pl
This script alleviates the need to pass multiple arguments to PingER2 every time it needs to be run. It verifies that the pinger2.pl script exists, that pinger.xml is > 100Bytes, and that pinger2.pl is not still running. It has some default values, that make the cronjob and the whole running a clean process. It also has various options to assist in debugging etc.
Without this script a typical run would look like this:
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
dnsV4Cmd.pl
This Command utilizes the Perl utility gethostbyname() to determine, the ip address of a host, given a hostname.
PingER2 Data Flow
- PingER2 collects and stores data in the directory defined inside pinger.xml configuration file (in SLAC pinger.xml can be found at /afs/slac.stanford.edu/package/pinger/pinger2/share/pinger/pinger.xml). At SLAC this sets the data directory via <DataDirectory>/nfs/slac/g/net/pinger/pinger2/data/</DataDirectory>
$ ls \-l /nfs/.../pinger/pinger2/data/ total 365528 \-rwxrwxr-x 1 ... ... 163965926 Oct 31 16:40 ping-2009-10.txt\* \-rwxrwxr-x 1 ... ... 43266107 Nov 19 11:05 ping-2009-11.txt\* \-rwxrwxr-x 1 ... ... 103447435 Jan 31 15:39 ping-2010-01.txt\* \-rwxrwxr-x 1 ... ... 63376205 Feb 10 16:40 ping-2010-02.txt\*
- Each file contains data of the form:
This indicates, the hostname and the ip address of the node running pinger2, remote host to which ping tests are run, size of ping packets, timestamp of test, number of pings sent, number of pings returned,min rtt, avg rtt, max rtt, id numer of returned pings, rtt for each returned ping.
pinger.slac.stanford.edu 134.79.240.29 www.ipc.bf 196.28.248.26 1000 1264982436 10 10 423.911 473.670 507.699 0 1 2 3 4 5 6 7 8 9 442 450 499 507 423 432 482 491 498 506 pinger.slac.stanford.edu 134.79.240.29 195.24.192.47 195.24.192.47 1000 1264982436 10 10 431.108 431.668 432.337 0 1 2 3 4 5 6 7 8 9 431 431 432 432 431 431 4 31 431 431 431
----Do not Copy these commands directly, these commands wont work.