monitor_context_switches
Sample read-only context-switch counters for a Linux system or specific PID over a set duration and interval to observe scheduling activity without modifying processes.
Instructions
READ-ONLY CONTEXT-SWITCH sampling for the system or one PID.
This observes counters only and cannot stop or modify processes. It is not a CPU scheduling simulation.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "monitor_context_switches"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | PID for per-process sampling; null means system-wide | |
| duration_seconds | No | Total sampling duration in seconds | |
| interval_seconds | No | Seconds between context-switch samples |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| scope | Yes | ||
| samples | Yes | ||
| summary | Yes | ||
| duration_seconds | Yes | ||
| interval_seconds | Yes |