I want to log, every 10 minutes, list of all the apps in windows that now running, the CPU usage, and memory usage.

I have many node.exe tasks, so I want to see the arguments of the task (for example: node c:\myscript.js

I tried: tasklist/? but didn't found anything related to cpu usage.

I tried: procexp/? but didn't found anyway to export the list to file (or show in console)

I tried: cprocess (NirSoft), it can dump to file, and show CPU, but it don't give the arguments of the exe that runned.

Any idea?

up vote 4 down vote accepted

You can use the tool 'typeperf'

To list all processes:

typeperf "\Process(*)\% Processor Time" -sc 1

List all processes, take 5 samples at 10 second intervals:

typeperf "\Process(*)\% Processor Time" -si 10 -sc 5

If you want a specific process, node for example:

typeperf "\Process(node)\% Processor Time" -si 10 -sc 5

You also can dump it to a csv file and filter in a spreadsheet to remotely diagnose issues.

The following gives me 5 minutes (at 10 second intervals) of all processes. The data includes not just % Processor Time, but IO, memory, paging, etc.

typeperf -qx "\Process" > config.txt typeperf -cf config.txt -o perf.csv -f CSV -y -si 10 -sc 60

More info: https://technet.microsoft.com/en-us/library/bb490960.aspx
  • 1
    Note: In order to use typeperf, you must either be a member of the local Performance Log Users group, or the command must be executed from an elevated command window. – Amit Naidu Apr 18 at 23:41

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.