I am using the job scheduler SLURM.
It is possible to get information about CPU usage by Jobs/Steps/Tasks but how to have access to the number of cores a user is currently using ?
The list of jobs of a specific user user_name
can be obtained with: squeue | grep user_name
and the number of jobs currently running with: squeue | grep user_name | wc -l
.