paperlined.org
rosetta_stone > os
document updated 4 days ago, on Dec 2, 2025

background logging of high-CPU processes

This article is useful during this scenario: 1) You have something that really bogs the computer down, in a recurring but difficult-to-reproduce way, and 2) the computer becomes so sluggish that using the typical sysadmin tools for diagnosing these problems (interactive tools, whether GUI or CLI) becomes impractical.

In this scenario, it's useful to setup a single script that can be initiated, that will capture a variety of data right then, and log it to a file — not to the user's screen — so it can be reviewed later. (note: in some situations you're going to do a reboot or hard shutdown right after running this script, so you want it to finish writing to disk ASAP)

In some situations, the user may want to tweak exactly what data the script logs, to gradually hone in on what problem they suspect might be happening.

Windows

Some typeperf and PowerShell-based solutions.