Set daemon message log to debug level

The message log level for LSF daemons is set in lsf.conf with the parameter LSF_LOG_MASK. To include debugging messages, set LSF_LOG_MASK to one of:
  • LOG_DEBUG

  • LOG_DEBUG1

  • LOG_DEBUG2

  • LOG_DEBUG3

By default, LSF_LOG_MASK=LOG_WARNING and these debugging messages are not displayed.

The debugging log classes for LSF daemons are set in lsf.conf with the parameters LSB_DEBUG_CMD, LSB_DEBUG_MBD, LSB_DEBUG_SBD, LSB_DEBUG_SCH, LSF_DEBUG_LIM, LSF_DEBUG_RES.

There are also parameters to set the logmask for each of the following daemons separately: mbatchd, sbatchd, mbschd, lim, and res. See the IBM Platform LSF Configuration Reference for more detail.

The location of log files is specified with the parameter LSF_LOGDIR in lsf.conf.

You can use the lsadmin and badmin commands to temporarily change the class, log file, or message log level for specific daemons such as LIM, RES, mbatchd, sbatchd, and mbschd without changing lsf.conf.

How the message log level takes effect

The message log level you set will only be in effect from the time you set it until you turn it off or the daemon stops running, whichever is sooner. If the daemon is restarted, its message log level is reset back to the value of LSF_LOG_MASK and the log file is stored in the directory specified by LSF_LOGDIR.

Limitations

When debug or timing level is set for RES with lsadmin resdebug, or lsadmin restime, the debug level only affects root RES. The root RES is the RES that runs under the root user ID.

Application RESs always use lsf.conf to set the debug environment. Application RESs are the RESs that have been created by sbatchd to service jobs and run under the ID of the user who submitted the job.

This means that any RES that has been launched automatically by the LSF system will not be affected by temporary debug or timing settings. The application RES will retain settings specified in lsf.conf.

Debug commands for daemons

The following commands set temporary message log level options for LIM, RES, mbatchd, sbatchd, and mbschd.
lsadmin limdebug [-c class_name] [-l debug_level ] [-f logfile_name] [-o] [host_name]
lsadmin resdebug [-c class_name] [-l debug_level ] [-f logfile_name] [-o] [host_name]
badmin mbddebug [-c class_name] [-l debug_level ] [-f logfile_name] [-o]
badmin sbddebug [-c class_name] [-l debug_level ] [-f logfile_name] [-o] [host_name]
badmin schddebug [-c class_name] [-l debug_level ] [-f logfile_name] [-o]

For a detailed description of lsadmin and badmin, see the IBM Platform LSF Command Reference.

Examples

lsadmin limdebug -c "LC_MULTI LC_PIM" -f myfile hostA hostB

Log additional messages for the LIM daemon running on hostA and hostB, related to MultiCluster and PIM. Create log files in the LSF_LOGDIR directory with the name myfile.lim.log.hostA, and myfile.lim.log.hostB. The debug level is the default value, LOG_DEBUG level in parameter LSF_LOG_MASK.

lsadmin limdebug -o hostA hostB

Turn off temporary debug settings for LIM on hostA and hostB and reset them to the daemon starting state. The message log level is reset back to the value of LSF_LOG_MASK and classes are reset to the value of LSF_DEBUG_RES, LSF_DEBUG_LIM, LSB_DEBUG_MBD, LSB_DEBUG_SBD, and LSB_DEBUG_SCH. The log file is reset to the LSF system log file in the directory specified by LSF_LOGDIR in the format daemon_name.log.host_name.

badmin sbddebug -o

Turn off temporary debug settings for sbatchd on the local host (host from which the command was submitted) and reset them to the daemon starting state. The message log level is reset back to the value of LSF_LOG_MASK and classes are reset to the value of LSF_DEBUG_RES, LSF_DEBUG_LIM, LSB_DEBUG_MBD, LSB_DEBUG_SBD, and LSB_DEBUG_SCH. The log file is reset to the LSF system log file in the directory specified by LSF_LOGDIR in the format daemon_name.log.host_name.

badmin mbddebug -l 1

Log messages for mbatchd running on the local host and set the log message level to LOG_DEBUG1. This command must be submitted from the host on which mbatchd is running because host_name cannot be specified with mbddebug.

badmin sbddebug -f hostB/myfolder/myfile hostA

Log messages for sbatchd running on hostA, to the directory myfile on the server hostB, with the file name myfile.sbatchd.log.hostA. The debug level is the default value, LOG_DEBUG level in parameter LSF_LOG_MASK.

badmin schddebug -l 2

Log messages for mbatchd running on the local host and set the log message level to LOG_DEBUG2. This command must be submitted from the host on which mbatchd is running because host_name cannot be specified with schddebug.

badmin schddebug -l 1 -c “LC_PERFM”
badmin schdtime -l 2

Activate the LSF scheduling debug feature.

Log performance messages for mbatchd running on the local host and set the log message level to LOG_DEBUG. Set the timing level for mbschd to include two levels of timing information.

lsadmin resdebug -o hostA

Turn off temporary debug settings for RES on hostA and reset them to the daemon starting state. The message log level is reset back to the value of LSF_LOG_MASK and classes are reset to the value of LSF_DEBUG_RES, LSF_DEBUG_LIM, LSB_DEBUG_MBD, LSB_DEBUG_SBD, and LSB_DEBUG_SCH. The log file is reset to the LSF system log file in the directory specified by LSF_LOGDIR in the format daemon_name.log.host_name.