LSF: The Most Useful Commands For Administrators

Ah ha, so you thought you would come to this blog and find out what are the most useful commands for LSF.  Well, hopefully you will find some of them here. If not, let me know and I’ll try to post more. I’m new to LSF so I’m not an expert but just starting to work with it to support users.  I want this post to be my reference for any such commands.

Of course bhosts will show you all of the batch hosts.  bhosts -l will show you all of the details for all of the batch hosts.  So far my favorite command is bjobs. Here is an example of a bjobs command that will show all jobs for all users for a particular host. Of course the |grep is not part of the bjobs command but can be used to include only those entries in the output that match .

bjobs -a -u all |grep

The following command will close a host so that no more jobs can be submitted. Once all jobs running on that host are completed then the host can be brought down for maintenance.

badmin hclose -C “Closed for Maintenance”

Just as the above command closes the host in LSF the following command reopens the host.

badmin hopen

The lsload command gives you an overview of all batch hosts, their current utilization and which hosts are currently unavailable. Adding -l provides some additional information that could be very valuable.

lsload -l

When working with certain appliances such as Data Domain and Network Appliance I like the OS interface where you can type help to get a list of all of the available commands and you can type help to get the useage. Guess what? With LSF you can type lsadmin and you are then taken to the lsadmim> prompt where you can type help to get a list of commands and then yes of course you can type help to find out how to use each.  But warning, do not run any of the commands unless you know what you are doing.

This next command bqueues lists all of the defined queues, their priority, status, and job statistics. Very informative and short output to this command.


The above commands are mostly for administrators. What about submitting jobs? Of course bsub -q will submit your job to the LSF queue. However, I’m not going to go into detail right now but rather I am going to research and add to this post.

bsub -q

Stay tuned…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s