My notes on using the TriggerSupervisor monitoring infrastructure
Documentation
Applications using monitoring
Steps performed
- Implemented a class inheriting from
DataSource
(see also sections 6.2.6 ff in the TS 1.5 user guide).
- The items to be monitored are declared in the constructor. There one also declares the callbacks to be called when an item should be (periodically) updated.
- Instantiate this class in the
CellContext
(see e.g. CellContext.cc and the TS users guide section 6.2.8), in our case this is the class TTCMonitoringCellContext
.
(Note: it looks - from the code template of the
CellContext
class - like it is also possible to do perform the same
calls in the class inheriting from
CellContext
, a separate class seems not to be needed).
- Create a flashlist (TS users guide section 6.2.1)
- Add
xmas::sensor::Application
to the configuration file /opt/xdaq/share/base/conf/ttc-mi-monitoring.xml
(copied and adapted from this file and this documentation page).
- One apparently needs also to add
xplore::Application
because otherwise xmas::sensor::Application
complains.
- Make sure that in the
properties
a valid path to a shortcuts.xml
file is specified (e.g. to /opt/xdaq/share/base/xplore/shortcuts.xml
). IT IS IMPORTANT TO PUT THE CORRECT ZONE (e.g. base, not default) IN THIS FILE !
- When starting the ttc monitoring process (on ttc-mi), click on the
xmas::sensor::Application
, then on the Infospaces
tab. There one should see urn:FrequencyMeterSource...
in the drop down menu. This should have an item frequency
.
Configuring xmas::sensor
- Created a sensor file (see also TS users guide section 6.2.2) - is the
xmas::sensor
actually required (looking at the architecture slides of the presentation linked above) ?
- used the following url
${XDAQ_ROOT}/share/${XDAQ_ZONE}/flash/TTCMonitoringCell.flash#urn:xdaq-flashlist:TTCMonitoringCell
in the xlink:href
attribute of the xmas:flash
tag.
- stored it as
/opt/xdaq/share/base/sensor/TTCMonitoringCell.sensor
- It seems IMPORTANT to have a
sensor.sensor
file, (in ${XDAQ_ROOT}/share/${XDAQ_ZONE}/sensor/
). See e.g. this file.
- do NOT use the
autoConfigure
and autoConfSearchPath
tags !
-
- Start the xdaq process and go to the
xmas::sensor::Application
. On the first tab (flashlists), you should see the flashlist in question (urn:xdaq-flashlist:TTCMonitoringCell
in our case).
Configuring ws-eventing
- After about one minute, click on the subscription tab you should see at least one row filled.
Configuring xmas::las
Configuring xmas::store
Configuring the xmas::pulser
- Create a file
/opt/xdaq/share/base/pulser/ttc.pulser
which seems to define the periods with which flashlist (?) should be pulsed
- Add the pulser application to the XDAQ configuration file.
- It looks like in the 'Sensors' tab, one should see subscriptions.
Making flashlists show up in the Triggersupervisor tree on the left
- For this one needs to add a MON channel, see section 6.4.1 of the TS1.5 user guide.
Misc.
- finding the 'locations' of the GT TS zone applications:
slptool -i $(hostname -f) findsrvs service:peer:http '(zone=gtts)'
- Getting a list of the services of these applications:
for i in $(slptool -i $(hostname -f) findsrvs service:peer:http '(zone=gtts)') ; do j=$(echo $i | cut -d, -f1) ; echo -n "$j: " ; slptool -i $(hostname -f) findattrs $j service ; done
If this does not work e.g. not on
ttc-mi
, try restarting the slp daemon using
sudo /etc/init.d/slp restart
Notes from experience mid Februrary 2009
- Q: I don't see the sensor in the pulses application (in the last tab ?)
- A: make sure to have a WS-eventing process running. The pulser seem to look for the WS-Eventing (using SLP) to find the sensor.
- Q: I can't see the quantities of the flashlist
- A: make sure you have the sentinel configured. This is needed to display exceptions raised by the monitoring processes. Also check whether you have the correct types in the .flash file (check e.g. in the triggersupervisor manual the mapping from xdata:: types to the corresponding type specification in the .flash file)
Setup on ttc-mi (as of 2009-05-20)
The above sentinels usually live in
group=exception
.
--
AndreHolzner - 23 Oct 2008