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

@ -78,6 +78,7 @@ type json_out_server_stats struct {
SshProxySessions int64 `json:"pxy-ssh-sessions"`
ServerPtySessions int64 `json:"server-pty-sessions"`
ServerRptySessions int64 `json:"server-rpty-sessions"`
ServerRpxSessions int64 `json:"server-rpx-sessions"`
}
// this is a more specialized variant of json_in_notice
@ -923,6 +924,7 @@ func (ctl *server_ctl_stats) ServeHTTP(w http.ResponseWriter, req *http.Request)
stats.SshProxySessions = s.stats.ssh_proxy_sessions.Load()
stats.ServerPtySessions = s.stats.pty_sessions.Load()
stats.ServerRptySessions = s.stats.rpty_sessions.Load()
stats.ServerRpxSessions = s.stats.rpx_sessions.Load()
status_code = WriteJsonRespHeader(w, http.StatusOK)
if err = je.Encode(stats); err != nil { goto oops }