Events
Every change in the trace is recorded as an event, which is then sent to all clients that subscribe to them.
To attach to the event stream use
vtk_event_control START
The client implicitly subscribes to all events. Each event can be retrieved with a
call
to
vtk_event_get $timeout eventDesc
# Example to show which fields are available
parray eventDesc
eventDesc(auxid) = 1094842
eventDesc(auxstatus) = 0
eventDesc(description) =
eventDesc(id) = 473865
eventDesc(priority) = 0
eventDesc(subject) = NODE
eventDesc(verb) = CONNECT
eventDesc(x) = 1094842
eventDesc(y) = 0
Each event is characterized primarily by a 'subject' and a 'verb'.
In order to reduce network traffic, a client application may subscribe to a subset
of the events by adding filters. This is done with
vtk_eventfilter_append $subjectList $verbList
For example, to receive only the events that have to do with jobs that start, you
would call
vtk_eventfilter_append "JOB" "START"
To keep the GUI up to date, all events are streamed asynchronously from the VOV server to the GUI. It is possible for a GUI to be slow with respect to the stream of events, causing some internal buffers to overflow. In such case, the VOV server generates an overflow event and stops sending events to the slow client until the client has caught up.
For more information on handling the events, please refer to the documentation for the vtk_event* procedures.
Monitor Events with voveventmon
An easy way to look at the event stream is with the utility
voveventmon.
voveventmon: Usage Message
DESCRIPTION:
voveventmon -- A utility to show the event stream
Feel free to look at the source to
learn how you can yourself tap into
the event stream.
This utility is also used in vovresourced to allow
asynchronous update of the resourcemap information
as soon as LicenseMonitor has new information.
USAGE:
% voveventmon [OPTIONS]
OPTIONS:
-h This help
-f <subjects> <verbs>
-filter <subjects> <verbs>
Define a filter for events.
For definitions of <subjects> and <verbs>
please refer to on-line documentation.
-m <N>
-maxevents <N> Max number of events to show
Default is 1000.
For unlimited events, set <N> to 0.
-n <N> Same as -m
-s <bool> If set, show event statistics
-t <S>
-timeout <S> Default is 10.
-host <HOST> Host name override.
-port <PORT> Port name override.
-project <PROJECT> Project name override.
FOR TESTING ONLY:
-d <DELAY_IN_MS> Add a delay after processing each event.
EXAMPLES:
% voveventmon -- Show 1000
% voveventmon -m 0 -- Unlimited events
% voveventmon -f FILE INFORM
% voveventmon -f LICDAEMON ALL
Here is some example output:
% voveventmon
1 NODE CONNECT 02709649 1132452736 {746499}
2 NODE CHANGE 00746499 1132452736 {\"RUNNING\"}
3 NODE CONNECT 00745066 1132452736 {2709649}
4 NODE CONNECT 02709649 1132452736 {746500}
5 NODE CHANGE 00746500 1132452736 {\"RUNNING\"}
6 NODE CONNECT 02709649 1132452736 {746501}
7 NODE CHANGE 00746501 1132452736 {\"RUNNING\"}
8 NODESET DETACH 02699306 1132452737 {2709643 0 9}
9 NODESET DETACH 02699306 1132452737 {2709646 0 9}
10 NODE CONNECT 02709649 1132452737 {746502}
...
% voveventmon -f LICDAEMON CHANGE
...