=======================================================================

This is the OLD job monitoring software use:
 * ftp://ftp.sara.nl/pub/outgoing/ganglia_jobmonarch.tar.gz 

========================================================================

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.4). 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>

NOTE for gmetric version 3.0.1 and higher you must edit /etc/gmond.conf and
invoke pbs_stat.py with the -n/--new option.

-----------------------------------------------------------------------------

You must install it on one node that belongs to the cluster. There are two 
ways to run this 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'. This script uses config file where you can specify
	    some settings (/etc/default/pbs_monitor)

TIP:
 Do not forget to include the hostname/ip-address in the 'trusted_hosts' 
 section of 'gmond.conf'. Else nothing will be displayed on the ganglia 
 pages.

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, 2.5.6 and 2.5.7)

  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
