Reference

show activity

Available since

  • HAProxy 1.9
  • HAProxy Enterprise 1.9r1

Report counters related to internal process events.

Description Jump to heading

Report counters related to internal process events of interest to developers and experienced troubleshooters.

Output consists of one line per metric accompanied by per-thread counters. Counters are 32 bit and wrap during the process’s lifetime. Counters may be reset with the clear counters command.

As of version 2.7r1, on multi-threaded deployments, the first column indicates the total (or average, depending on the nature of the metric) for all threads. The list of all threads’ values is represented between square brackets in the thread order.

Optionally, specify an argument:

  • Specify a thread number to dump only that thread.
  • Specify 0 to report the aggregated value (column 1).
  • Specify -1 to display all columns (the default).

Examples Jump to heading

Show all counters.

bash
echo "show activity" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
bash
echo "show activity" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
bash
thread_id: 2 (1..2)
date_now: 1681763277.330557
uptime_now: 17139.720847
ctxsw: 34033 [ 34021 12 ]
tasksw: 34030 [ 34020 10 ]
empty_rq: 289 [ 1 288 ]
long_rq: 0 [ 0 0 ]
loops: 17316 [ 17020 296 ]
wake_tasks: 0 [ 0 0 ]
wake_signal: 0 [ 0 0 ]
poll_io: 3407 [ 3404 3 ]
poll_exp: 0 [ 0 0 ]
poll_drop_fd: 0 [ 0 0 ]
poll_skip_fd: 0 [ 0 0 ]
conn_dead: 0 [ 0 0 ]
stream_calls: 17025 [ 17024 1 ]
pool_fail: 0 [ 0 0 ]
buf_wait: 0 [ 0 0 ]
cpust_ms_tot: 0 [ 0 0 ]
cpust_ms_1s: 0 [ 0 0 ]
cpust_ms_15s: 0 [ 0 0 ]
avg_loop_us: 75 [ 143 7 ]
accepted: 2 [ 0 2 ]
accq_pushed: 2 [ 1 1 ]
accq_full: 0 [ 0 0 ]
accq_ring: 0 [ 0 0 ]
fd_takeover: 0 [ 0 0 ]
output
bash
thread_id: 2 (1..2)
date_now: 1681763277.330557
uptime_now: 17139.720847
ctxsw: 34033 [ 34021 12 ]
tasksw: 34030 [ 34020 10 ]
empty_rq: 289 [ 1 288 ]
long_rq: 0 [ 0 0 ]
loops: 17316 [ 17020 296 ]
wake_tasks: 0 [ 0 0 ]
wake_signal: 0 [ 0 0 ]
poll_io: 3407 [ 3404 3 ]
poll_exp: 0 [ 0 0 ]
poll_drop_fd: 0 [ 0 0 ]
poll_skip_fd: 0 [ 0 0 ]
conn_dead: 0 [ 0 0 ]
stream_calls: 17025 [ 17024 1 ]
pool_fail: 0 [ 0 0 ]
buf_wait: 0 [ 0 0 ]
cpust_ms_tot: 0 [ 0 0 ]
cpust_ms_1s: 0 [ 0 0 ]
cpust_ms_15s: 0 [ 0 0 ]
avg_loop_us: 75 [ 143 7 ]
accepted: 2 [ 0 2 ]
accq_pushed: 2 [ 1 1 ]
accq_full: 0 [ 0 0 ]
accq_ring: 0 [ 0 0 ]
fd_takeover: 0 [ 0 0 ]

uptime_now was added as of version 2.7r1.

Show counters for thread 2 only.

bash
echo "show activity 2" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
bash
echo "show activity 2" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
bash
thread_id: 1 (1..2)
date_now: 1681765240.812967
uptime_now: 19103.203257
ctxsw: 22
tasksw: 18
empty_rq: 321
long_rq: 0
loops: 332
wake_tasks: 0
wake_signal: 0
poll_io: 7
poll_exp: 0
poll_drop_fd: 0
poll_skip_fd: 0
conn_dead: 0
stream_calls: 4
pool_fail: 0
buf_wait: 0
cpust_ms_tot: 0
cpust_ms_1s: 0
cpust_ms_15s: 0
avg_loop_us: 8
accepted: 5
accq_pushed: 2
accq_full: 0
accq_ring: 0
fd_takeover: 0
output
bash
thread_id: 1 (1..2)
date_now: 1681765240.812967
uptime_now: 19103.203257
ctxsw: 22
tasksw: 18
empty_rq: 321
long_rq: 0
loops: 332
wake_tasks: 0
wake_signal: 0
poll_io: 7
poll_exp: 0
poll_drop_fd: 0
poll_skip_fd: 0
conn_dead: 0
stream_calls: 4
pool_fail: 0
buf_wait: 0
cpust_ms_tot: 0
cpust_ms_1s: 0
cpust_ms_15s: 0
avg_loop_us: 8
accepted: 5
accq_pushed: 2
accq_full: 0
accq_ring: 0
fd_takeover: 0

See also Jump to heading

If this page was useful, please, Leave the feedback.