This the SARA port of the ROCKS PBS monitor software. In the distribution
there are two software packages:
  1) The queue (OPENPBS/TORQUE) monitor software. 
  2) The queue web interface software.


The queue monitor software
========================

This software requires the pbs python module (at least version 2.7). The
latest version can be downloaded from:
   ftp://ftp.sara.nl/pub/outgoing/pbs_python.tar.gz

Just execute pbs_stat.py on a node that belong to the cluster. Default
it is in debug mode. So you will see output like this:
 cmd> ./pbs_stat.py
 domain=test.sara.nl mtime=1053962607 name=testje=Q user=bastiaan
 /usr/bin/gmetric -npbs-job-591 -v"domain=test.sara.nl mtime=1053962607 name=testje state=Q user=bastiaan" -tstring -p8649 -x15
 .....
 cmd>

You can adjust all kind of settings. There are two ways to a complish this:

  1) With command line options:
        pbs_stat.py -h|--help

  2) Edit pbs_stat.py and search for 'if __name__ == "__main__"'
      port)      On which port we must send the data, default : 8649
      interface) Which interface must we use, default: let gmetric decide
      debug)     Verbose output, default: no
      gmetric)   Where is gmetric located, default: /usr/bin/gmetric
      interval)  How may seconds must we wait for the next run, default : 25
      domain)    Set domainname, default: Let the program decides 

     Copy the edited 'pbs_stat.py' to <some_directory>
     
Now there are two ways to run the program:
  Cron)   : pbs_stat.py cron
            vi /etc/crontab
              */1 *   * * *   root <some_directory>/pbs_stat.py [options] cron

  Daemon) : <some_directory>/pbs_stat.py [options] daemon
            In the client directory there is an example init.d script called 
	    'pbs_monitor'.

The queue web interface software.
===============================

The following steps are required to setup the queue web interface:
  a) cd web/<version_of_ganglia_webfrontend>
       - 2.5.3
       - 2.5.4 (also for 2.5.5)

  b) Copy the directory 'sara_rocks' to <ganglia_web_interface>/addons 

  c) Copy the directory templates/Sara_Rocks to 
     <ganglia_web_interface>/templates

  d) edit <ganglia_web_interface>/conf.php:
      -) change the template name to: 
            $template_name = "Sara_Rocks";
      -) Added at the end:
            #
	    # Some default variables for pbs
	    #
	    $PBS_CLUSTERS;
	    $PBS_CLUSTERS["Yellow Cluster"] = Array("XXX.XXX.XXX.XXX", "8649");
	    $PBS_CLUSTERS["Red Cluster"] = Array("XXX.XXX.XXX.XXX", "8749");

         Note: The cluster name and IP-address must be the same has the 
	       'data_source' statement in /etc/gmetad.conf. Only now we have 
	       to fill IP-number instead of hostname. 

Have suggestions or bugs mail them to:	
	Bas van der Vlies <basv@sara.nl>
	http://www.sara.nl/index_eng.html for more info about SARA
