diff options
author | dormando <dormando@rydia.net> | 2022-02-18 11:23:08 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-02-18 11:23:08 -0800 |
commit | d85c379d74d92f8e9bd7ccf1ca57520f485a24f0 (patch) | |
tree | 77d18c05d9d6fc1455d0b18902a7806175fc7eb7 | |
parent | 554a1176dcfc58a00be88e35b480028f001a7ac1 (diff) | |
download | memcached-d85c379d74d92f8e9bd7ccf1ca57520f485a24f0.tar.gz |
proxy: documentation updates
-rw-r--r-- | doc/protocol.txt | 18 | ||||
-rw-r--r-- | memcached.c | 16 |
2 files changed, 26 insertions, 8 deletions
diff --git a/doc/protocol.txt b/doc/protocol.txt index ac44b32..3b220e3 100644 --- a/doc/protocol.txt +++ b/doc/protocol.txt @@ -1177,6 +1177,15 @@ The arguments are: address IP and port. Connection close events additionally supply a reason for closing the connection. +- "proxycmds": Emits detailed timing logs about requests/responses being + returned to a client while in proxy mode. The conditions which logs are + written here may be influenced by configuration. + +- "proxyevents": Emits internal proxy errors and system events, such as + configuration reloads. + +- "proxyuser": Emits log entries created from lua configuration files. + Statistics ---------- @@ -1252,6 +1261,11 @@ integers separated by a colon (treat this as a floating point number). | read_buf_bytes_free | 64u | Total read/resp buffer bytes cached | | read_buf_oom | 64u | Connections closed by lack of memory | | reserved_fds | 32u | Number of misc fds used internally | +| proxy_conn_requests | 64u | Number of requests received by the proxy | +| proxy_conn_errors | 64u | Number of internal errors from proxy | +| proxy_conn_oom | 64u | Number of out of memory errors while | +| | | serving proxy requests | +| proxy_req_active | 64u | Number of in-flight proxy requests | | cmd_get | 64u | Cumulative number of retrieval reqs | | cmd_set | 64u | Cumulative number of storage reqs | | cmd_flush | 64u | Cumulative number of flush reqs | @@ -1438,6 +1452,10 @@ other stats command. | | bool | Does nothing as of 1.5.15 | | drop_privileges | bool | If yes, and available, drop unused syscalls | | | | (see seccomp on Linux, pledge on OpenBSD) | +| proxy_enabled | bool | If proxy has been configured at start | +| proxy_uring_enabled | + | bool | If proxy is configured to use IO_URING. | + | | NOTE: uring may be used if kernel too old | | memory_file | char | Warm restart memory file path, if enabled | |-------------------+----------+----------------------------------------------| diff --git a/memcached.c b/memcached.c index 39dc2ba..f77294b 100644 --- a/memcached.c +++ b/memcached.c @@ -1792,6 +1792,14 @@ void server_stats(ADD_STAT add_stats, conn *c) { APPEND_STAT("read_buf_bytes_free", "%llu", (unsigned long long)thread_stats.read_buf_bytes_free); APPEND_STAT("read_buf_oom", "%llu", (unsigned long long)thread_stats.read_buf_oom); APPEND_STAT("reserved_fds", "%u", stats_state.reserved_fds); +#ifdef PROXY + if (settings.proxy_enabled) { + APPEND_STAT("proxy_conn_requests", "%llu", (unsigned long long)thread_stats.proxy_conn_requests); + APPEND_STAT("proxy_conn_errors", "%llu", (unsigned long long)thread_stats.proxy_conn_errors); + APPEND_STAT("proxy_conn_oom", "%llu", (unsigned long long)thread_stats.proxy_conn_oom); + APPEND_STAT("proxy_req_active", "%llu", (unsigned long long)thread_stats.proxy_req_active); + } +#endif APPEND_STAT("cmd_get", "%llu", (unsigned long long)thread_stats.get_cmds); APPEND_STAT("cmd_set", "%llu", (unsigned long long)slab_stats.set_cmds); APPEND_STAT("cmd_flush", "%llu", (unsigned long long)thread_stats.flush_cmds); @@ -1811,14 +1819,6 @@ void server_stats(ADD_STAT add_stats, conn *c) { APPEND_STAT("badcrc_from_extstore", "%llu", (unsigned long long)thread_stats.badcrc_from_extstore); } #endif -#ifdef PROXY - if (settings.proxy_enabled) { - APPEND_STAT("proxy_conn_requests", "%llu", (unsigned long long)thread_stats.proxy_conn_requests); - APPEND_STAT("proxy_conn_errors", "%llu", (unsigned long long)thread_stats.proxy_conn_errors); - APPEND_STAT("proxy_conn_oom", "%llu", (unsigned long long)thread_stats.proxy_conn_oom); - APPEND_STAT("proxy_req_active", "%llu", (unsigned long long)thread_stats.proxy_req_active); - } -#endif APPEND_STAT("delete_misses", "%llu", (unsigned long long)thread_stats.delete_misses); APPEND_STAT("delete_hits", "%llu", (unsigned long long)slab_stats.delete_hits); APPEND_STAT("incr_misses", "%llu", (unsigned long long)thread_stats.incr_misses); |