processes/top
Snapshot live Linux process activity like top: CPU, memory, load average and per-process stats from /proc, read-only. Sort by cpu, mem, res, time or pid to find resource hogs.
Instructions
Snapshot like top -b -n 1, read from /proc: header (uptime, users, load average, task counts by state, CPU us/sy/ni/id/wa/hi/si/st, memory and swap) plus the process table (PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND), sorted by sort_by (default cpu). Read-only. %CPU is measured over interval_ms (default 1000, max 10000), so the call takes about that long. For a lighter PID list or a single PID use processes/list; to signal a process processes/delete; for memory totals only memory/usage; for which process owns a port network/connections. limit defaults to all processes; user is an exact username. Sizes are bytes (MiB with human_readable). output_format: default and table give top's layout, wide adds PPID, THR and full command lines, json/yaml return an object with summary and processes (memory in bytes).
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 | Run as root. Needs a grant for this tool in mcp-sudo.yaml, otherwise refused | |
| 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 |