• Bug#1109585: procps: the 'w' command doesn't show multiple sessions in

    From Mikulas Patocka@21:1/5 to All on Sun Jul 20 15:10:01 2025
    Package: procps
    Version: 2:4.0.4-8
    Severity: important

    Dear Maintainer,

    *** Reporter, please consider answering these questions, where appropriate ***

    * What led up to the situation?

    Recently, the 'w' command stopped showing sessions when there are multiple sessions in the same ssh connection.

    * What exactly did you do (or not do) that was effective (or
    ineffective)?

    1. Set up ssh so that it uses shared connection for multiple sessions:
    add these lines to /etc/ssh/ssh_config
    ControlMaster auto
    ControlPath ~/.ssh/socket-%h-%p-%r
    ControlPersist 60

    2. Open multiple terminals and create multiple connection to the same ssh
    host that is running Debian Sid or Trixie

    3. Run 'w' in one of the sessions on the remote host

    * What was the outcome of this action?

    You get output like:
    14:11:00 up 32 min, 2 users, load average: 1,03, 1,53, 1,21
    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
    mikulas pts/0 192.168.1.1 13:59 11:16 8:25 8:25 w

    'w' shows only one line despite the fact that there are multiple
    connections

    * What outcome did you expect instead?

    You should see separate line for each session, such as:
    14:11:00 up 32 min, 3 users, load average: 1,03, 1,53, 1,21
    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
    mikulas pts/0 192.168.1.1 13:59 11:16 8:25 8:25 w
    mikulas pts/1 192.168.1.1 13:59 11:16 8:25 8:25 -bash
    mikulas pts/2 192.168.1.1 13:59 11:16 8:25 8:25 -bash

    *** End of the template - remove these template lines ***




    Note that on systems with sysvinit and without systemd, it 'w' shows
    multiple lines, but all the lines show the same terminal and the same
    command. For example this:
    14:15:43 up 15 min, 3 users, load average: 0,00, 0,00, 0,00
    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
    mikulas pts/2 192.168.1.1 14:15 0.00s 0.01s ? w
    mikulas pts/2 192.168.1.1 14:15 0.00s 0.01s ? w
    mikulas pts/2 192.168.1.1 14:15 0.00s 0.01s ? w

    -- System Information:
    Debian Release: 13.0
    APT prefers unreleased
    APT policy: (500, 'unreleased'), (500, 'unstable'), (1, 'experimental') Architecture: hppa (parisc64)

    Kernel: Linux 6.13.2 (SMP w/4 CPU threads)
    Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)

    Versions of packages procps depends on:
    ii init-system-helpers 1.68
    ii libc6 2.41-10
    ii libncursesw6 6.5+20250216-2
    ii libproc2-0 2:4.0.4-8
    ii libsystemd0 257.7-1
    ii libtinfo6 6.5+20250216-2

    Versions of packages procps recommends:
    pn linux-sysctl-defaults <none>
    ii psmisc 23.7-2

    procps suggests no packages.

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Craig Small@21:1/5 to Mikulas Patocka on Mon Jul 28 23:40:02 2025
    On Sun, 20 Jul 2025 at 23:03, Mikulas Patocka <[email protected]> wrote:


    Recently, the 'w' command stopped showing sessions when there are multiple sessions in the same ssh connection.

    w gets that information from systemd. Could you tell me what the output of loginctl
    is?

    It might be that systemd thinks it is a single user, they also did
    something in the libsystemd
    library around ssh sessions to fix some tty issues.

    - Craig

    <div dir="ltr"><div dir="ltr">On Sun, 20 Jul 2025 at 23:03, Mikulas Patocka &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:
    0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br> Recently, the &#39;w&#39; command stopped showing sessions when there are multiple<br>
    sessions in the same ssh connection.<br></blockquote><div>w gets that information from systemd. Could you tell me what the output of loginctl</div><div>is?</div><div><br></div><div>It might be that systemd thinks it is a single user, they also did
    something in the libsystemd</div><div>library around ssh sessions to fix some tty issues.</div><div><br></div><div> - Craig</div><div><br></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)