Analyzer ngx-rps

Name

ngx-rps - Nginx RPS Statistics

This analyzer measures and reports requests-per-second (RPS) metrics for Nginx, OpenResty, and Kong servers. It captures real-time request throughput data at the worker process level, tracking request handling rates over time. The analyzer outputs time-series data visualized as line charts, providing insights into traffic patterns and server capacity utilization.

Resource Category

Network I/O.

Application Type & Technical Stack

  • OpenResty
  • Kong
  • APISIX

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 ngx-rps -p PID

# trace a shell command directly
orxray analyzer run ngx-rps -c SHELL_CMD

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

# trace any processes started from the specified executable path.
orxray analyzer run ngx-rps --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Line Charts
  • Plain Texts

Output Example

{
  "proc": {
    "2721910": {"in": 2.63, "done": 2.63}
  },
  "summary": {
    "total_req_cnt": 8,
    "total_time_sec": 3.05,
    "total_done_reqs": 8,
    "total_cpu_time_ns": 89145189,
    "avg_time_ns_per_req": 11143149
  }
}

Author

The OpenResty Inc. Team.

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