retitle 1128306 systemd-logind does not delete ssh sessions
reassign 1128306 systemd
thankyou

On Thu, 19 Feb 2026 at 01:37, Brendan Reilly <[email protected]> wrote:

> % w
>  09:15:23 up 34 days, 10:46, 174 users,  load average: 0.20, 0.09, 0.16
> USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU  WHAT
> reilly            108.29.139.238   08:46           0.00s  0.01s
> sshd-session: reill
> reilly            192.168.1.183    08:43           0.00s  0.01s
> sshd-session: reill
> reilly            192.168.1.183    08:43           0.00s  0.01s
> sshd-session: reill
>
A count of 174 but only three displayed, was this snipped?
Both the count and detail lines iterate over sd_get_sessions() and show
only classes that start with user.


> % loginctl
> SESSION  UID USER   SEAT  LEADER  CLASS   TTY  IDLE SINCE
>  100089 6631 reilly -     67781   user    -    no   -
>
[many reilly user sessions here]

176 sessions listed.
>
176, two of these are not user* sessions, so 174 for the w line is correct.

There's something not going right with the ssh sessions and systemd-logind
where they're not getting deleted.
w is just printing what it is given by sd_get_sessions(), so it's a symptom
not a cause.

I'm not sure exactly what is going on with these sessions, but it's not
procps doing this. Both loginctl and w show
the same number of users.

 - Craig

Reply via email to