Instrumenting GridFTP 2.0 with NetLogger 2.0.13

____________________________________________________________________________________________________________________________

______________________________________________________________________________________________________________________________

 

Important note: Part of the material presented here was provided by Brian Tierney from Lawrence Berkeley National Laboratory.

 

Downloads:

For Globus Toolkit version 2.0 (the software package that includes GridFTP 2.0) and NetLogger 2.0.13, the instrumentation should be fairly simple: just download the following files from the NetLogger website:

 

Files to be replaced in the Globus software:

Replace the following files from the Globus Data-Management Client and Server bundles with the corresponding downloaded files:

The downloaded files are exactly the same as those found in the original Globus software, only difference being in the downloaded files, BT_NETLOGGER_HACK is defined with some extra code to instrument NetLogger with GridFTP.

 

Updating Makefiles:

If NetLogger is installed in the /opt/netlogger directory, then NetLogger include files can be found in the directory /opt/netlogger/build/include.

Update Makefile.am in the following directories:

 directory to include netlogger includes and netlogger libraries. This can be done by adding the following code in Makefile.am:

NETLOGGER_DIR=/opt/netlogger/build/include/
NETLOGGER_INCLUDES=\
$(NETLOGGER_DIR)/NetLogger.h\
$(NETLOGGER_DIR)/netlogger.h\
$(NETLOGGER_DIR)/nl.h\
$(NETLOGGER_DIR)/all_the_other_netloggerinclude_files_in_this_directory


NETLOGGER_LIBS=/opt/netlogger/build/lib/libnetlogger.a

INCLUDES = $(GPT_INCLUDES) $(NETLOGGER_INCLUDES)


libglobus_io___GLOBUS_FLAVOR_NAME__la_LIBADD = @GPT_LIB_LINKS@ $(NETLOGGER_LIBS)

 

 

Script xinetd:

Save the previously downloaded in.ftpd-wrapper in the directory:

/usr/local/sbin/

in.ftpd-wrapper looks like:

#!/bin/bash
GLOBUS_LOCATION=/opt/datatag_globus
NETLOGGER_LOCATION=/opt/netlogger/
LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib:$NETLOGGER_LOCATION/lib
export GLOBUS_LOCATION LD_LIBRARY_PATH
#
# Note: -Z option is the standard Globus option to generate 1 summary netlogger message
# for each transfer
#
# to turn on detailed NetLogger instrumentation, do the following:
NETLOGGER_ON=1
NETLOGGER_DEST=file:///tmp/netlogger.log
export NETLOGGER_ON NETLOGGER_DEST
#
($GLOBUS_LOCATION/sbin/in.ftpd -l -a -Z /var/log/gsiftpd-nl.log) 2>> /tmp/ftp.$$.nl.log
 

Note: Make sure that GLOBUS_LOCATION and NETLOGGER_LOCATION have the correct parameters.

In the directory /etc/xinetd.d create a file called gsiftp and script:

# default: on
service gsiftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/local/sbin/in.ftpd-wrapper
}

 

Then restart xinetd. To do so, log in as root by:

> su -

and then run the following command:

> service xinetd restart