Command Line utility to see list of tasks CPU Usage, Memory, and execute

7

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?

Aminadav Glickshtein

Posted 2015-11-26T21:05:30.427

Reputation: 396

Answers

9

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

Ielton

Posted 2015-11-26T21:05:30.427

Reputation: 3 351

2Note: 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 – 2018-04-18T23:41:20.873

1

Without dependence on system localization:

typeperf "\238(*)\6" -sc 1

typeperf "\238(*)\6" -si 10 -sc 5

typeperf "\238(_Total)\6" -si 10 -sc 5

Geograph

Posted 2015-11-26T21:05:30.427

Reputation: 185