Installing the Globus Usage Packet Receiver
Globus Toolkit components (GridFTP, etc) are configured by default to send out UDP packets logging their activity. We have written a simple receiver which listens for these packets and records them to a database. This receiver is not included as part of the Globus Toolkit 4 distribution, but is available from Globus via anonymous CVS. This document describes how to install and run the receiver on a host of your choice, should you wish to record usage statistics.
- An SQL database installation. SQL batch files are included for PostgreSQL and MySQL. Other databases may require slight modifications to these files; check your database documentation. You will also need a JDBC (Java DataBase Connection) .jar file for your database; most database vendors make these available on their websites.
- The Globus Toolkit 4. Only the Java WS Core component is needed, so you can get away with just installing that if you don't want to do the full installation on the host which will be listening. See the main Globus install documentation. After installation, make sure that the environment variable GLOBUS_LOCATION is set to the directory where globus is installed.
cd $GLOBUS_LOCATION cvs -d:pserver:firstname.lastname@example.org:/home/globdev/CVS/globus-packages co usage/java
- First edit the receiver.properties file. This is located at
$GLOBUS_LOCATION/usage/java/receiver/samples/etc/receiver.propertiesThe fields you must change are database-driver and database-url. database-driver should be set to the class name of the JDBC driver for your database: for example, "org.gjt.mm.mysql.Driver" for MySQL or "org.postgresql.Driver" for PostgreSQL. See your database documentation. database-url should be set to the location where your database server is running. It should be of the form
jdbc:vendor://host:port/database?user=username?password=passwdSee your database vendor's documentation for more information. Note that the password will be sent in cleartext, so don't use an important one.
- Make sure that your jdbc .jar file is in a location where globus can find it: copy it into $GLOBUS_LOCATION/lib/.
- Create a database called guss on your database server to store the usage data. The syntax for creating a database is vendor-specific.
- Finally, to create tables with the correct schema within the guss database,
run one of the SQL batch files. These are in
$GLOBUS_LOCATION/usage/java/receiver/samples/etc/There is an SQL batch file for PostgreSQL and one for MySQL. Other databases may differs slightly in their syntax for creating tables, so you may need to modify one of these files.
cd $GLOBUS_LOCATION/usage/java ant
Finally, to start the receiver, type:
The receiver will now start up (blocking the terminal) and begin listening on the port specified in receiver.properties (4810 by default). It will record to the database all the usage packets that it receives.
Remember, the Globus Toolkit components you are interested in must be configured to send their usage packets to the host where the receiver is running. A component can be configured to send usage packets to multiple hosts simply by listing all of the hostnames, separated by spaces, on one line of the appropriate properties file. For more information, see the documentation for the individual components.