mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
BUG/MINOR: stream/cli: report correct stream age in "show sess"
Since 2.4-dev2 with commit 15e525f49
("MINOR: stream: Don't retrieve
anymore timing info from the mux csinfo"), we don't replace the
tv_accept (now accept_ts) anymore with the current request's, so that
it properly reflects the session's accept date and not the request's
date. However, since then we failed to update "show sess" to make use
of the request's timestamp instead of the session's timestamp, resulting
in fantasist values in the "age" field of "show sess" for the task.
Indeed, the session's age is displayed instead of the stream's, which
leads to great confusion when debugging, particularly when it comes to
multiplexed inter-proxy connections which are kept up forever.
Let's fix this now. This must be backported as far as 2.4. However,
for 2.7 and older, the field was named tv_request and was a timeval.
This commit is contained in:
parent
662565ddb4
commit
ec76e0138b
@ -3255,7 +3255,7 @@ void strm_dump_to_buffer(struct buffer *buf, const struct stream *strm, const ch
|
||||
|
||||
chunk_appendf(buf,
|
||||
" age=%s)\n",
|
||||
human_time(ns_to_sec(now_ns) - ns_to_sec(strm->logs.accept_ts), 1));
|
||||
human_time(ns_to_sec(now_ns) - ns_to_sec(strm->logs.request_ts), 1));
|
||||
|
||||
if (strm->txn)
|
||||
chunk_appendf(buf,
|
||||
@ -3648,7 +3648,7 @@ static int cli_io_handler_dump_sess(struct appctx *appctx)
|
||||
chunk_appendf(&trash,
|
||||
" ts=%02x epoch=%#x age=%s calls=%u rate=%u cpu=%llu lat=%llu",
|
||||
curr_strm->task->state, curr_strm->stream_epoch,
|
||||
human_time(ns_to_sec(now_ns) - ns_to_sec(curr_strm->logs.accept_ts), 1),
|
||||
human_time(ns_to_sec(now_ns) - ns_to_sec(curr_strm->logs.request_ts), 1),
|
||||
curr_strm->task->calls, read_freq_ctr(&curr_strm->call_rate),
|
||||
(unsigned long long)curr_strm->cpu_time, (unsigned long long)curr_strm->lat_time);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user