Skip to content

Commit

Permalink
Manual pages for glite-lb-logger messaging plugin tools, enable gener…
Browse files Browse the repository at this point in the history
…ating from perl Pod.
  • Loading branch information
valtri committed Jun 30, 2014
1 parent dbcd6fc commit b92e20c
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 13 deletions.
16 changes: 14 additions & 2 deletions org.glite.lb.logger-msg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ VPATH:=${top_srcdir}/src:${top_srcdir}/interface:${top_srcdir}/test:${top_srcdir

SOURCES=\
config/msg.* \
doc/*.8 \
examples/*.cpp \
project/il.conf \
src/*.cpp src/msg-* \
Expand Down Expand Up @@ -70,6 +71,8 @@ SOLINK:=libtool --mode=link ${CXX} -module ${LDFLAGS} -rpath ${stagedir}${prefix
HDRS:=
MAN8:=glite-lb-msg-brokers.8 glite-lb-msg-config.8
COMMON_LIB:=
EXT_LIB:=${ACTIVEMQ_CPP_LIBS}
Expand All @@ -93,7 +96,9 @@ endif
sysdefaultdir?=${sysconfdir}/default
all compile: ${PLUGIN_LIB} ${EXAMPLES} ${SCRIPTS}
all: man compile
compile: ${PLUGIN_LIB} ${EXAMPLES} ${SCRIPTS}
${PLUGIN_LIB}: ${PLUGIN_LOBJS}
${SOLINK} -o $@ ${PLUGIN_LOBJS} ${EXT_LIB} -lglite_lb_common${default_flavour} -lglite_jobid -lglite_lbu_log
Expand All @@ -104,7 +109,7 @@ ${PLUGIN_LIB}: ${PLUGIN_LOBJS}
glite-lb-cmsclient: cmsclient.o
$(CXX) $< ${EXT_LIB} -o $@
man: ${MAN_GZ}
man: glite-lb-msg-brokers.8
stage: compile
$(MAKE) install PREFIX=${stagedir}
Expand All @@ -123,12 +128,14 @@ install:
-mkdir -p ${DESTDIR}${PREFIX}${prefix}/sbin
-mkdir -p ${DESTDIR}${PREFIX}${sysconfdir}/glite-lb
-mkdir -p ${DESTDIR}${PREFIX}${sysconfdir}/cron.d
-mkdir -p ${DESTDIR}${PREFIX}${prefix}/share/man/man8
${INSTALL} -m 644 ${top_srcdir}/config/msg.conf.example ${DESTDIR}${PREFIX}${docdir}
${INSTALL} -m 755 ${PLUGIN_LIB} ${DESTDIR}${PREFIX}${prefix}/${libdir}
${INSTALL} -m 755 ${EXAMPLES} ${DESTDIR}${PREFIX}${prefix}/${libdir}/glite-lb/examples
${INSTALL} -m 755 ${top_srcdir}/src/msg-brokers ${DESTDIR}${PREFIX}${prefix}/sbin/glite-lb-msg-brokers
${INSTALL} -m 755 msg-config.new ${DESTDIR}${PREFIX}${prefix}/sbin/glite-lb-msg-config
${INSTALL} -m 644 msg.cron.new ${DESTDIR}${PREFIX}${sysconfdir}/cron.d/glite-lb-logger-msg
${INSTALL} -m 644 glite-lb-msg-brokers.8 ${top_srcdir}/doc/*.8 ${DESTDIR}${PREFIX}${prefix}/share/man/man8
%.lo %.o: %.cpp
${COMPILEXX} -c $< -o $@
Expand All @@ -139,8 +146,13 @@ install:
clean:
rm -rvf .libs/ *.o *.lo ${PLUGIN_LIB} ${MAN_GZ} ${EXAMPLES} ${SCRIPTS}
rm -rvf dist ${package}-*.tar.gz
rm -fv glite-lb-msg-brokers.8
distclean:
rm -rvf project/changelog Makefile.inc *.spec debian/
glite-lb-msg-brokers.8: msg-brokers
perldoc -M Pod::Man $< > $@
sed -i 's/^\.TH.*/.TH GLITE-LB-MSG-BROKERS 8 "June 2014" "CESNET" "Logging\&Bookkeeping"/' $@
.PHONY: default all compile man stage check install clean dist distclean distcheck
53 changes: 53 additions & 0 deletions org.glite.lb.logger-msg/doc/glite-lb-msg-config.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.TH GLITE_LB_MSG_CONFIG 8 "June 2014" "CESNET" "Logging&Bookkeeping"


.SH NAME
glite-lb-msg-config - glite-lb-logger messaging plugin configuration generator


.SH SYNOPSIS
\fBglite-lb-msg-config\fR \fITEMPLATE\fR [\fITARGET\fR]


.SH DESCRIPTION
\fBglite-lb-msg-config\fR is a script for generating or updating glite-lb-logger messaging plugin configuration. Configuration parameters can be specified by environment variables. \fITEMPLATE\fR is the original configuration file, basic content is generated in case the original doesn't exist. \fITARGET\fR is the target configuration file. If \fITARGET\fR is not specified, the \fITEMPLATE\fR is modified instead.

This script is intended primarily to be run by cron, but can be run manually by site admins to avoid waiting for the next cron cycle.


.SH ENVIRONMENT

.TP
.B GLITE_LOCATION \fR[prefix]
Standard prefix (typically /usr).

.TP
.B GLITE_LB_MSG_BROKER \fR[]
The special values are: \fBfalse\fR (do nothing), \fBauto\fR (refresh messaging brokers from BDII), \fBonce\fR (refresh messaging brokers only when \fB$GLITE_LB_SETUP\fR is not set). Empty value means \fBauto\fR, any other values means broker URL list.

For refreshing messaging brokers the \fBglite-lb-msg-brokers\fR(8) utility is called.

.TP
.B GLITE_LB_MSG_NETWORK \fR[PROD]
Let \fBglite-lb-msg-brokers\fR(8) search only in specified network. Typical values are PROD or TEST-NWOB.

.TP
.B LCG_GFAL_INFOSYS \fR[lcg-bdii.cern.ch:2170]
\fIhost\fR[:\fIport\fR] of the BDII server.

.TP
.B GLITE_LB_SETUP \fR[]
Helper variable. It should be set, when this configuration generator is called during setup stage (when \fBonce\fR value in \fB$GLITE_LB_MSG_BROKER\fR should trigger BDII search).


.SH BUGS
Please report all bugs to CESNET gLite L&B issue tracker available at
.I https://github.com/CESNET/glite-lb/issues


.SH AUTHORS
L&B Product Team, CESNET.


.SH SEE ALSO
\fBglite-lb-msg-brokers\fR(8)
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ etc/cron.d/*
usr/lib/activemq_cpp_plugin.so*
usr/lib/glite-lb/examples/*
usr/sbin/glite-lb-msg-*
usr/share/man/man8/*
5 changes: 5 additions & 0 deletions org.glite.lb.logger-msg/project/glite-lb-logger-msg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ BuildRequires: glite-lbjp-common-log-devel
BuildRequires: glite-lbjp-common-trio-devel
BuildRequires: libtool
BuildRequires: perl
%if 0%{?rhel} >= 7 || 0%{?fedora}
BuildRequires: perl-Pod-Perldoc
%endif
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Pod::Man)
BuildRequires: perl(POSIX)
BuildRequires: pkgconfig
Requires: crontabs
Expand Down Expand Up @@ -70,6 +74,7 @@ rm -rf %{buildroot}
%{_libdir}/activemq_cpp_plugin.so.0.0.0
%{_libdir}/glite-lb/examples/glite-lb-cmsclient
%{_sbindir}/glite-lb-msg-*
%{_mandir}/man8/*.8*


%changelog
Expand Down
37 changes: 26 additions & 11 deletions org.glite.lb.logger-msg/src/msg-brokers
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#+##############################################################################
# #
# File: msg-brokers #
# File: glite-lb-msg-brokers #
# #
# Description: manipulate messaging brokers information #
# #
Expand Down Expand Up @@ -274,17 +274,15 @@ __END__
=head1 NAME
msg-brokers - manipulate messaging brokers information
glite-lb-msg-brokers - manipulate messaging brokers information
=head1 SYNOPSIS
B<msg-brokers> [I<OPTIONS>] B<find>|B<list>
B<glite-lb-msg-brokers> [I<OPTIONS>] B<find>|B<list>
=head1 DESCRIPTION
B<msg-brokers> has three different modes of operation. In all cases,
it manipulates information about messaging brokers and reports a
(possibly empty) list of broker URIs, one per line.
B<glite-lb-msg-brokers> has two different modes of operation. In all cases, it manipulates information about messaging brokers and reports a (possibly empty) list of broker URIs, one per line.
=over
Expand Down Expand Up @@ -336,22 +334,39 @@ show the complete man page
=item B<--network> I<string>
consider only the brokers for this network
consider only the brokers for this network (for example PROD or TEST-NWOB)
=item B<--quiet>, B<-q>
supress the printing of warnings
suppress the printing of warnings
=item B<--sort>, B<-s>
sort the brokers per elapsed time to perform the test
=back
=head1 SEE ALSO
=head1 ENVIRONMENT
L<Net::STOMP::Client>
=over
=item B<LCG_GFAL_INFOSYS>
I<host>[:I<port>] of the BDII to contact
=back
=head1 AUTHOR
=head1 BUGS
Please report all bugs to CESNET gLite L&B issue tracker available at
I<https://github.com/CESNET/glite-lb/issues>
=head1 AUTHORS
Lionel Cons L<http://cern.ch/lionel.cons>
L&B Product Team, CESNET L<http://cesnet.cz>
=head1 SEE ALSO
L<Net::STOMP::Client>

0 comments on commit b92e20c

Please sign in to comment.