lsb_postjobmsg
Sends messages and data posted to a job.Use lsb_postjobmsg to post a message and data to a job, open a TCP connection, and transfer attached message and data from the mbatchd. Use lsb_readjobmsg to display messages and copy data files posted by lsb_postjobmsg.
While you can post multiple messages and attached data files to a job, you must call lsb_postjobmsg for each message and attached data file you want to post. By default, lsb_postjobmsg posts a message to position 0 of the message index (msgId) (see PARAMETERS) of the specified job. To post additional messages to a job, call lsb_postjobmsg and increment the message index.
lsb_readjobmsg reads posted job messages by their position in the message index.
If a data file is attached to a message and the flag EXT_ATTA_POST is set, use the JOB_ATTA_DIR parameter in lsb.params(5) to specify the directory where attachment data fies are saved. The directory must have at least 1MB of free space.The mbatchd checks for available space in the job attachment directory before transferring the file.
Use the MAX_JOB_ATTA_SIZE parameter in lsb.params(5) to set a maximum size for job message attachments.
Users can only send messages and data from their own jobs. Root and LSF administrators can also send messages of jobs submtted by other users, but they cannot attach data files to jobs owned by other users.
You can post messages and data to a job until it is cleaned from the system. You cannot send messages and data to finished or exited jobs.
#include <lsf/lsbatch.h>
#include <time.h>int lsb_postjobmsg(struct jobExternalMsgReq *jobExternalMsg, char *filename)
Data Structures: Define Statements:
- Parameters:
*jobExternalMsg This structure contains the information required to define an external message of a job. *filename Name of attached data file. If no file is attached, use NULL. Errors:
- Returns:
- int:value
The successful function returns a socket number.int:0
The EXT_ATTA_POST bit of options is not set or there is no attached data.int:-1
The function failed.Equivalent line command:
- If the function fails, lserrno is set to indicate the error.
Files:
- bpost
- $LSB_CONFDIR/cluster_name/configdir/lsb.params
$JOB_ATTA_DIR
$LSB_SHAREDIR/info/
- See also:
- lsb_readjobmsg
Date Modified: 16 Jul 2014
Terms of Use
Copyright © 1994-2014 International Business Machines Corp.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.