Top processes
top_processesRanks processes by CPU or resident memory usage to identify resource-heavy workloads on Linux, with optional redacted command lines.
Instructions
The processes using the most CPU (measured over a short sample, 100 percent is one core) or the most resident memory. The command line, which can carry secrets, is left out unless include_cmdline is true, and is then redacted and cut to 300 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | what to rank by (default cpu) | |
| limit | No | how many (default 10) | |
| sample_ms | No | how long to measure CPU for, in milliseconds (default 500) | |
| include_cmdline | No | add the redacted command line (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | ||
| processes | Yes | ||
| total_processes | Yes |