2

Say I have a host with 10 slotsn I have applied a user limit to that host as following: SLOT = 5 JOB = 3

Is there a command to find whether this host can run more jobs from that user? OR, Is there a command to find whether the said host is closed for the said user.

Thanks in advance!

1 Answers1

1

Taking your description of your limit, I imagine its definition looks something like this:

Begin Limit
NAME = L1
USERS = user1
SLOTS = 5
JOBS = 3
HOSTS = hostA
End Limit

If I then submit 3 jobs as user1, I can run the blimits -u user1 to see if there are any limits imposed on the user1, or blimits -m hostA to see if there are any limits relevant to hostA. I can also combine these filters to see if there are any relevant limits imposed on user1 on hostA:

$ blimits -u user1 -m hostA

    INTERNAL RESOURCE LIMITS:

        NAME          USERS            QUEUES           HOSTS           PROJECTS      SLOTS     MEM      TMP      SWP      JOBS
         L1           user1              -              hostA              -           3/5       -        -        -       3/3

The last column of this output (JOBS) shows me that this user has reached his limit for jobs on that host (running 3 jobs out of a possible 3 allowed).

Squirrel
  • 2,262
  • 2
  • 18
  • 29
  • Thank you for the explaination. You have got it right. But, say if 2 jobs consumes 5 slots, then also user1 can not run more jobs on hostA. So, one has to take care of both slot limit and job limit maturing. Also I do not want to use this information in a script. I can achieve it by doing some manipulation. But I do not want to go in that process. Can there be a cleaner way that simply says the host is open or closed for the user? – user5005786 Jun 24 '15 at 17:35
  • In the 2 jobs consuming 5 slots case, the SLOTS column in the above output would show 5/5 indicating that the slot limit is reached for that user on that host. As for your command, I don't think LSF natively has a utility that shows it. The reason is the host may be unavailable to the user for many reasons (beyond just job/slot limits): it may be closed by the admin, it may be down, it may be occupied by other users' jobs etc... Also just saying open/closed based on limits is not so simple: you may have reached a MEM limit but can still submit jobs to the host that don't request MEM etc. – Squirrel Jun 24 '15 at 17:47
  • One thing that comes to mind is if you only care about JOB and SLOT limits, then you can write a little utility to just return yes or no if either of those limits is reached. I understand you might not want to get into scripting, but if you have some `C` programming ability, you could use the LSF API. – Squirrel Jun 24 '15 at 17:53
  • Thank you. It was helpful, specially the MEM limit part. I will either script or program. Thanks once again. – user5005786 Jun 24 '15 at 18:10