0

I have a small issue on my computer.

From time to time, it seems like some process is turning on, maxing the cpu and disk activity for 10-15 seconds, and then stopping. This usually occurs while I'm in a fullscreen application (a game, typically).

I could check what is causing that by opening the Resource Manager, and checking the culprit. However, the stuttering state in which the computer is during this usually doesn't make it easy to open it. I also usually don't get the time to before it ends.

So my question is, would there be a way to capture a "state" of the cpu and/or disk activity at a moment, just by pressing a key shortcut or launching a script? (AutoHotKey could work around this one). Preferably something lightweight, of course, so that it would actually capture the activity and not record "after" the event.

Gnoupi
  • 8,188

2 Answers2

1

Windows has a tool for that. Its called Perfmon.

The Reliability and Performance Monitor introduced in Windows Vista, is a good built-in tool that lets you monitor and study how applications you run affect your computer’s performance, both in real-time and by collecting log data for later analysis. In this post we will see how to use Performance Monitor or Perfmon, as it is called, in Windows 8. The same of course applies to Windows 7 too.

Here is a good article on how to set up data collection over time.

Keltari
  • 75,447
1

Run the Windows Resource monitor. There are graphs that follow for example CPU, HDD and network resource consumption. The challenge will be to see the relevant information in time. I've got two alternatives for that.

The easy (but probably not satisfactory working) way
During a stall of your system, you can try to press CTRL + SHIFT + ESC, which is a default Windows hotkey for the taskmanager. From there (Performance tab) you can start the resource monitor. Alternatively, you can try to ALT + TAB to it or press CTL + ALT + DEL and select "Open taskmanager".

The harder (but probably more successful) way
If you want to log the information that is in the resource monitor to a file, you can use LOGMAN to log the resmon.exe data to a file for later inspection. Here is a good link explaining the way to go. In short:

  • Create a file (WDC_Providers.txt) where the to be logged items are mentioned:
    {B2CA89D8-FAC8-4759-A0C7-2FAD1FD0E716} 0xffffffffffffffff 0xff
    Microsoft-WIndows-Kernel-Disk 0xffffffffffffffff 0xff
    Microsoft-Windows-Kernel-File 0x10 0xff
    Microsoft-Windows-Kernel-Process 0x20 0xff
  • Start logging using: logman start WDC -pf "C:\Perflogs\WDC_Providers.txt" -bs 64 -nb 16 38 -max 10 -mode newfile -o c:\PerfLogs\output%d.etl -ets
agtoever
  • 6,402