added the rpx_sessions counter

This commit is contained in:
2025-08-19 22:23:22 +09:00
parent 10c139e837
commit c001458b24
8 changed files with 43 additions and 5 deletions

View File

@ -111,6 +111,7 @@ type json_out_client_stats struct {
ClientPeers int64 `json:"client-peers"`
ClientPtySessions int64 `json:"client-pty-sessions"`
ClientRptySessions int64 `json:"client-rpty-sessions"`
ClientRpxSessions int64 `json:"client-rpx-sessions"`
}
// ------------------------------------
@ -1140,6 +1141,7 @@ func (ctl *client_ctl_stats) ServeHTTP(w http.ResponseWriter, req *http.Request)
stats.ClientPeers = c.stats.peers.Load()
stats.ClientPtySessions = c.stats.pty_sessions.Load()
stats.ClientRptySessions = c.stats.rpty_sessions.Load()
stats.ClientRpxSessions = c.stats.rpx_sessions.Load()
status_code = WriteJsonRespHeader(w, http.StatusOK)
if err = je.Encode(stats); err != nil { goto oops }