Table of Contents

Introduction

Originally (prior to June 2018), the gathering of data from the MAs was initiated by the SLAC end.

Solution

Since we could not initiate the gathering from the SLAC end, we chose to use the anonymous ftp service at SLAC (see https://www.slac.stanford.edu/comp/unix/ftp.html).

1. In this case, the MA (e.g. a script initiated at the Beijing MA and run at Beijing by say user Ann who does not have an account at SLAC)  daily runs a script (as a cronjob) to use the incoming anonymous FTP at SLAC to store the day's data at SLAC. An example of an FTP session to copy a file is seen at the Proxy FTP script document.

  1. At most MAs (with the exception of SLAC), the data is stored in /usr/local/share/pinger/data, e.g.

    file: /usr/local/share/pinger/data found on dxmon3.cern.ch 
    total 66756
    -rw-r--r-- 1 root root 12244303 Jun  7 18:56 ping-2018-06.txt
    -rw-r--r-- 1 root root 56049692 Jun  1 01:55 ping-2018-05.txt
  2. The data from the MA is copied to a directory associated with the MA  and read-write permissions set for group sf. We chose to use the FTP anonymous incoming directory path /afs/slac/public/incoming/pinger/proxy/ and this was set up. The PingER MA then copies the data to the above directory with the PingER MA hostname subdirectory, e.g.

    169cottrell@pinger:~$ls -l /afs/slac/public/incoming/pinger/proxy/2001:da8:270:2018:f816:3eff:fef3:bd3/
    total 23277
    -rw-rw-r-- 1 saqibali sf  9360738 Jun  6 20:20 ping-2018-04.txt
    -rw-rw-r-- 1 saqibali sf 12394002 Jun  6 20:20 ping-2018-05.txt
    -rw-rw-r-- 1 saqibali sf  2079565 Jun  6 20:01 ping-2018-06.txt

    Since the user Ann does not have a SLAC user account this is done via anonymous ftp to ftp://ftp.slac.stanford.edu/incoming.  If the directory does not exist then Ann will need to create the directory for her site, e.g. as seen above 2001:da8:270:2018:f816:3eff:fef3:bd3, i.e. having executed a cd /afs/slac/public/incoming/pinger/proxy/, then execute mkdir 2001:da8:270:2018:f816:3eff:fef3:bd3.

2. Due  to security concerns*, we cannot access anonymous incoming FTP space from a web CGI script such as ping_data.pl (that is used by getdata.pl) thus we first move the data from the FTP anonymous space via a local (non-web job) to a space accessible via the web

Automating

The steps are automated with synchronized cronjobs.

The various jobs have to be synchronized:

The analyzed data from analyze-all.pl is saved in files of the form below, the contents are described in PingER data flow at SLAC:

 

/nfs/slac/g/net/pinger/pingerreports/hep/<metric>/<metric>-<len>-<by>-<year>-<month>-<day>.txt.gz#len=100|1000, by=by-node|by-site.
/nfs/slac/g/net/pinger/pingerreports/hep/minimum_rtt/minimum_rtt-100-by-node-2011-05-01.txt.gz

 

This whole mechanism is also interesting since it could be extended and a step to providing support for the Android PingER project at Amity in Delhi, India which also needs a proxy.

Support for ping_data.pl for debugging etc.

The CGI script ping_data.pl provides remote access to PingER information at the MA. Besides providing access to the measured data, this also provides validation and debugging information (e.g. logging information from execution of pinger2.pl, the pinger.xml configuration file, the version of pinger2.pl running, the pinger.pl environment at the MA, etc). However, it is not possible to access the Beijing website (or a PingER Android) from outside. Thus we need a solution to provide access to the various information that ping_data.pl provides for the MA. This includes (where for example:

  1. The pinger.xml file (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3/cgi-bin/ping_data.pl?admin_func=pinger_xml) - item 5 below
  2. Error log from pinger2.pl (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3/cgi-bin/ping_data.pl?admin_func=std_cron_err) - missing below
  3. Progress log from pinger2.pl (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3/cgi-bin/ping_data.pl?admin_func=std_cron_out) - item  6 below
  4. Beacon.txt (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3/cgi-bin/ping_data.pl?admin_func=beacons) - item 1 below
  5. FAQ (e.g. http://www-iepm.slac.stanford.edu/pinger/faq.html) - available locally at SLAC
  6. Web server configuration (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3/cgi-bin/ping_data.pl?admin_func=httpd) - missing below
  7. Help for the current version of pinger2.pl being run at MA (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3?help=1) - item 4 below
  8. PingER configuration (e.g. http://2001:da8:270:2018:f816:3eff:fef3:bd3/cgi-bin/ping_data.pl?admin_func=fileLog) - missing below
  9. Plus access to the actual data for a specified time range.

We address items 1 thru 8 by Beijing copying the files to anonymous incoming FTP at SLAC on a daily basis at the same time the actual data is copied. Thus the files (updated as of the previous night) would be available for review. Since Bejing has a copy of ping_data.pl is used to access the files so they can be copied.

Extension to Android PingER

The Androids do not have a web server so using ping_data.pl to remotely look at the information in the MNA is not going to work.  Thus we cannit use ping_data.pl in the process to copy the relevant information to the proxy, so some new code would be needed to copy the files to the proxy. To simplify this we note below the locations of various files in the table below.

Purpose Primary location at MAAlternative locationping_data.pl URLNFS web/location at SLAC
List of beacons /usr/local/share/pinger/beacons.txt admin_func=beaconsbeacons
PingER configuration Generated by ping_data.pl on demand admin_func=fileLogfileLog
httpd /etc/httpd/conf/httpd.conf admin_func=httpdhttpd
ping_data.pl /usr/local/share/pinger/ping_data.pl N/Aping_data.pl
pinger2.pl /usr/local/share/pinger/pinger2.pl N/Apinger2.pl
pinger.xml /usr/local/share/pinger/pinger.xml admin_func=pinger.xmlpinger_xml
pinger2.pl error log /usr/local/share/pinger/pingerCronStat.stderr  admin_func=std_cron_errstd_cron_err
pinger2.pl execution log /usr/local/share/pinger/pingerCronStat.stdout admin_func=std_cron_outstd_cron_out

 


'* If an anonymous ftp server allows anonymous upload, and also world read access, it quickly becomes a haven for stolen software distribution

'**  It moves all the files (except ./ and ../) from for example /afs/slac/public/incoming/pinger/proxy/2001:da8:270:2018:f816:3eff:fef3:bd3/. Hence after a successful move the files will no longer be in /afs/slac/public/incoming/pinger/proxy/2001:da8:270:2018:f816:3eff:fef3:bd3/ but should be in /nfs/slac/g/net/pinger/pingerdata/hep/data/proxy/2001:da8:270:2018:f816:3eff:fef3:bd3/