Analyzer syscall-write-stat

Name

syscall-write-stat - Statistic of errno for write/writev/send syscall

This analyzer collects statistics on return values from write, writev, and send system calls across all processes. It tracks both successful calls (shown as “OK”) and failed calls with their corresponding error codes (e.g., EAGAIN, EPIPE, ECONNRESET). The results are visualized as a bar chart showing the distribution of return statuses. This helps diagnose I/O failures and understand the ratio of successful to failed write operations in network and file I/O.

Resource Category

Miscellaneous.

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 syscall-write-stat -p PID

# trace a shell command directly
orxray analyzer run syscall-write-stat -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run syscall-write-stat -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run syscall-write-stat --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Bar Charts
  • Plain Texts

Output Example

[
  {
    "title": "Count errno for write/writev/send",
    "subtitle": "",
    "series": {"data": {"OK": 831, "EAGAIN": 45, "EPIPE": 3}, "name": "count"},
    "ver": 1,
    "type": "bar"
  }
]

Author

The OpenResty Inc. Team.

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