JakeSmitch

4

votes
3

answer
113

views

How can I get the CPU usage of a process with “tasklist” in Windows

I am writing a program in Java to periodically display the CPU and memory usage of a given process ID. My implementation invokes tasklist. It is pretty straightforward to get the memory usage by the following command: tasklist /fi 'memusage ge 0' /fi 'pid eq 2076' /v This will return the memory usag...
JakeSmitch