Add a number of new formats to inspect what sessions and clients a

window is present or active in. From Tyler Culp in GitHub issue 2034.
This commit is contained in:
nicm
2019-12-26 11:04:58 +00:00
parent 07e37479c2
commit 817d199cbb
4 changed files with 238 additions and 1 deletions

View File

@ -569,7 +569,20 @@ session_group_count(struct session_group *sg)
n = 0;
TAILQ_FOREACH(s, &sg->sessions, gentry)
n++;
n++;
return (n);
}
/* Count number of clients attached to sessions in session group. */
u_int
session_group_attached_count(struct session_group *sg)
{
struct session *s;
u_int n;
n = 0;
TAILQ_FOREACH(s, &sg->sessions, gentry)
n += s->attached;
return (n);
}