In order to run a python script on a large deployment, I need to find out the “total CPU hours” that my script uses. The script executes a separate program (a simulation that, notably, uses MPI), which needs to be included in the count. What is the best, and most precise, way of doing this?
To be more specific, the total CPU hours is the usage of the program on one core. Right now I am running the script in a VirtualBox environment, which uses one core. Once I know the precise amount of CPU hours, I’ll switch to the real simulation. I figured it would be the easiest to calculate it on one core.
Does anybody have an idea on how I should approach this?
Thanks!
Run
time your-command, which includes a cpu time column and accounts for children.