On 24/07/2026 19:38, Bruno Haible wrote:
Pádraig Brady wrote:
The coreutils package should include hints (for distributions)
about how to package coreutils, when these hints are not trivial.
The patch essentially recommends splitting who etc. to coreutils-multiuser.
Yes, this is the outcome of the requirement to easily be able to
create "minimal [chroot] environments", brought up by Luca Boccassi.
That probably makes sense. I'm quite surprised with the systemd runtime
overhead:
$ strace -c /bin/who 2>&1 | grep total
100.00 0.003110 6 459 15 total
$ strace -c git/coreutils/src/who 2>&1 | grep total
100.00 0.000000 0 140 8 total
My main point here is that the systemd variant had over 3x the number of
syscalls.
BTW both commands output the same on my system:
$ who
padraig seat0 2026-07-07 12:12
padraig tty2 2026-07-07 12:12
Is the first one not using systemd? How else would it get the info
about "seat0"? Are you saying that some systems (login managers) are
storing identifiers like "seat0" in /var/run/utmp?
Sorry I was inaccurate here. There is no seat info in utmp on Fedora 44 at
least.
$ src/who # no systemd
padraig tty2 2026-07-07 12:12 (local)
padraig pts/6 2026-07-14 12:26
$ /bin/who # uses systemd
padraig seat0 2026-07-07 12:12
padraig tty2 2026-07-07 12:12
$ src/who -a # no systemd
system boot 2026-07-07 11:53
padraig - tty2 2026-07-07 12:12 old 10855 (local)
pts/5 2026-07-10 10:26 225737 id=ts/5 term=0
exit=0
padraig - pts/6 2026-07-14 12:26 old 640542
pts/15 2026-07-16 12:20 702275 id=s/15 term=0
exit=0
pts/12 2026-07-18 12:58 801364 id=s/12 term=0
exit=0
pts/18 2026-07-22 20:50 1263794 id=s/18 term=0
exit=0
pts/10 2026-07-24 13:41 1493524 id=s/10 term=0
exit=0
$ /bin/who -a # uses systemd
system boot 2026-07-07 11:53
padraig ? seat0 2026-07-07 12:12 ? 10720
padraig - tty2 2026-07-07 12:12 old 10720
Thought the systemd variant produces less output with who -a
(I guess it has more info to suppress redundant entries?)
"who -a" basically displays all entries it finds. The difference is
probably that the various terminal emulators behave inconsistently
regarding /var/run/utmp but consistently regarding systemd.
cheers,
Padraig