IEPM

PingER2 FAQ

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 an example of an install
See Example of Installing PingER
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. The file at the monitoring site is usually kept in /afs/slac/package/pinger/pinger2/share/pinger/pinger.xml
Does PingER support non Linux OS's
PingER does not support non Linux OS's for the PingER monitoring host. We have never supported Windows for this application. We used to try and support various flavors of Unix but the difference in specifying the ping comand and parsing the results was just a nightmare, made the code unreasonably complex, we have no suitable hosts with the right OS installed to implement and test PingER on, and almost everybody used Linux everywhere, so we gave up and support Linux only with pinger2.

If you are determined to modify pinger2 to work with non Linux OS's the following may help (from perldoc pinger2.pl)

The ping command is defined in the xml configuration file:
<PingV4Cmd>
               PingER2 uses this command to ping individual host using IPV4
               protocol. PingER2 will try to determine this command during the
               installation. Make sure that the user the script is run under
               has all the rights to execute the PingCmd, which might not be
               the case if you are running a security restricted *nix distri-
               bution. This means that either you have to have suid-bits set
               on the command or run the script using root rights of which the
               latter is strongly discouraged.

               The following identifiers should be present in the command:

               *   %deadline Should be placed where the timeout parameter is
                   placed

               *   %count Will be replaced with the number of pings to send

               *   %interval The script fills in the interval between individ-
                   ual pings

               *   %packetsize The size of individual packets will be entered
                   here by the script

               *   %destination The destination IP, without it there is no
                   ping.

               Examples:
<PingV4Cmd>/bin/ping -n -w %deadline -c %count -i %interval -s %packetsize %destination</PingV4Cmd>
or
<PingV4Cmd>/sbin/ping -c %count -s %packetsize %destination</PingV4Cmd> 
Typically %count is 10, %packetsize is 100 or 1000, %interval is one second, the %deadline is %count+20 seconds. You may need to look at the Linux man page for ping to see exactly how it works, the defaults, or how to translate this to the ping command available on your OS.

However you are not done yet since you will probably need to change the pinger2 code to properly parse the ping output.
An example of Linux output is seen below (however there are lots of edge/error cases):

15cottrell@pinger:~>ping -n -w 20 -c 10 -i 1 -s 100 www.slac.stanford.edu
PING www8.slac.stanford.edu (134.79.18.163) 100(128) bytes of data.
108 bytes from 134.79.18.163: icmp_seq=0 ttl=251 time=0.591 ms
108 bytes from 134.79.18.163: icmp_seq=1 ttl=251 time=0.315 ms
108 bytes from 134.79.18.163: icmp_seq=2 ttl=251 time=0.752 ms
108 bytes from 134.79.18.163: icmp_seq=3 ttl=251 time=0.686 ms
108 bytes from 134.79.18.163: icmp_seq=4 ttl=251 time=0.619 ms
108 bytes from 134.79.18.163: icmp_seq=5 ttl=251 time=0.551 ms
108 bytes from 134.79.18.163: icmp_seq=6 ttl=251 time=0.484 ms
108 bytes from 134.79.18.163: icmp_seq=7 ttl=251 time=0.417 ms
108 bytes from 134.79.18.163: icmp_seq=8 ttl=251 time=0.354 ms
108 bytes from 134.79.18.163: icmp_seq=9 ttl=251 time=0.782 ms

--- www8.slac.stanford.edu ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9005ms
rtt min/avg/max/mdev = 0.315/0.555/0.782/0.153 ms, pipe 2

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

I added extra hosts, but the measurements do not appear in the reports?
There are three possible explanations:
  1. pinger.xml is malformed: To ensure that the file pinger.xml is not malformed, excute the command xmllint /usr/local/share/pinger/pinger.xml. Any errors if existing will be highlighted. For example if the closing tag </Host> under <HostList> is missing a forward slash ‘/’ the output of xmllint /usr/local/share/pinger/pinger.xml would be as follows:
     <HostList>
             ^
     pinger.xml:631: parser error : Opening and ending tag mismatch: Host line 577
  2. Incorrect domain names (or IP addresses):There is a possibility that the domain names (and/or IP addresses) added under the <HostList> tag have a typing mistake or the entries do not exist all together. In this case sift through the files pingerCronStat.stdout and pingerCronStat.stderr to look for relevant notifications.
  3. Miscellaneous errors: Alternatively, if the configuration file pinger.xml is well formed, you may need to debug the code to determine why and where the errors (if any) are occuring. To do so, enter the command perl -d /usr/local/share/pinger/pinger2.pl > /usr/local/share/pinger/pingerCronStat.stdout 2> /usr/local/share/pinger/pingerCronStat.stderr. To obtain help on the commands for the debugger, enter h.

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/. Look at the date on pingerCronStat.stdout, it should be updated each 30 mins. Look at the contents of pingerCronStat.stdout to see what is happening.

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:
crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.11495 installed on Sun Jan  2 23:58:43 2011)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
MAILTO=cottrell@slac.etanford.edu
#00,30 * * * * /home/pingman/share/pinger/pinger2.pl > /home/pingman/share/pinger/pingerCronStat.stdout 2> /home/pingman/share/pinger/pingerCronStat.stderr
00,30 * * * *  /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 own crontab using the crontab -e command from root.
I installed PingER, everything went well except for the last command make install_cron
Refer to the answer here for a solution to edit the crontab manually.
The web server is running but I can't access ping_data.pl
Apache is configured by placing directives in plain text configuration files. The main configuration file is usually called httpd.conf. The location of this file is set at compile-time, but may be overridden with the -f command line flag.
Apache has a file httpd.conf. Doing a Google search on Apache configuration cgi-bin I get http://httpd.apache.org/docs/2.0/howto/cgi.html that says
In order to get your CGI programs to work properly, you'll need to have Apache configured to permit CGI execution. There are several ways to do this.
ScriptAlias:
The ScriptAlias directive tells Apache that a particular directory is set aside for CGI programs. Apache will assume that every file in this directory is a CGI program, and will attempt to execute it, when that particular resource is requested by a client. The ScriptAlias directive looks like:
ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
The example shown is from your default httpd.conf configuration file, if you installed Apache in the default location. The ScriptAlias directive is much like the Alias directive, which defines a URL prefix that is to mapped to a particular directory. Alias and ScriptAlias are usually used for directories that are outside of the DocumentRoot directory. The difference between Alias and ScriptAlias is that ScriptAlias has the added meaning that everything under that URL prefix will be considered a CGI program. So, the example above tells Apache that any request for a resource beginning with /cgi-bin/ should be served from the directory /usr/local/apache2/cgi-bin/, and should be treated as a CGI program.
For example, if the URL http://www.example.com/cgi-bin/test.pl is requested, Apache will attempt to execute the file /usr/local/apache2/cgi-bin/test.pl and return the output. Of course, the file will have to exist, and be executable, and return output in a particular way, or Apache will return an error message.

Another possibilty is that the permissions on ping_data.pl are incorrect. Apache may run as userid=nobody with very limited permissions. The permissions are typically of the form:
-rwxrwxr-x

It is also a good idea to look in the web server's logs to see if it reports why the URL is not working.

Pinger2.pl executes but can't open the data directory
One gets an error message of the form:
Can't open $$$$ DATADIR $$$$/ping-2010-02.txt: file or directory does not exist.
It is trying to open the file given in the pinger.xml directive . In this case it appeared as:
<DataDirectory>$$$$ DATADIR $$$$</DataDirectory>
The default value for the <DataDirectory> directive is:
<DataDirectory>/usr/local/share/pinger/data</DataDirectory>
Possibly the pinger.xml file (usually found at /usr/local/share/pinger/pinger.xml) has been corrupted. You will need to edit pinger.xml to correct the <DataDirectory> directive.

We have also seen corruption in the directive:
<AlarmCmd>echo '%message' | $$$$ MAIL $$$$ `whoami` -s &quot;PingER2 Error Message&quot;</AlarmCmd>
The default value for this directive is:
<AlarmCmd>echo '%message' | /bin/mail `whoami` -s &quot;PingER2 Error Message&quot;</AlarmCmd>
Again the pinger.xml file will need editing.

Pinger2.pl executes but no data is available
How can I find out if my PingER2 cronjob is running?
In the newer version of ping_data.pl there's a tab on top called PingER2CronOutput. In case the cron is not running the output would be just the following two lines:

Starting Output of Standard Cron Out[/usr/local/share/pinger/pingerCronStat.stdout] --------------Output complete---------------------

Otherwise this output would contain several debug statements from PingER2's last execution.

Also note, you can look at any errors caused by PingER2 by using the tab PingER2CronErrors.

Webserver is accessible, data is available yet the collection process fails
Typically in this case the webserver's form to request the data reponds correctly but no data is supplied in response to pushing the "Get Data!" button. One possibility is that the web server does not have permission to access the data. In that case the user will probably get a message of the form:
#Warning ping_data.pl can't open /usr/local/share/pinger/data/ping-2009-10.txt: Permission denied

This can also happen if a routing policy is enforced which blocks traffic from the node executing the data-collection process while allowing traffic from other nodes.

To confirm that this is the case, logon to the node executing the data collection process and manually execute the wget command. If it fails -- while permitting access from other nodes -- we can be sure that this is the case (We experienced this one in Aug 2009 with citehep130.ultralight.org).

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.

I receive the error traceroute socket: Permission denied when executing traceroute.pl
The "problem" is that SELinux is preventing what it considers to be violations of security. This is because the file contexts are incorrect. Execute the command below to address the issue. See this for further details.
chcon -t httpd_unconfined_script_exec_t traceroute.pl
There is no data fo the metyrics ipdv, inter quartile range and MOS
The monitor is running an older version of pinger2.pl that does not record the individual RTTs the inter quartile range of the packets and inter packet delay variation (ipdv) cannot be calculated and so MOS (that is a function of ipdv as a measure of jitter) also is not calulable. The monitor needs to load a new version of pinger.pl.
Where are the 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.

Many files (e.g. pinger.xml) are to be found in /usr/local/share/pinger/

The recorded data files are found in /usr/local/share/pinger/data/

Lynx Error:
Can't exec "NOT_SUPPORTED": No such file or directory at pinger2.pl
Use of uninitialized value $beacons in split at pinger2.pl
This error is due to the fact that lynx has not been installed by the user. The README clearly lists lynx as a pre-req to installing PingER2. The user can do any of the following steps to ensure smooth running of PingER2

pinger.xml can be found under /usr/local/share/pinger/

Missing Lynx browser and XML::Simple perl module
The README file list all the requirements of the pinger software. Typically the Lynx browser and perl’s XML::Simple module are found to be missing.

See the XXL::Simple web page.

To install the perl module XML::Simple the following command should suffice:

perl -MCPAN -e "Install XML::Simple"
Alternatively, apt-get may be used:
apt-get install libxml-simple-perl

Similarly, to install the lynx browser use apt-get or yum:

apt-get install lynx
Alternatively, you may download and install the lynx browser from here.
Missing ParseDetails.ini
See Installing XML::SAX
Back to top

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