-include Makefile.inc
-VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples
+VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/doc
AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
GENSAM=${top_srcdir}/examples/gen_sample_job
EXAMPLES:=log_usertag_proxy job_log job_reg feed_shark notify query_ext query_seq_code stats abort_job
FAKE_EXAMPLES:=job_log_fake
+MAN_GZ:=glite-lb-logevent.1.gz
+MAN = $(MAN_GZ:.gz=)
+
version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :`
${LIB}: ${LIBOBJS}
logevent_fake.o: logevent.c
${COMPILE} ${GLOBUSINC} -c $< -o $@
+${MAN_GZ}: ${MAN}
+ cp $? .
+ gzip $(notdir $?)
+
+
# catches $TOOLS and logevent compilation
%.o: %.c
${CC} ${CFLAGS} ${GLOBUSINC} -c $<
default: all
-compile all: check_version ${LIB} ${THRLIB} ${TOOLS} logevent ${PLUSLIB} ${THRPLUSLIB} examples
+compile all: check_version ${LIB} ${THRLIB} ${TOOLS} logevent ${PLUSLIB} ${THRPLUSLIB} examples ${MAN_GZ}
examples: ${EXAMPLES} ${sh_PROGS}
producer_test.o: %.o: %.cpp
${CXX} -c ${CXXFLAGS} ${TEST_INC} ${GLOBUSINC} $<
+
+man: ${MAN_GZ}
-stage: compile ${FAKELIB} ${FAKETHRLIB}
+stage: compile ${FAKELIB} ${FAKETHRLIB}
$(MAKE) install PREFIX=${stagedir}
${INSTALL} -m 644 ${FAKELIB} ${FAKETHRLIB} ${stagedir}/lib
mkdir -p ${PREFIX}/bin
mkdir -p ${PREFIX}/lib
mkdir -p ${PREFIX}/share/doc/${package}-${version}
+ mkdir -p ${PREFIX}/share/man/man1
${INSTALL} -m 644 ${LIB} ${THRLIB} ${PLUSLIB} ${THRPLUSLIB} ${PREFIX}/lib
${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
${INSTALL} -m 644 ${top_srcdir}/doc/README-fake ${top_srcdir}/doc/README-notify ${PREFIX}/share/doc/${package}-${version}
for p in ${TOOLS} logevent ${EXAMPLES} ${sh_PROGS}; do \
${INSTALL} -m 755 "$$p" "${PREFIX}/examples/glite-lb-$$p"; \
done
+ ${INSTALL} -m 644 ${MAN_GZ} ${PREFIX}/share/man/man1
clean:
--- /dev/null
+.TH GLITE-LB-LOGEV 1 "May 2003" "EU EGEE Project" "Logging&Bookkeeping"
+
+.SH NAME
+glite-lb-logev - program for logging events to L&B subsystem
+
+.SH SYNOPSIS
+.B glite-lb-logev
+.B -s Application -e UserTag
+.B -j
+.I JOBID
+.B -c
+.I SEQCODE
+.B --name
+.I NAME
+.B --value
+.I VALUE
+.br
+
+.SH DESCRIPTION
+.B glite-lb-logev
+is a low-level program for logging events to the L&B service.
+It is used internally by WMS components.
+At the user level it is supposed to be used only for logging user tag events and changing job ACL's in L&B enventually.
+
+.SH USAGE
+Besides
+.I NAME
+and
+.I VALUE
+of the tag, which are user defined, the user has to specify a valid
+.I JOBID\fR,\fP
+and
+.I SEQCODE
+(L&B event sequence code).
+
+The user application is always executed from within a
+.I 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
+.B edg-wl-logev.
+
+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
+.B edg-wl-logev
+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
+.B stdout
+of
+.B edg-wl-logev
+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.
+
+.SH EXAMPLE
+The example bellow is a job consisting of 100 phases.
+A user tag
+.I 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.
+
+.nf
+#!/bin/sh
+
+for p in `seq 1 100`; do
+
+ # log the UserTag event
+ EDG_WL_SEQUENCE_CODE=`edg-wl-logev -s Application
+ -e UserTag
+ -j $EDG_WL_JOBID -c $EDG_WL_SEQUENCE_CODE
+ --name=phase --value=$p`
+
+ # do the actual computation here
+done
+
+.fi
+
+
+
+.SH OTHER OPTIONS
+See command line help (edg-wl-logev -h) for extensive help on all options.
+However, GLITE users should follow the usage shown in SYNOPSIS strictly.
+Logging other events may confuse the L&B service and cause wrong job status
+information to be reported.
+
+.SH FILES
+No configuration files needed.
+
+.SH REPORTING BUGS
+Please, report all bugs to EU EGEE Bug Tracking System located at https://savannah.cern.ch/bugs/?func=additem&group=jra1mdw
+
+.SH SEE ALSO
+.B edg-wl-bkserver\fR(8),\fP edg-wl-interlogd\fR(8),\fP edg-wl-logd\fR(8)
+
+L&B API Reference, DataGrid-01-TED-0139
+
+.SH AUTHOR
+EU DataGrid Work Package 1, CESNET group.