cluster-computinghpcslurmsupercomputersloadleveler

How to see the current user's queue in SLURM


On a cluster that is managed by SLURM, I want to check the queue of the current user (and cluster). Normally, I have to use this command:

squeue --user=username --clusters=clustername

The problem with this, apart from the fact that this is a rather long command to use frequently, is that it needs the username. I have created a script in which at some point I want to check the queue of the user, but I have to get the username first.

I have a workaround for all these, but it would be great if I could use a command like the respective one for LoadLeveller:

llu

Is there anything like that? Or can I somehow specify the "current user" in the --user flag?


Solution

  • You may use an alias in the /etc/bashrc file (or ~/.bashrc for some users):

    alias llu="squeue --user=$USER --clusters=clustername"
    

    EDIT

    You could also use this alias which does not depend on an environment variable:

    alias llu="squeue --user=`whoami` --clusters=clustername" 
    

    or

    alias llu="squeue --user=`logname` --clusters=clustername"