Version 9 (modified by, 13 years ago) (diff)


How to configure Plastic Slices monitoring on a MyPLC server


This page explains how to configure a MyPLC server for the Plastic Slices central monitoring configuration. This page was written for


which is the latest version of the monitoring utilities for a MyPLC server running Fedora 8 or Fedora 12. It may not work well with older versions.


  • <cronuser>: The user as which to run the monitoring on MyPLC. The scripts can run as root, or as a non-root user of your choice. (At GPO, we use the ganglia user.)
  • <site>: a one-word phrase describing your site, probably the name of your university or lab (e.g. stanford, gpolab). Use the same value for all hosts your site is monitoring.
  • <fqdn>: The fully-qualified domain name as which your MyPLC should report data. IF this is not the same as the output of uname -n on your node, pay attention to section IV below.

Steps to configure MyPLC monitoring

I. Prepare to submit authenticated monitoring data to GMOC

You need to do these steps if you are installing monitoring for the first time, or if you are upgrading from version 0.1.

  1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at GENIMetaOps/SiteCredentials. All site resources use the same credential; you only need to do this step once for your entire site. Note: the password you use for your site registration is a new password generated for the purpose of submitting monitoring data. Do not reuse any existing passwords from your site.
  1. Store your site password in a file which MyPLC monitoring can use:
    sudo touch /usr/local/etc/monitoring_passwd
    sudo chown <cronuser> /usr/local/etc/monitoring_passwd
    sudo chmod 600 /usr/local/etc/monitoring_passwd
    sudo vi /usr/local/etc/monitoring_passwd
    Add exactly one line to this file, containing the site monitoring password you registered with GMOC.

II. Install the monitoring software

Do all of these steps every time you install or upgrade the monitoring software.

  1. Download the plastic-slices-monitor-myplc-0.2.tar.gz tarball from, and copy it onto your MyPLC host, e.g. into ~/plastic-slices-monitor-myplc-0.2.tar.gz.
  1. Download the GMOC script from, and copy it onto your MyPLC host, e.g. into ~/
  1. Unpack the tarball in ~, and copy the files into place:
    cd ~
    tar xvzf ~/plastic-slices-monitor-myplc-0.2.tar.gz
    cd plastic-slices-monitor-myplc-0.2
    sudo mkdir -p /usr/local/{bin,lib}
    sudo cp bin/{build_gmoc_conf,metric_plc,report_data_to_gmoc} /usr/local/bin
    sudo cp lib/ /usr/local/lib
    sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_plc,report_data_to_gmoc}
    sudo chmod 444 /usr/local/lib/
  1. Copy measurement_sender into place:
    sudo cp ~/ /usr/local/bin/measurement_sender
    sudo chmod 555 /usr/local/bin/measurement_sender

III. Install software dependencies

When installing or upgrading, make sure you have all current software dependencies installed on the system:

sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl perl-Crypt-SSLeay

The monitoring scripts use these packages to:

  • Manage RRD files
  • Write the XML-based API format for the GMOC database
  • Send the formatted data to GMOC via HTTPS

IV. Create required directories and files

These steps only need to be done the first time you install the monitoring software.

  1. Create required directories:
    sudo mkdir -p /var/spool/rrds/$(uname -n) 
    sudo mkdir -p /var/spool/rrds/REPORT
    sudo chown -R <cronuser> /var/spool/rrds
  1. IF uname -n does not report your node's FQDN for whatever reason, create a symlink so that reporting and reading scripts can find your RRD files:
    cd /var/spool/rrds
    sudo ln -s $(uname -n) <fqdn>

V. Test the script

Run the monitoring and submission scripts by hand to make sure they work.

  1. Check the time on your MyPLC server, and make sure it is accurate. The timeseries data reporting format relies on clock accuracy, so your nodes must be running ntpd (or ntpdate regularly out of cron) in order for monitoring to work.
  1. Run the metric-gathering script by hand to make sure it works:
    sudo -u <cronuser> /usr/share/plc_api/plcsh /usr/local/bin/metric_plc
    • This should produce no output
    • After this runs, a number of RRD files should be created in /var/spool/rrds/$(uname -n)
  1. Run the data reporting script by hand to make sure it works:
    sudo -u <cronuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>

VI. Install the scripts to run from cron

This only needs to be done the first time you install the monitoring software.

Add the two scripts to cron: modify the <cronuser> crontab:

sudo -u <cronuser> crontab -e

and add the new lines:

*/1 * * * * /usr/share/plc_api/plcsh /usr/local/bin/metric_plc
*/5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>