PBS Monitoring
An overview on the install and operation of the Nebraska PBS Monitoring
Prerequisites
We make the following assumptions:- There is a MySQL database server available where you can create a new database. Call it dbhost.cern.ch
- A host which has access to the PBS log files. Call it logshost.cern.ch
- A host (not necessarily the same as above) which can act as a web server. Call it webserver.cern.ch
- A host (not necessarily the same as above) which has access to the GUMS database on gumshost.cern.ch and the PBS database on dbhost.cern.ch. Call it gumsupload.cern.ch
Throughout the installation process, we will reference the example server names to help you make sure you are performing the correct operation on the correct host.
Installation
The PBS monitoring application is installed through YUM/RPM. The YUM repository install is documented here. Installation becomes very simple:
yum install PBSMon
For the example servers listed previously, you will need to install the RPM on logshost, gumsupload, and webserver.
Database Setup
This section assumes you have a blank MySQL database (with authentication) set up on dbhost.cern.ch, ready to have a new database named "pbs"
After the PBSMon RPM is installed, the necessary MySQL schema can be loaded as follows:
mysql [root login options] < /usr/share/PBSMon/pbs_schema
Configuration files
/etc/pbs.cfg
An example config file is found in /etc/sample_pbs.cfg. Copy this to /etc/pbs.cfg, and make the following changes:- In the section [pbs_database], fill in the passwd, host, user, and port. The database name must be called "pbs", so that is not an option.
- In [pbs_server] and [pbs_accounting], fill in the log_dir option with the path to the correct PBS log directory.
/etc/pbsweb.cfg
This one is very simple - change server.socket_host to the hostname of your webserver. This only needs to be changed on the web-server component (webserver)./etc/DBParam.xml
An example config file is found in /etc/SampleDBParam.xml. Copy this to /etc/DBParam.xml. This is the GraphTool-formatted database login information. The PBSDB connection must be filled out on gumsupload and webserver, while the GumsDB connection must be filled out on the gumsupload host only. The loghost does not need to have this config file.
/etc/cron.d/pbs.cron
This file contains two cron entries - one for the PBS logs upload (runs very often) and one for the GUMS database upload (runs only once a day). Comment out any lines which do not apply - i.e., if gumsupload and loghost are two difference machines, comment out pbs_upload line on gumsupload and comment out the gums_upload line on loghost.
BUG REPORT: In release 0.1-2, pbs.cron was installed with the wrong permissions. Please run the following command to make the cron command work:chmod a-x /etc/cron.d/pbs.cron
Starting up the web service
You can ask the web service to be automatically started on boot:
chkconfig --level 345 PBSWeb on
You can also start it manually:
service PBSWeb start
To have it not daemonize immediately, you can start things by hand:pbs_webThis is often helpful when debugging
Using the web service
The web service starts up on port 8088 on the web server. You can find the PBS plots in /pbsmon/xml. For example, these are the Nebraska plots:
http://osg-test3.unl.edu/pbsmon/xml/
Note that you might have to set up a redirect on the site's apache server in order to get apache to host the content. This is the entry Nebraska has in it's httpd.conf:
<VirtualHost *:80>
ServerAlias osg-test3.unl.edu
ServerAdmin webmaster@example.org
ServerSignature On
CustomLog /var/log/httpd/cms-access.log combined
ErrorLog /var/log/httpd/cms-error.log
LogLevel warn
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/gratia/(.*) http://localhost:8100/gratia/$1 [L,P]
RewriteRule ^/pbsmon/(.*) http://localhost:8088/pbsmon/$1 [L,P]
</IfModule>
</VirtualHost>
If you do have to use Apache, don't forget to reload the service afterward.