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.
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 |