File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2077,6 +2077,18 @@ format_cb_scroll_region_upper(struct format_tree *ft)
20772077 return (NULL );
20782078}
20792079
2080+ /* Callback for server_sessions. */
2081+ static void *
2082+ format_cb_server_sessions (__unused struct format_tree * ft )
2083+ {
2084+ struct session * s ;
2085+ u_int n = 0 ;
2086+
2087+ RB_FOREACH (s , sessions , & sessions )
2088+ n ++ ;
2089+ return (format_printf ("%u" , n ));
2090+ }
2091+
20802092/* Callback for session_attached. */
20812093static void *
20822094format_cb_session_attached (struct format_tree * ft )
@@ -2980,6 +2992,9 @@ static const struct format_table_entry format_table[] = {
29802992 { "scroll_region_upper" , FORMAT_TABLE_STRING ,
29812993 format_cb_scroll_region_upper
29822994 },
2995+ { "server_sessions" , FORMAT_TABLE_STRING ,
2996+ format_cb_server_sessions
2997+ },
29832998 { "session_activity" , FORMAT_TABLE_TIME ,
29842999 format_cb_session_activity
29853000 },
Original file line number Diff line number Diff line change @@ -5278,6 +5278,7 @@ The following variables are available, where appropriate:
52785278.It Li " selection_present" Ta " " Ta " 1 if selection started in copy mode"
52795279.It Li " selection_start_x" Ta " " Ta " X position of the start of the selection"
52805280.It Li " selection_start_y" Ta " " Ta " Y position of the start of the selection"
5281+ .It Li " server_sessions" Ta " " Ta " Number of sessions"
52815282.It Li " session_activity" Ta " " Ta " Time of session last activity"
52825283.It Li " session_alerts" Ta " " Ta " List of window indexes with alerts"
52835284.It Li " session_attached" Ta " " Ta " Number of clients session is attached to"
You can’t perform that action at this time.
0 commit comments