lsb_readjobmsg
Reads messages and data posted to a job.Use lsb_readjobmsg to open a TCP connection, receive attached messages and data from the mbatchd, and display the messages posted by lsb_postjobmsg.
By default, lsb_readjobmsg displays the message "no description" or the message at index position 0 of the specified job. To read other messages, choose another index position. The index is populated by lsb_postjobmsg.
If a data file is attached to a message and the flag EXT_ATTA_READ is set, lsb_readjobmsg gets the message and copies its data file to the default directory JOB_ATTA_DIR, overwriting the specified file if it already exists. If there is no file attached, the system reports an error.
Users can only read messages and data from their own jobs. Root and LSF administrators can also read messages of jobs submtted by other users, but they cannot read data files attached to jobs owned by other users.
You can read messages and data from a job until it is cleaned from the system. You cannot read messages and data from done or exited jobs.
#include <lsf/lsbatch.h>
#include <time.h>
int lsb_readjobmsg(struct jobExternalMsgReq *jobExternalMsg, struct jobExternalMsgReply *jobExternalMsgReply)
Data Structures: Define Statements:
- Parameters:
*jobExternalMsg the information required to define an external message of a job. *jobExternalMsgReply the information required to define an external message reply. Errors:
- Returns:
- int:value
The successful function returns a socket number.int:0
The EXT_ATTA_READ bit of options is not set or there is no attached data.int:-1
The function failed.Equivalent line commands:
- If the function fails, lserrno is set to indicate the error.
Files:
- bread
- $LSB_CONFDIR/cluster_name/configdir/lsb.params
$JOB_ATTA_DIR
$LSB_SHAREDIR/info/
- See also:
- lsb_postjobmsg
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.