Analyzer process-ctx-sw-stats

Name

process-ctx-sw-stats - Process Context Switches Statistics

This analyzer monitors and collects statistics on process context switches at the kernel level. It tracks voluntary and involuntary context switches, capturing detailed metrics about when and why processes yield CPU control. The analyzer provides insights into scheduling behavior and helps identify excessive context switching that may degrade application performance.

Resource Category

CPU.

Application Type & Technical Stack

  • All

Command Line Syntax

The analyzer can be invoked directly on the command-line via the orxray utility from the openresty-xray-cli software package.

Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).

# PID is the target process PID.
orxray analyzer run process-ctx-sw-stats -p PID

# trace a shell command directly
orxray analyzer run process-ctx-sw-stats -c SHELL_CMD

Tracing Multiple Processes

Not supported.

Output Formats

  • Plain Texts

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.