Customize queue information output
By default, the bqueues command displays a predefined set of queue information. While you can use various bqueues options to display specific queue information based on your needs, you can also customize the specific fields that bqueues displays. Customize output to create a specific bqueues output format that shows all the required information so you can easily parse the information by using custom scripts or to display the information in a predefined format.
Use the LSB_BQUEUES_FORMAT parameter in lsf.conf or the LSB_BQUEUES_FORMAT runtime environment variable to define the default bqueues output format for LSF:
LSB_BQUEUES_FORMAT="field_name[:[-][output_width]] ... [delimiter='character']"
Use the bqueues -o option to define the custom output at the command level:
bqueues ... -o "field_name[:[-][output_width]] ... [delimiter='character']"
The following alternative method of using bqueues -o is recommended for special delimiter characters in a csh environment (for example, $):
bqueues ... -o 'field_name[:[-][output_width]] ... [delimiter="character"]'
- Specify which bqueues fields (or aliases instead of the full field names), in which order, and with what width to display.
- Specify only the bqueues 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 supported 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, bqueues truncates the ending characters.
- Specify a hyphen (-) to set right justification when bqueues displays the output for the specific field. If not specified, the default is to set left justification when bqueues displays output for a field.
- 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.
The bqueues -o option overrides the LSB_BQUEUES_FORMAT environment variable, which overrides the LSB_BQUEUES_FORMAT setting in lsf.conf.
- LSB_BQUEUES_FORMAT and bqueues -o both apply to output for the bqueues command with no options, and for bqueues options with output that filter information, including the following options: -alloc, -m, -u.
- LSB_BQUEUES_FORMAT and bqueues -o do not apply to output for bqueues options that use a modified format, including the following options: -l, -r, -w.
This table outlines the bqueues fields to display, and their supported width, aliases you can use instead of field names, and units of measurement for the displayed field:
Field name | Width | Aliases | Unit |
---|---|---|---|
queue_name | 15 | qname | |
description | 50 | desc | |
priority | 10 | prio | |
status | 12 | stat | |
max | 10 | ||
jl_u | 10 | jlu | |
jl_p | 10 | jlp | |
jl_h | 10 | jlh | |
njobs | 10 | ||
pend | 10 | ||
run | 10 | ||
susp | 10 | ||
rsv | 10 | ||
ususp | 10 | ||
ssusp | 10 | ||
nice | 6 | ||
max_corelimit | 8 | corelimit | |
max_cpulimit | 30 | cpulimit | |
default_cpulimit | 30 | def_cpulimit | |
max_datalimit | 8 | datalimit | |
default_datalimit | 8 | def_datalimit | |
max_filelimit | 8 | filelimit | |
max_memlimit | 8 | memlimit | |
default_memlimit | 8 | def_memlimit | |
max_processlimit | 8 | processlimit | |
default_processlimit | 8 | def_processlimit | |
max_runlimit | 12 | runlimit | |
default_runlimit | 12 | def_runlimit | |
max_stacklimit | 8 | stacklimit | |
max_swaplimit | 8 | swaplimit | |
max_tasklimit | 6 | tasklimit | |
min_tasklimit | 6 | ||
default_tasklimit | 6 | def_tasklimit | |
max_threadlimit | 6 | threadlimit | |
default_threadlimit | 6 | def_threadlimit | |
res_req | 20 | ||
hosts | 50 | ||
all (Available starting in Fix Pack 14) | Specify an output width that applies to all fields |
For example, corelimit is the same as max_corelimit.
Remove column headings from the queue information output
Use the bqueues -noheader option to remove column headings from the bqueues output. When bqueues -noheader is specified, bqueues displays the values of the fields without displaying the names of the fields. This option is useful for script parsing, when column headings are not necessary.
This option applies to output for the bqueues command with no options, and to output for all bqueues options with output that uses column headings, including the following: -alloc, -m, -o, -u, -w.
This option does not apply to output for bqueues options that do not use column headings, including the following: -json, -l, -r.
View customized queue information in JSON format
Use the bqueues -json option to view the customized bqueues output in JSON format. Since JSON is a customized output format, you must use the bqueues -json option together with the -o option.