IEPM

PingER2 FAQ

Supported by DOE MICS Link to SLAC Home Page


It is highly recommended that you use the PingER2 installation defaults. Unexpected problems have arisen when trying to install in other directories.
Is there any documentation on how PingER2 works?
If you have installed PingER2 then try:
>perldoc pinger2.pl
Otherwise see here. There is an example of a complete pinger.xml configuration file which may help you to understand the documentation.

How do I add extra hosts that I want to monitor?
See the documentation on pinger2.pl. Basically you have to edit the pinger.xml file (normally to be found in /usr/local/share/pinger/pinger.xml) to add the extra hosts in the field:
<HostList> This field holds any number of <Host>-entries which will get called by PingER2. In contrast to <BeaconList> these entries are not overridden by the refresh as defined in <BeaconListConfig>. That means that all custom hosts that are to be monitored in addition to the BeaconList should go into this list.
  Example:
    <HostList>
       <Host>
         <Name>www.cc.gatech.edu</Name>
       </Host>
       <Host>
         <Name>www.foo.bar</Name>
         <IP>192.168.1.1</IP>
       </Host>
    </HostList>
These entries will be preserved in this file until you re-edit them

The remote host name in the recorded data appears as N/A
See the documentation on pinger2.pl. Basically you have to add the remote host name in the <HostList>
  Example:
    <HostList>
       <Host>
         <Name>www.foo.bar</Name>
         <IP>192.168.1.1</IP>
       </Host>
    </HostList>
A missing host name will result in the host name being identified as N/A. N.b. the host name has to be the same as the name the host is accessed via DNS.

What do I do if the remote host does not have a name registered in the Domain Name System?
The remote host name is entered as the IP address of the remote host.

The monitor host name in the recorded data appears as locallhost.localdomain or is incorrect
If the hostname is not set, you can add it with (as root):
# hostname juarez-med.core.cudi.edu.mx
or with some flavors of Linux, you must declare separate hostname and domainname:
# hostname juarez-med
# domainname core.cudi.edu.mx

You should review the /etc/hosts and /etc/resolv.conf files to see that they are correct. For example the /etc/resolv.conf file should not say domain local but the correct domain name e.g. domain vsnl.in
Once the name is set, you can reinstall pinger2. Or you can edit pinger.xml and type it in within the SrcName, e.g.
<SrcName>juarez-med.core.cudi.edu.mx</SrcName>

If the monitor hostname is incorrect then edit the correct value in the SrcName. Note that the host name must be the same as the DNS name the host is accessed by.

To test whether the name is correct in the recorded data use http://<web_hostname>cgi-bin/ping_data.pl to get the most recent data. For example at one site the hostname should have been sfsmds2.vsnl.net but the data appeared as:

sfsmds2.local 59.165.131.15 rainbow.inp.nsk.su 193.124.167.29 1000 1177327669 11 10 246.197 246.939... 

How do I know the pinger2 is working correctly?
The most complete way is to access the data via the ping_data.pl CGI script. E.g. access http://host.network.tld/cgi-bin/ping_data.pl, enter the date and time and press Get Data! Also you can look at the raw data that is saved locally in /usr/local/share/pinger/data/

PingER form (ping-data.pl) comes up OK but a blank screen is displayed after Submit
This probably means there is no PingER data measured and cached at the site for the requested time frame. This may mean the pinger2.pl measurement task is not running. Check the crontab (see below).

pinger2.pl runs from command line but not each 30 mins.
Make sure there is an entry in the crontab for pinger2.pl. It should look like:
[root@slac slac]# crontab -l
1 * * * * touch /tmp/crap
*/30 * * * * cd /usr/local/share/pinger; perl /usr/local/share/pinger/pinger2.pl > /usr/local/share/pinger/pingerCronStat.stdout 2> /usr/local/share/pinger/pingerCronStat.stderr
If this exists then make sure cronjob runs, by re-running make install_cron. Also you may need to start ntpd. We have also seen cases where make install.cron fails and there is no cronjob (i.e. crontab -l does not show the pinger2.pl in the cron table. In this case it is probably necessary to edit your won crontab using the crontab -e command from root.

Pinger2.pl executes but no data is available
This may result in ping_data.pl returning:
#Warning ping_data.pl can't open /usr/local/pinger2/share/pinger/data/ping-2007-07.txt: No such file or directory
Make sure the directory has the right permissions, e.g. by execting an ls -l
Look at:
/usr/local/pinger2/share/pinger/pingerCronStat.stdout
and
/usr/local/pinger2/share/pinger/pingerCronStat.stderr
Set <waitInterval> to 1 and execute pinger2.pl from the command line. After a short wait you should see the pingAllHosts subroutine get called ('pingAllHosts(): Starting to ping all hosts.' is displayed). If the process then ends and a quick ps shows no sub-rocesses then check that <BeaconList> exists in the XML config file (i.e. is the list of hosts to ping empty). Since the <RefreshInterval> is set to 1 week by default, it may be necessary to force refresh of beacons.txt.

A second possibility (seen on fedora core 5) is that lynx is not copying the beacons file due to a compatibility problem with openssl. Currently the solution is to install the previous version of openssl.

Pinger2.pl opens (at start of new month), writes or appends to the file of the form /usr/local/pinger2/share/pinger/data/ping-2007-07.txt around line 1346.

Unable to access ping_data.pl URL
Logon to host and see if can execute from the command line, for example:
[root@slac slac]# /var/www/cgi-bin/ping_data.pl
bash: /var/www/cgi-bin/ping_data.pl: /usr/local/bin/perl5: bad interpreter: No such file or directory
You may also be able to look at the root file to find a similar message, e.g.
[root@slac slac]# tail /var/log/httpd/error.log
tail: cannot open `/var/log/httpd/error.log' for reading: No such file or directory
[root@slac slac]# tail /var/log/httpd/error_log
[Thu Mar 29 04:58:41 2007] [error] [client 66.249.66.81] Premature end of script headers: ping_data.pl
[Thu Mar 29 10:10:00 2007] [error] [client 134.79.240.30] (2)No such file or directory: exec of '/var/www/cgi-bin/ping_data.pl' failed
...
The above shows a failure, in that case from the command line try:
[root@slac slac]# perl /var/www/cgi-bin/ping_data.pl
"Status: 200 OK
Content-type: text/html

  <HTML>
  <HEAD>
...
If this works (as above) then modify the first line of ping_data.pl to point to the correct location for perl on this monitor host.

I don't see ping_data.pl anywhere in the pinger-2.0.2 source distribution
It is available under "ADDITIONAL SOFTWARE: Install ping_data.pl and traceroute.pl. Detail can be found at http://www-iepm.slac.stanford.edu/pinger/tools/install2.html"

The form generated by ping_data.pl does not show all nodes in my pinger.xml file
Ping_data.pl only displays the beacon sites not those you added to the HostList tag (see above). This is a bug and will be fixed in future.

Request for ping_data.pl does not show the form
If it asks you if you want to download the file (MSIE), or pops up a window saying 'Opening ping_data.pl' (Firefox), then it is possible that your web server is not configured to recognize .pl files as executable. You may need to add
AddHandler cgi-script .pl
to your httpd.conf file (if you're running Apache),

traceroute.pl and ping_data.pl usually give a server timeout error
There is a Timeout value in httpd.conf (saved in different places on different hosts, e.g. in /etc/httpd/httpd.conf). It should be set to 300.

Traceroute is installed in cgi-bin but the web page does not appear.
Try wget to get more details, e.g. below it failed:
4cottrell@pinger:~>wget 'http://fad.ucad.sn/cgi-bin/traceroute.pl'
--11:58:13--  http://fad.ucad.sn/cgi-bin/traceroute.pl
           => `traceroute.pl'
Resolving fad.ucad.sn... 196.1.95.7
Connecting to fad.ucad.sn|196.1.95.7|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
11:58:13 ERROR 500: Internal Server Error.

Exit 1
Try logging onto the web server and executing traceroute.pl from the command line:
##########################Testing ##############################################
# For testing from command line you need to set some environment variables, e.g.
# setenv QUERY_STRING www.cern.ch; setenv REMOTE_HOST ns1.slac.stanford.edu
# setenv REMOTE_ADDR 134.79.16.9;  setenv SERVER_NAME www.slac.stanford.edu
# setenv REQUEST_URI /cgi-wrap/traceroute.pl
# You will also need to include the -T option in the command line if you want to
# use the perl -d debug facility, i.e. you need to use:
# perl -d -T traceroute.pl
If the above works then maybe the perl interpreter is not found in /usr/bin/perl, in which case change the first line in traceroute.pl to point to the perl interpreter.

Have a look at:
pingerCronStat.stderr
pingerCronStat.stdout
Also look at the error log from your web server from after you try to run traceroute.pl.

Traceroute server form comes up but it will not execute the traceroute command
We managed to get it working. The problem was the SELinux security feature. We set it to disabled.

Where are the CGI files to be found
For cgi-bin scripts such as ping_data.pl try /usr/local/apache2/cgi-bin, or /var/www/cgi-bin. One may be able to look in /etc/httpd to find the web server configuration file which may indicate the location for cgi-bin scripts.
Back to top

Created February 8, 2007.
URL: http://www-iepm.slac.stanford.edu/pinger/index.html
Comments to iepm-l@slac.stanford.edu