How to measure CPU, MEM usage and more for a short lived process
0
votes
0
answers
485
views
I've got a program with some compiled sorting algorithms, and I'm trying to use top to monitor its cpu and ram usage.
Normally this would be fine, given that the process runs for a few minutes, however, the issue is that sometimes the program only runs for a few milliseconds (small dataset) and doesn't appear in the list in top.
Is there something like the time command that I could use to spawn the process and begin monitoring until it terminates (WSL2 Ubuntu)? I have several datasets to run several algorithms on in best/worst/avg sorting order to do a basic analysis on.
Asked by Jordan Renaud
(1 rep)
Nov 22, 2021, 07:07 PM
Last activity: Nov 22, 2021, 07:11 PM
Last activity: Nov 22, 2021, 07:11 PM