glite-lb-notify (1) - Linux Man Pages
glite-lb-notify: Register and receive notification from L&B
DESCRIPTIONglite-lb-notify is a fairly simple wrapper on the L&B notification API. It allows to create a notification (with a restricted richness of specifying conditions), bind to it for receiving notifications, and drop it finally.
L&B notification is a user-initiated trigger at the server. Whenever a job enters a state matching conditions specified with the notification, the current state of the job is sent to the notification client. On the other hand, the notification client is a network listener which receives server-initiated connections to get the notifications. Unless -s is specified, the notification library creates the listener socket.
Within the notification validity, clients can disappear and even migrate. However, only a single active client for a notification is allowed.
This command is intended to be used in user scripts, graphical tools etc. where direct access to the API is difficult.
L&B server and port to contact is specified with GLITE_WMS_NOTIF_SERVER environment variable.
USAGECommon options (mostly)
- specifies a requested validity of the notification (in seconds of UNIX Epoch), the server can truncate the value according to its policy.
- allows to specify a fake listener address to register with the notification, i.e. to overcome firewalls etc. When notifications are delivered, the server tries to connect to this address rather than the true address of the listening socket. Requires re-binding therefore it can't be used in conjunction with -s
allows to pass a opened listening socket (filedescriptor number), see EXAMPLE bellow.
In this case there is no need to re-bind the notification
(it is assumed the socket is recycled)
This is critical for a real usage, as the re-bind operation is rather
Create a new notification. Conditions on matching jobs are specified
with exacltly one of
options. If the option
is used, credentials are retrieved from environment. The
set matching only on state change.
Prints ID of the created notification.
Binds to an existing notification, changing its listener eventually. Useful for debugging purposes mostly.
Connect notification with another job.
Extend validity of an existing notification.
Bind to an existing notification, and start waiting for an incoming event, at most the time specified with -i (seconds). -r attempts to refresh the notification handle in 1/2 of current validity. -f allows to specify a custom list of fields of the job status to display. Run glite-lb-notify to get list of available fields.
Drop the notification from the server, removing all messages on the way eventually.
Options for the new subcommand:
- match on events for jobs belonging to the given DN.
- match on events for jobs belonging to the current user.
- match on events for jobs belonging to users from the given VO.
- match only if job state has actually changed. Notification messages won't be sent for events that do not trigger job state change.
- match only on jobs in certain states listed in a comma-separated list.
- pack JDL with the job status structure.
- bootstrap -- send past events matching conditions.
- match only on reaching a terminal state.
- match only on reaching a terminal state and pack all events for that job.
anonymize all owner data in all messages under this registration.
EXAMPLEInstalled with the package as share/examples/glite-lb-notify.pl. Demontstrates using the non-trivial -s option.
BUGSPlease report all bugs to CESNET gLite L&B issue tracker available at https://github.com/CESNET/glite-lb/issues
AUTHOREU EGEE, JRA1.