bpost

Sends external status messages and attaches data files to a job.

Synopsis

bpost [-i message_index] [-d "description" [-N INFO | WARNING | ERROR | CRITICAL]] [-a data_file] job_ID | "job_ID[index]" | -J job_name
bpost [-h | -V]

Description

Provides external status information or sends data to a job in the system.

By default, operates on the message index 0. By default, posts the message "no description".

If you specify a job ID, the bpost command has the following restrictions:
  • You can send messages and data only to your own jobs.
  • You cannot send messages and data to jobs submitted by other users.
  • Only root and LSF administrators can send messages to jobs submitted by other users.
  • Root and LSF administrators cannot attach data files to jobs submitted by other users.
Job names are not unique. If you specify the -J job_name option, the bpost command has the following restrictions:
  • You can send messages and data only to your own jobs.
  • You cannot send messages and data to jobs submitted by other users.
  • Root and the LSF administrators can send messages and data only to their own jobs.

A job can accept messages until it is cleaned from the system. If your application requires transfer of data from one job to another, use the -a option of the bpost command to attach a data file to the job. Then, use the bread command to copy the attachment to another file.

You can associate several messages and attached data files with the same job. As the job is processed, use the bread or bstatus command to retrieve the messages posted to the job. Use the bread to copy message attachments to external files.

For example, your application might require job status descriptions besides the ones that LSF provides internally (PEND, RUN, SUSP). Use the -d option to place your own status or job description text as a message to the job.

You can also use bstatus -d command to update the external job status. The following command
bstatus -d "description" myjob

Is equivalent to the following command:

bpost -i 0 -d "description" myjob

With LSF multicluster capability, both clusters must run LSF Version 7 or later. You cannot attach files to LSF multicluster capability jobs.

If the LSF multicluster capability connection is lost (the mbatchd daemon is down), messages can be saved and resent when the connection is recovered. The messages are backed up on the local cluster and resent in their original order.

Options

-a data_file
Attaches the specified data file to the job external storage. This option is ignored for LSF multicluster capability jobs; you can attach a file only if the job runs in the local cluster.

Use the JOB_ATTA_DIR parameter in the lsb.params file to specify the directory where attachment data files are saved. The directory must have at least 1 MB of free space. The mbatchd daemon checks for available space in the job attachment directory before it transfers the file.

Use the MAX_JOB_ATTA_SIZE parameter in the lsb.params file to set a maximum size for job message attachments.

-d "description"
Places your own status text as a message to the job. The message description has a maximum length of 512 characters.

For example, your application might require job status descriptions besides the ones that LSF provides internally (PEND, RUN, SUSP).

The default description is "no description".

-i message_index
Operates on the specified message index.

The default message index is 0.

Use the MAX_JOB_MSG_NUM parameter in the lsb.params file to set a maximum number of messages for a job. With LSF multicluster capability, to avoid conflicts, the MAX_JOB_MSG_NUM parameter must be the same in all clusters.

-N INFO | WARNING | ERROR | CRITICAL
Sends a message (from the -d option) at the specified notification level to LSF Application Center Notifications as specified by the LSF_AC_PNC_URL parameter in the lsf.conf file. The length of a notification must be less than 1024 bytes, otherwise LSF truncates the message.
job_ID | "job_ID[index]" | -J job_name
Required. Operates on the specified job. With LSF multicluster capability job forwarding model, you must always use the local job ID.

The job name can be up to 4094 characters long. Job names are not unique.

The wildcard character (*) can be used anywhere within a job name, but it cannot appear within an array index. For example, the pattern job* returns jobA and jobarray[1]. The *AAA*[1] pattern returns the first element in job arrays with names that contain AAA. However, the pattern job1[*] does not return anything since the wildcard is within the array index.

-h
Prints command usage to stderr and exits.
-V
Prints LSF release version to stderr and exits.

Example

bpost -i 1 -N INFO -d "step 1" -a step1.out 2500

Puts the message text step 1 into message index 1 and LSF Application Center Notifications at the INFO level (if the LSF_AC_PNC_URL parameter is specified correctly in the lsf.conf file), and attaches the file step1.out to job 2500.

See also

bread, bstatus, MAX_JOB_ATTA_SIZE, MAX_JOB_MSG_NUM