There is no faster way to get job counts, but you might find the sdiag command helpful.
Quoting Damien François <[email protected]>:
Hello,what is the most efficient way of finding how many jobs are currently running, pending, etc in the system ?At the moment, I use squeue and wc -l but that sometimes gets slow.Is there a command/flag I would have missed that would output that information quickly ?Thanks damien=
