processes/top
Obtain a real-time system snapshot with CPU, memory, load, and per-process stats sorted by CPU usage. Identify resource-heavy processes and diagnose performance issues.
Instructions
A snapshot like top -b -n 1: header with uptime, logged-in users, load average, task counts by state, CPU breakdown (us/sy/ni/id/wa/hi/si/st) and memory/swap (bytes; MiB with human_readable), followed by the process table with all of top's columns (PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND). %CPU is measured over a short sampling interval, as top does. Use processes/list for a plain listing, processes/delete to signal a process.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | Only this user's processes | |
| limit | No | Maximum processes to list (default: all) | |
| sort_by | No | Sort column: cpu (default, like top), mem/res (resident memory), time (total CPU time), pid | |
| privileged | No | Set to true to run as root | |
| interval_ms | No | %CPU sampling interval in milliseconds (default 1000, max 10000) | |
| output_format | No | Default/table: top's own layout. wide: adds PPID, THR and full command lines (like top -c). json/yaml: structured {summary, processes}, memory in bytes (mem_bytes, swap_bytes, virt_bytes, res_bytes, shr_bytes) | |
| human_readable | No | Memory like top (MiB header, m/g columns); default is bytes |