About this task
A number of commands often require you to specify host names. You can
now specify host name ranges instead. You can use condensed notation with
any commands that use the -m option or a host list to specify
multiple host names, including the following commands:
- bacct
- bhist
- bhost
- bjobs
- bkill
- blaunch
- blimits
- bmig
- bmod
- bpeek
- brestart
- bresume
- brsvadd
- brsvmod
- brsvs
- brun
- bstop
- bsub
- bswitch
- lsgrun
- lshosts
- lsload
You must specify a valid range of hosts,
where the start number is smaller than the end number.
Procedure
-
Run the command you want and specify the host names as a range.
Use square brackets ([]) to enclose the multiple numbers, and use a hyphen (-) or colon (:) to specify a range of numbers. You can use multiple sets of square brackets in a host name.
For example:
- bsub -m "host[1-100].example.com"
The job is submitted to host1.example.com, host2.example.com, host3.example.com, all the way to host100.example.com.
- bsub -m "host[01-03].example.com"
The job is submitted to host01.example.com, host02.example.com, and host03.example.com.
- bsub -m "host[5:200].example.com"
The job is submitted to host5.example.com, host6.example.com, host7.example.com, all the way to host200.example.com.
- bsub -m "host[05:09].example.com"
The job is submitted to host05.example.com, host06.example.com, all the way to host09.example.com.
- bsub -m "hostA[1-2]B[1-3].example.com"
The job is submitted to hostA1B1.example.com, hostA1B2.example.com, hostA1B3.example.com, hostA2B1.example.com, hostA2B2.example.com, and hostA2B3.example.com.
-
Run the command you want and specify host names as a combination of ranges and individuals.
Use square brackets ([]) to enclose the multiple numbers, and use a hyphen (-) or colon (:) to specify a range of numbers. Use a comma (,) to separate multiple ranges of numbers or to separate individual numbers. You can use multiple sets of square brackets in a host name.
For example:
- bsub -m "host[1-10,12,20-25].example.com"
The job is submitted to host1.example.com, host2.example.com, host3.example.com, up to and including host10.example.com. It is also submitted to host12.example.com and the hosts between and including host20.example.com and host25.example.com.
- bsub -m "host[1:10,20,30:39].example.com"
The job is submitted to host1.example.com, host2.example.com, host3.example.com, up to and including host10.example.com. It is also submitted to host20.example.com and the hosts between and including host30.example.com and host39.example.com.
- bsub -m "host[10-20,30,40:50].example.com"
The job is submitted to host10.example.com, host11.example.com, host12.example.com, up to and including host20.example.com. It is also submitted to host30.example.com and the hosts between and including host40.example.com and host50.example.com.
- bsub -m "host[01-03,05,07:09].example.com"
The job is submitted to host01.example.com, up to and including host03.example.com. It is also submitted to host05.example.com, and the hosts between and includinghost07.example.com and host09.example.com.
- bsub -m "hostA[1-2]B[1-3,5].example.com"
The job is submitted to hostA1B1.example.com, hostA1B2.example.com, hostA1B3.example.com, hostA1B5.example.com, hostA2B1.example.com, hostA2B2.example.com, hostA2B3.example.com, and hostA2B5.example.com.