mirror of
https://github.com/fleetdm/fleet
synced 2026-04-26 07:57:29 +00:00
This relates to #11939 This PR adds the test tool and procedure used to profile orbit and osqueryd processes on Windows
17 lines
No EOL
776 B
Markdown
17 lines
No EOL
776 B
Markdown
# Process profiling
|
|
|
|
To measure the CPU and memory consumption of a process in Windows, you can use the
|
|
`process_profile_tool.ps1` tool.
|
|
|
|
To use this tool, you just need to pass the process ID (PID) as an argument through the `TargetPID`
|
|
parameter. The script will run and take samples every 10 seconds by default (this can be adjusted
|
|
using the `SampleIntervalInSecs"` parameter). The script will stop taking samples either when the
|
|
process finishes or when a key is pressed while the script is running. As a result, the script will
|
|
generate two PNG files in the same directory, showing the CPU and memory consumption of the process.
|
|
|
|
Example execution below:
|
|
```
|
|
PS C:\code\PoCs> . .\process_profile.ps1 -TargetPID 32652
|
|
Key Pressed. Stopping script...
|
|
PS C:\code\PoCs>
|
|
``` |