Analyzer ngx-config
Name
ngx-config - Configurations for Nginx
This analyzer retrieves and presents comprehensive runtime configuration information from Nginx and OpenResty servers. It captures critical parameters including worker process settings, connection pool configurations, resource limits, listen addresses, system kernel parameters, and build options. The analyzer outputs structured data in tabular format with key metrics such as free connections, worker processes, and connection limits, facilitating capacity planning, performance tuning, and configuration validation for production environments.
Resource Category
Miscellaneous.
Application Type & Technical Stack
- OpenResty
- Nginx
- APISIX
- Kong
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-config -p PID
# trace a shell command directly
orxray analyzer run ngx-config -c SHELL_CMD
Tracing Multiple Processes
Not supported.
Output Formats
- Tables
- Plain Texts
Output Example
{
"version": {
"nginx": "openresty+/1.27.1.2.31 (no pool)",
"pcre": "10.44 2024-06-07",
"openssl": "3.4.1 11 Feb 2025 (statically linked)",
"luajit": "2.1.ROLLING GC64 (statically linked)"
},
"worker_processes": 1,
"worker_connections": 10000,
"free_connections": 9750,
"worker_cpu_affinity": "auto",
"worker_rlimit_nofile": 20481,
"worker_rlimit_nofile_hard": 20481,
"use_event": "epoll",
"multi_accept": "off",
"use_accept_mutex": "off",
"accept_mutex_delay": 0,
"timer_resolution": 0,
"ngx_timer_resolution": 0,
"shutdown_timeout": 60000,
"log_level": "error",
"working_directory": "/cores/oredge-node/",
"lua_max_running_timers": 256,
"lua_max_pending_timers": 1024,
"lua_regex_cache_max_entries": 8192,
"sysconfig": {
"net.core.somaxconn": "4096",
"net.core.netdev_max_backlog": "1000",
"net.ipv4.ip_local_port_range": "32768 60999",
"net.ipv4.tcp_max_syn_backlog": "1024",
"net.ipv4.tcp_max_tw_buckets": "5000",
"net.ipv4.tcp_tw_reuse": "2",
"net.netfilter.nf_conntrack_max": "65536"
},
"listen": [
{"addr": "0.0.0.0:80", "reuseport": "on", "backlog": "512"},
{"addr": "[::]:80", "reuseport": "on", "backlog": "512"},
{"addr": "0.0.0.0:443", "reuseport": "on", "backlog": "512"},
{"addr": "[::]:443", "reuseport": "on", "backlog": "512"},
{"addr": "0.0.0.0:7777", "reuseport": "on", "backlog": "512"},
{"addr": "127.0.0.1:8091", "reuseport": "on", "backlog": "511"}
],
"nginx-options": "--prefix=/usr/local/openresty-plus/nginx --with-stream --with-http_v2_module --with-http_v3_module --with-http_ssl_module --with-stream_ssl_module"
}
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.