11

On Windows, there's a GUI "Task Manager", and there's also a great little command-line "tasklist.exe" which lets me see most of the same data but in text that's really easy to parse from a script.

Is there an analogous command-line tool for "Resource Monitor"? I'm looking for something that will list global CPU/disk/network/memory usage, and/or per-process usage.

14

I think you are looking for typeperf. It should work for:

  • Windows Server 2003 - 2016
  • Windows 10
  • Windows 7
  • Windows Vista
  • Windows XP

An example:

typeperf "\Processor(_Total)\% Processor Time"

will log the processor time until you hit Ctrl-C. Adding -sc 5 will report 5 instances:

typeperf -sc 5 "\Processor(_Total)\% Processor Time"

Here is example for disk activity, total bytes per second:

typeperf -si 2 "\LogicalDisk(_Total)\Disk Bytes/sec"

Windows Performance Monitor Disk Counters Explained

4

Maybe you want to look into pslist.

It doesn't provide everything you're looking for. But it's the only CLI tool I know that at least provide some of it directly.

2

Just launch Run:

WinKey + R

type:

resmon

and press

OK
  • 2
    How does this different from the existing answer that describes the exact same process? – Ramhound Dec 9 '15 at 15:12
  • It is a shortcut to access the Resource Monitor from the Run window rather then the CLI. It is an alternative answer to the original question and with a direct access to the Resource Monitor, without the need to go through the Task Manager as answered by Tom. Different way, same results. ;) – Alan Dec 9 '15 at 16:00
  • You do understand that typing resmon in a run prompt is going to launch resmon.exe just like typing cmd will launch the command prompt. – Ramhound Dec 9 '15 at 16:12
  • 1
    One of the answers correctly suggests going through the CLI (Command Line Interface aka command prompt) and the other suggests going through the run prompt and task manager. Mine suggests going through the prompt directly to the resmon. It might be opening the same program but it is a different step. My answer is what I was looking for and is here future reference. – Alan Dec 9 '15 at 16:36
1

resmon.exe is the "resource monitor" ordinarily launched from the taskmgr.

The path to resmon.exe is processor specific, but there's usually a copy for your processor in ...\windows\system32 or ...\windows\system

(You can launch the task manager by ctrl-alt-del, or by typing "tskmgr" at a command line or at "Run ..." in the start menu)

last verified on Win7

  • 1
    What do you mean by "processor specific"? – Flimzy Nov 12 '13 at 19:35
  • I think he means "operating specific", as in what version of Windows (and what edition) you're using. – carefulnow1 Jul 11 '17 at 7:51
-2

Monitoring your computer’s Internet activity is a powerful tool, enabling you to:

  • Keep an eye on background processes
  • Reveal viruses and other malware
  • Expose unauthorized access
  • Monitor running programs
  • Log process activity

..and much more.

The best part? It’s super-easy. Here’s how I do it on Windows XP:

Open the cmd and type netstat -n 5 >scan.txt After a minute or two (or any amount of time), press Ctrl+C to stop monitoring. Type scan.txt to open the log file and check the results There are many ways to modify the log output using various parameters. Here are a couple of alternate commands you can try:

netstat -b 5 >scan.txt or netstat -nao 5 >scan.txt The second one also provides PID (Process ID) numbers that may be verified against running processes in the Windows Task Manager (under View > Select Column..). Feel free to terminate any processes running unwanted TCP connections. For a complete list of netstat parameters, type netstat help in the command prompt.

Here’s how I do it on Mac OSX:

Open Terminal, and type netstat -b >> scan.txt After a minute or two (or any amount of time), press Ctrl+C to stop monitoring. Type more scan.txt to open the log file and check the results.

  • Please read the question again carefully. Your answer does not answer the original question. OP is using Windows. – DavidPostill Nov 22 '16 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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