glite-lb-notify (1) - Linux Manuals

glite-lb-notify: Register and receive notification from L&B

NAME

glite-lb-notify - Register and receive notification from L&B

SYNOPSIS

glite-lb-notify
       new [ { -s socket_fd | -a fake_addr } -t requested_validity -j jobid | { -o owner | -O } -n network_server -v virtual_organization -c -J -B -T -E -f flags ]

       bind [ { -s socket_fd | -a fake_addr } -t requested_validity ] notifid

       change notifid jobid

       refresh [ -t requested_validity ] notifid

       receive [ { -s socket_fd | -a fake_addr } -t requested_validity ] [ -i timeout ] [ -r] [ -f field1,field2,... notifid

       drop notifid

       help

DESCRIPTION

glite-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.

USAGE

Common options (mostly)
-t
specifies a requested validity of the notification (in seconds of UNIX Epoch), the server can truncate the value according to its policy.
-a
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
-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 expensive.

 

Subcommands:

new
Create a new notification. Conditions on matching jobs are specified with exacltly one of -j, -o, -n, -v options. If the option -O is used, credentials are retrieved from environment. The -c set matching only on state change. Prints ID of the created notification.

bind

Binds to an existing notification, changing its listener eventually. Useful for debugging purposes mostly.

change

Connect notification with another job.

refresh

Extend validity of an existing notification.

receive

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

Drop the notification from the server, removing all messages on the way eventually.

 

Options for the new subcommand:

-o
match on events for jobs belonging to the given DN.
-O
match on events for jobs belonging to the current user.
-v
match on events for jobs belonging to users from the given VO.
-c
match only if job state has actually changed. Notification messages won't be sent for events that do not trigger job state change.
-S
match only on jobs in certain states listed in a comma-separated list.
-J
pack JDL with the job status structure.
-B
bootstrap -- send past events matching conditions.
-T
match only on reaching a terminal state.
-H
match only on reaching a terminal state and pack all events for that job.
-N
anonymize all owner data in all messages under this registration.

EXAMPLE

Installed with the package as share/examples/glite-lb-notify.pl. Demontstrates using the non-trivial -s option.

BUGS

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

AUTHOR

EU EGEE, JRA1.