glite-lb-logevent (1) Linux Manual Page
glite-lb-logevent – program for logging events to L&B subsystem
Synopsis
glite-lb-logevent -s Application -e UserTag -j JOBID -c SEQCODE –name NAME –value VALUEDescription
glite-lb-logevent is a low-level program for logging events to the L&B service. It is used internally by WMS components and has many more options, that are not recomend to be used at the user level. At the user level it is supposed to be used only for logging user tag events.Usage
Besides NAME and VALUE of the tag, which are user defined, the user has to specify a valid JOBID, and SEQCODE (L&B event sequence code).The user application is always executed from within a JobWrapper script. The wrapper sets the appropriate JobId in the environment variable EDG_WL_JOBID. The user should pass this value to the -j option of glite-lb-logevent.
Similarly, the wrapper sets an initial value of the event sequence code in the environment variable EDG_WL_SEQUENCE_CODE. If the user application calls glite-lb-logevent just once, it is sufficient to pass this value to the -c option. However, if there are more subsequent calls, the user is responsible for capturing an updated sequence code from the stdout of glite-lb-logevent and using it in subsequent calls. The L&B design requires the sequence codes in order to be able to sort events correctly while not relying on strictly synchronized clocks.
Example
The example bellow is a job consisting of 100 phases. A user tag phase is used to log the phase currently being executed. Subsequently, the user may monitor execution of the job phases as a part of the job status returned by L&B.
#!/bin/sh
for p in `seq 1 100`; do
# log the UserTag event
EDG_WL_SEQUENCE_CODE=`glite-lb-logevent -s Application
-e UserTag
-j $EDG_WL_JOBID -c $EDG_WL_SEQUENCE_CODE
–name=phase –value=$p`
# do the actual computation here
done
