On Wed, 8 May 2024 at 09:03, Jun MO <royclark...@gmail.com> wrote: > 1) I hope there will still be the original > w(1)/last(1)/lastb(1)/lastlog(1)/faillog(1) > tools which can still read *old* format utmp/wtmp/lastlog in Debian at > least for > a while after switch to Y2038-safe replacements. Those tools can read >
I can only speak for w. It currently prefers what it gets from systemd or elogind, effectively iterating over the sessions coming from sd_get_sessions() if sd_booted() returns true. If sd_booted() returns false, then it uses the old utmp/utmpx files for now. Besides the Y2038 issue, the utmp "API" is pretty awful with things like errors pretty much undetectable. There is also the problem about who (e.g. which process) should be writing to those files as you have pointed out in your email. For now w/uptime will use utmp as a fallback, but I'll be happy if this gets updated to something better; it's a low-priority for me because systemd/elogind do what I need most of the time. - Craig