|
Testing
XxxMonTools Packages
Introduction
It is the responsibility of subsystem personnel to test and
install the various components in the fast monitoring system. As a
general rule, these components should be tested before they are
installed in the active production system. This document outlines
some of the methods available for testing.
There are three kinds of file installed in the LiveFastMon
self-service area (/nfs/bbr-srv02/bfdist/MonitoringData):
HTML and XML files that control the JAS display. These files
are found in the XxxMonTools/FastMonHTML directory (and sometimes
subdirectories). The install procedure (LiveFastMon-html-install)
copies them to the top-level doc directory, and modifies them by
replacing the string @NAVIGATIONBAR@ with header and footer html
sequences for navigating among the subsystems.
Reference hbook files for both LiveFastMon and IR2LiveL3.
These are stored in the References subdirectory, and installed by
the LiveFastMon-hbook-install script, which merges the hbook files
from individual subsystems into a single reference for LiveFastMon.
Automated monitoring (.cri) files. These are found in the
FastMonAuto subdirectory of the XxxMonTools package. They do not
have to be installed, but are used directly from the package. You
should therefore be aware that checking out a new tag or modifying
one of these files in place will affect automated monitoring the
next time it is restarted.
Adding,
Modifying and Testing LiveFastMon Histograms
If you need to modify or add histograms to fast monitoring, you
must modify the code in the fast monitoring executable (or in the L3
trigger executable in the case of L3T histograms). This code should
be tested or validated prior to use in production. Most of the
subsystems have special applications that are used for testing their
fast monitoring code. It is also possible to run the fast monitoring
code in playback mode on xtc files using the application
FmcFastMonPlaybackApp. A small script to simplify running this
application is under development.
These test applications normally store their histograms in hbook
files. You can examine these hbook files using paw, or any other
tools you may have. If you want to see how they look in JAS, you can
use HbkServerJas.
Testing
HTML and XML
Before you install new html and xml files, you can test them
against the live histograms using the regular jas client with the -s
option giving the pathname of your new files. Just create a test
build containing your modified XxxMonTools package and then run:
RemoteBabarJas3 -s
<build-dir>/XxxMonTools/FastMonHTML/index.html
where <build-dir>
is the full pathname of your test build.
This will look slightly
different than the normal fast monitoring display in that the
navigation bars at the top and bottom of your main page will show
“@NAVIGATIONBAR@” since they have not been replaced by
the install procedure. But otherwise the plots and text on the pages
should look normal.
Once you have tested
your html and xml files, you should install them using either the
self-service
area maintenance GUI or the manual
installation tool. Before you do this, you should advise the DQM
shifter that you are about to install new jas html. Ideally you
should be present in the control room and join the DQM shifter in
examining the resulting pages. Once the install is complete, the new
pages should be visible immediately in jas, although you have to
refresh the current page if that is what you want to see.
Preparing
Reference HBOOK files
Reference histograms are prepared by selecting a good, typical
recent run and extracting the histograms for your subsystem from the
appropriate hbook file for that run. You can find these files at
/nfs/bbr-nfs102/pubfastmon/MonitoringData/OutputArchive/YYYY/MM/LiveFastMon
or the corresponding IR2LiveL3
in the case of L3T. The various subsystems have scripts available for
extracting their histograms and preparing the references.
Naturally you will
examine the histograms in the original file in order to select which
run to use as the reference source. You can also examine the
extracted file prior to merging. For this you can use paw, or any
other tools you have If you want to see them as they would appear in
jas, you can also use HbkServerJas.
When your references are ready, you merge them with the histograms
from the other subsystems using either the self-service
area maintenance GUI or the manual
installation tool. After doing this, you should advise the DQM
shifter to restart the reference servers. This is done using the Fast
Monitoring Control GUI. You click on either the LiveFastMon-ref or
IR2LiveL3-ref button, and select “Restart”. If you are
not sure which one to restart, just do them both. Once you have done
this, the new references will show up immediately in jas. There is no
need to restart jas.
Testing
Automated Monitoring Files
The configuration files for automated fast monitoring are found in
the FastMonAuto subdirectory of the XxxMonTools package. They are
named *.cri. They do not have to be installed, as they are found
directly in the package itself.
There are two test programs available for .cri files. They are
found in the DhpToken package. You will have to check out this
package and build it. One program simply parses the .cri file for
correctness. This is testDhpTokenFile, which takes the .cri file as
its single argument.
The other test program will run a single comparison on two hbook
files, driven by a .cri file. This is testOprComparison, whichis run
like this:
testOprComparison
<test hbook> <ref hbook> <.cri file>
When you are ready to put your .cri files into production, you
simple check out the desired tag of the package, and then restart
automated monitoring, by clicking on the “Restart Fast Mon
Auto” icon on bfo-con05.
HbkServerJas
This tool allows you to view Fast Monitoring histograms from
previous runs in the same format as in live JAS. It starts HbkServer
to serve histograms from an HBOOK file and uses standard reference
servers.
Note: it may take a long time, up to minute or more for
HbkServerJas to start, read all histograms from HBOOK file and
register itself with the CORBA Name Service, so be patient.
Usage:
HbkServerJas [ options ] [-f
<LiveFastMon-hbook-file-name>] [-F <L3-hbook-file-name>]
Example:
HbkServerJas -m bbr-dev101 -N TestHist -S
TestHist-JAS -F L3-hbook-file-name.hbook
Options:
-n <name> HbkServer name in CORBA Name
Service (default HbkServer-LiveFastMon-<host>)
-s <servicename> JAS service name (default
LiveFastMon)
-f <filename> Name of hbook file with
LiveFastMon histograms
-N <L3 name> L3 HbkServer name in CORBA Name
Service (default HbkServer-IR2LiveL3-<host>)
-S <L3 servicename> L3 JAS service name
(default IR2LiveL3)
-F <filename> Name of hbook file with L3
histograms
-c <Ref name> REF HbkServer name in CORBA
Name Service (default HbkServer-LiveFastMon-ref-<host>)
-j <servicename> REF JAS service name
(default LiveFastMon-ref)
-r <Ref filename> Name of hbook file with
reference LiveFastMon histograms
-C <Ref L3 name> REF L3 HbkServer name in
CORBA Name Service (default HbkServer-IR2LiveL3-ref-<host>)
-J <Ref L3 servicename> REF L3 JAS service
name (default IR2LiveL3-ref)
-R <Ref L3 filename> Name of hbook file
with reference IR2LiveL3 histograms
-h (help) print help message
-m <machine> host where to run HbkServer and
JasInterfaceServer (default bbr-dev100)
-T <timeout> delay between starting
JasInterfaceServer and JAS (in seconds; default 20)
|