battr

Provides a set of subcommands to manage LSF host attributes for attribute affinity scheduling.

Synopsis

battr subcommand [options] [arguments] [-h | -V]

Description

Use the battr command to create, delete, or show LSF host attributes. LSF can use host attributes to determine which hosts are the preferred execution hosts for jobs.

Information about each subcommand is available through the -h option.

Only users that are defined by the ATTR_CREATE_USERS parameter in the lsb.params file can create and delete attributes. If this parameter is not defined or is set to none, no users have permission to create and delete attributes.

LSF has a limit on the total number of attributes in the cluster as specified by the ATTR_MAX_NUM parameter in the lsb.params file. In addition, attributes have a time-to-live (TTL) value that is specified by the ATTR_TTL parameter in the lsb.params file.

Subcommand synopsis

battr create -m "host_name ... " | -m " host_group ..." [-d "description"] attr_name ...
battr delete -m "host_name ..." | -m " host_group ..." | -m all attr_name ...
battr show [-json | -w] [-m "host_name| host_group..."] [-u user_name] [attr_name ...]
battr -h
battr -V

Options

subcommand
Runs the specified subcommand. See the Usage section.
-h
Prints command usage to stderr and exits.
-V
Prints LSF release version to stderr and exits.
battr create -m "host_name ..." [-d "description"] attr_name ...

Usage

create -m "host_name ..." | -m "host_group ..." [-d "description"] attr_name ...
Creates the specified attributes on the specified hosts, host groups, or a combination. Use a space to separate attribute names. Valid attribute names meet the following requirements:
  • Must begin with a letter.
  • Can contain alphanumeric characters, including equal signs =), hyphens (-), underscores (_), or periods (.).
  • Length is less than 40 characters.
-d
Specifies a description for the attributes.
-m "host_name ..." | -m "host_group ..."
Required. Specifies the hosts, host groups, or a combination in which to create the attributes. Use a space to separate multiple names. You can specify the names in condensed host formats. You cannot specify remote (lease-in) hosts, or client hosts.
delete -m "host_name ... | -m "host_group ..." | -m all attr_name ...
Deletes the specified attributes from the specified hosts. Use a space to separate multiple attribute names. The cluster administrator and the root user can delete any attributes, but normal users can only delete attributes that are created by the same user.

If the normal user is removed from the ATTR_CREATE_USERS parameter in the lsb.params file, that user can no longer delete attributes.

-m "host_name ... | -m "host_group ..." | -m all
Required. Specifies the hosts, host groups, or combination, from which to delete the attributes. Use a space to separate multiple names, or use the all keyword to specify all hosts in the cluster. If the all keyword is used by a normal user, the -m option only deletes the attributes from hosts or host groups if the specified attributes were created by that user on the host, leaving the attributes that were created by other users intact on the other hosts or host groups. If the all keyword is used by root or the cluster administrator, the specified attributes are deleted from all hosts.

You can specify the host names or host groups in condensed host formats. You cannot specify remote (lease-in) hosts, or client hosts.

show [-w] [-m "host_name ..." | -m "host_group ..."] [-u user_name] [attr_name ...]
(As of Fix Pack 13) Shows attributes in the cluster. Use a space to separate multiple attribute names. If there are no specified attribute names, this command displays a warning message.
-w
Wide format. Displays attribute information without truncating fields.
-u user_name
Specifies the user that created the attributes that this command displays.
-m "host_name ..."| -m "host_group ..."
Specifies the hosts, host groups, or combination, whose attributes this command displays. Use a space to separate multiple names. You can specify the names in condensed host formats. You cannot specify remote (lease-in) hosts, or client hosts.