LSF - bfree
“bfree” is a Linux command to help LSF/ bsub users on a Research Computing server find out the number of job slots that are currently available to them for the specified queue that are also associated with the specified resource. This will help users determine what combination of resource and queue they can use and help them avoid specifying a combination that is not possible.
$ bfree [-h | --help] [-R resource] [-q queue_name] [-table | -long] [-nolimits]
[-all | -u user_name | user_group]
The simplest example:
$ bfree -R blade -q week
-nolimits
The LSF command bqueues shows what job slot limits are set for each queue. To have “bfree” also show you how many total job slots there are but not limited to your user limit, use the “-nolimits” option. If “bfree” returns a number for available job slots that is less than what you expect, it may be because the specified resource has fewer job slots than your queue limit.
-R res_req
Specifies the desired resource. To list all resources available to you only, just specify the “-R” option:
$ bfree -R
Use the LSF command “lsinfo” to display a brief description of the specified resource:
$ lsinfo [resource_name]
For example:
$ lsinfo blade
Not specifying a resource name is the same as specifying the default resource. The default resource is: “select[model==any]”
-q queue_name
Specifies the desired queue. To list all queues that you are allowed to use just specify the “-q” option:
$ bfree -q
Not specifying a queue name is the same as specifying the default queue name. The default queue is: “week”. The following examples are equivalent ways of running “bfree”:
$ bfree -R select[model==any] -q week
and:
$ bfree -R -q
and:
$ bfree
-long
List the machine names/host names with job slots available to you:
$ bfree -long -R blade -q patrons
-table
Create a table of the number of job slots available to you by resources and queues:
$ bfree -table -R blade blade1 -q patrons snoop
The most useful way to use “bfree” is to specify “-table” and a specific resource so you can see how many jobs you can run in all the queues that are available to you.
$ bfree -table -R blade -q all
This is a table of the number of job slots that are available for the
combinations of resources and queues you specified that you are able to use.
'X' denotes a combination of resource and queue that is not possible.
Row and column totals are not relevant since one resource can be available
for many queues and hosts in a resource can also be included in more than
one resource.
Resources int now week month idle
--------- --- --- ---- ----- ----
select[model==any] 2 2 24 4 60
This shows you the number of available job slots for all the resources and queues you are allowed to use:
$ bfree -table -R all -q all
This is a table of the number of job slots that are available for
the combinations of resources and queues you specified
that you are able to use.
'X' denotes a combination of resource and queue that is not possible.
Row and column totals are not relevant since one resource can be available
for many queues and hosts in a resource can also be included in more than
one resource.
Resources int now week month idle
--------- --- --- ---- ----- ----
blade 2 2 24 4 60
blade1 2 2 20 4 X
blade10 X X X X 9
blade11 X X X X 16
.
.
.
-u [user_name | user_group]
Display the resources and queues available to a different user.
$ bfree -table -u mason
or:
$ bfree -R blade -q patrons -u mason
-all
To display all the resources and queues that are configured in the LSF setup use the -all option.
$ bfree -table -all
Your job limits will still be imposed. You may also want to use the “-nolimits” option:
$ bfree -table -all -nolimits
The “-all” option can only be specified with the “-table” option.


