Describe the bug
On the latest debian (trixie) the users plugin does not correctly identify pts users because the format of the utmp device name line changed.
For some background, see https://bugzilla.redhat.com/show_bug.cgi?id=2343998 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112071 . The root cause seems to be:
- systemd creates utmp entries with a space in them (
sshd pts/0) which throws off the regex in the munin plugin
who does not have a well-structured, parseable output format (there isn't a \t delimiter or something like that)
- debian, and possibly other systems, no longer ship a
utmpdump program. That program is meant to give a well-structured, parseable output which would be an ideal replacement for who.
- debian, and possibly other systems, now use
wtmpdb as a backend for the wtmp file. However, doing a strace on who reveals that who/systemd is not opening the wtmpdb sqlite3 database to discover entries but instead browsing /run/systemd/sessions/.
I am not sure what the most reliable fix is here. The regex could be tweaked a bit. However, maybe it is worth moving to wtmpdb, loginctl, or utmpdump?
To Reproduce
Run users plugin on a Debian 13 system.
Expected behavior
A SSH login is parsed as a pts login, not as an other type.
Screenshots & Logs
root@dgilman:/etc/munin/plugins# ./users
tty.value 0
pty.value 0
pts.value 0
X.value 0
other.value 1
root@dgilman:/etc/munin/plugins# ls -alh users
lrwxrwxrwx 1 root root 30 Feb 26 2014 users -> /usr/share/munin/plugins/users
root@dgilman:/etc/munin/plugins# who
david sshd pts/0 2025-08-25 16:19 (666.777.888.999)
Desktop (please complete the following information):
Debian 13
Additional context
n/a
Describe the bug
On the latest debian (trixie) the users plugin does not correctly identify pts users because the format of the utmp device name line changed.
For some background, see https://bugzilla.redhat.com/show_bug.cgi?id=2343998 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112071 . The root cause seems to be:
sshd pts/0) which throws off the regex in the munin pluginwhodoes not have a well-structured, parseable output format (there isn't a\tdelimiter or something like that)utmpdumpprogram. That program is meant to give a well-structured, parseable output which would be an ideal replacement forwho.wtmpdbas a backend for the wtmp file. However, doing a strace onwhoreveals that who/systemd is not opening thewtmpdbsqlite3 database to discover entries but instead browsing/run/systemd/sessions/.I am not sure what the most reliable fix is here. The regex could be tweaked a bit. However, maybe it is worth moving to
wtmpdb,loginctl, orutmpdump?To Reproduce
Run
usersplugin on a Debian 13 system.Expected behavior
A SSH login is parsed as a
ptslogin, not as an other type.Screenshots & Logs
Desktop (please complete the following information):
Debian 13
Additional context
n/a