I executed a python script on the server with the time command like
time python myscript.py
The time output was :
312.90user 15.57system 2:10:42elapsed 4%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1major+152440minor)pagefaults 0swaps
So, does that mean the script took 2 hours 10 minutes and 42 seconds to complete execution ?
Also, what is the meaning of 312.90user and 15.57system ?
Please Help
Thank You
To put it simply:
“user” is the time the cpu spent running non-system calls in your myscript.py. These are the python codes.
“system” is the time the cpu spent serving system calls made by your myscript.py. These are code that call the c library functions like open, write, etc., for example.
“elapsed” is the wall clock duration that your program took to run. This is comparable to you measuring the time the program took to run using your wristwatch (if you wear one anyway).