LSB_BHOSTS_FORMAT

Syntax

LSB_BHOSTS_FORMAT="field_name|all[:[-][output_width]] ... [delimiter='character']"

Description

Sets the customized output format for the bhosts command.

  • Specify which bhosts fields (or aliases instead of the full field names), in which order, and with what width to display.
  • Specify only the bhosts field name or alias to set its output to unlimited width and left justification.
  • (Available starting in Fix Pack 14) Specify all to display all fields. Specify the colon (:) with an output width that applies to all fields.
  • Specify the colon (:) without a width to set the output width to the recommended width for that field.
  • Specify the colon (:) with a width to set the maximum number of characters to display for the field. When its value exceeds this width, bhosts truncates the ending characters.
  • Specify a hyphen (-) to set right justification when bhosts displays the output for the specific field. If not specified, the default is to set left justification when bhosts displays the output for a field.
  • Specify a second colon (:) with a unit to specify a unit prefix for the output for the following fields: mem, max_mem, avg_mem, memlimit, swap, swaplimit, corelimit, stacklimit, and hrusage (for hrusage, the unit prefix is for mem and swap resources only).

    This unit is KB (or K) for kilobytes, MB (or M) for megabytes, GB (or G) for gigabytes, TB (or T) for terabytes, PB (or P) for petabytes, EB (or E) for exabytes, ZB (or Z) for zettabytes), or S to automatically adjust the value to a suitable unit prefix and remove the "bytes" suffix from the unit. The default is to automatically adjust the value to a suitable unit prefix, but keep the "bytes" suffix in the unit.

    The display value keeps two decimals but rounds up the third decimal. For example, if the unit prefix is set to G, 10M displays as 0.01G.

    The unit prefix specified here overrides the value of the LSB_UNIT_FOR_JOBS_DISPLAY environment variable, which also overrides the value of the LSB_UNIT_FOR_JOBS_DISPLAY parameter in the lsf.conf file.

  • Use delimiter= to set the delimiting character to display between different headers and fields. This delimiter must be a single character. By default, the delimiter is a space.
Output customization applies only to the output for certain bhosts options:
  • LSB_BHOSTS_FORMAT and bhosts -o both apply to output for the bhosts command with no options, and for bhosts options with output that filter information, including the following options: -a, -alloc, -cname, -R, -x, -X.
  • LSB_BHOSTS_FORMAT and bhosts -o do not apply to output for bhosts options that use a modified format, including the following options: -aff, -e, -l, -s, -w.

The bhosts -o option overrides the LSB_BHOSTS_FORMAT environment variable, which overrides the LSB_BHOSTS_FORMAT setting in lsf.conf.

Valid values

The following are the field names used to specify the bhosts fields to display, with valid widths and any supported aliases (which you can use instead of the field names). Units of measurement for the fields are an automatically chosen units of bytes (such as gigabytes, megabytes, and so on), depending on the field name.

Table 1. Output fields for bhosts
Field name Width Alias
host_name 20 hname
status 15 stat
cpuf 10  
jl_u 8 jlu
max 8  
njobs 8  
run 8  
ssusp 8  
ususp 8  
rsv 8  
dispatch_window 50 dispwin
ngpus 8 ng
ngpus_alloc 8 ngu
ngpus_excl_alloc 8 ngx
ngpus_shared_alloc 8 ngs
ngpus_shared_jexcl_alloc 8 ngsjx
ngpus_excl_avail 8 ngfx
ngpus_shared_avail 8 ngfs
attribute 50 attr
mig_alloc 5  
comments
Note: If combined with the bhosts -json option, this field displays full details of host closure events such as event time, administrator ID, lock ID, and comments, as shown in the bhosts -l option.
128  
available_mem

(Available starting in Fix Pack 14)

15  
reserved_mem

(Available starting in Fix Pack 14)

15  
total_mem

(Available starting in Fix Pack 14)

15  

Field names and aliases are not case-sensitive. Valid values for the output width are any positive integer 1 - 4096.

Example

LSB_BHOSTS_FORMAT="host_name cpuf: jl_u:- max:-6 delimiter='^'"

Running bhosts displays the following fields:

  • HOST_NAME with unlimited width and left-aligned.
  • CPUF with a maximum width of 10 characters (which is the recommended width) and left-aligned.
  • JL_U with a maximum width of 8 characters (which is the recommended width) and right-aligned.
  • MAX with a maximum width of 6 characters and right-aligned.
  • The ^ character is displayed between different headers and fields.

Default

Not defined. The current bhosts output is used.