Show how many jobs are running on a node

Hi All,

Does OpenPBS have an equivalent of bhosts in LSF? I’d like to see how many jobs are running on each node.

pbsnodes -aS can give me the node list, but not how many jobs.

Using the json output of qstat and some jq-foo I manage to get something but it seems like there’d be an easier way…

qstat -f -F json | jq .Jobs[].exec_host | cut -d ‘/’ -f1 | tr -d ‘"’ | sort | uniq -c 64 hpc-p-vdg-01a01
36 hpc-p-vdg-01a02

Cheers,
hopoffbaby

Please try the below command
pbsnodes -aSjv

pbsnodes -aSj
mem ncpus nmics ngpus
vnode state njobs run susp f/t f/t f/t f/t jobs


hpc-p-vdg-01a01 free 0 0 0 1tb/1tb 64/64 0/0 0/0 –
hpc-p-vdg-01a02 free 0 0 0 1tb/1tb 64/64 0/0 0/0 –
hpc-p-vdg-01a03 free 0 0 0 1tb/1tb 64/64 0/0 0/0 –

Perfect, exactly what I needed.

Thanks @adarsh

1 Like