1

In my PBS script, I am running matlab and would like to know how many many cores were actually used during the time. Especially I would like to know the max number of cores used at a time.

If I only allocate x number of cores but at any time matlab uses more than x number of cores then my job will be stopped and cancelled by the HPC/HTC system.

Ideally the command and output would be as simple as

cpustats matlab -nojvm -r "someExperiment(params);exit()"

Max CPU usage: 12.5 cores
Average CPU usage: 6 cores
Min CPU usage: 0.5 cores

I can't monitor the progress manually because it is a batch script so I am planning on running once with plenty of cores and then modifying the rest so I don't have to wait so long.

I have searched and searched for a command like this but the following don't seem to be what I am looking for

  • top finds the current cpu usage which I don't have access to
  • ps finds cpu allotted to a process and not actual usage
  • watch might be useful to query random cpu times and output them but would like a continuous stream if possible
  • time is really close to what I want but doesn't keep track of peak CPU usage

The most similar question I could find was this one about peak memory usage

MathIsKey
  • 195
  • 8

0 Answers0