really a problem with utmp/wtmp, but takes the same approach as who(1).
Reviewed by: knu (mentor), mini, silence on -audit
Approved by: knu (mentor), mini
into addresses as we have no idea what address family they belong to.
When -n is not specified, resolve IPv6 as well as IPv4 addresses found
in the host field of utmp. Use realhostname_sa() to resolve addresses
(the old code was wrong).
Rename ``x'' to ``x_suffix'' to avoid confusion.
Hard code the host column width to 16 (against the imminent increase
of UT_HOSTSIZE in utmp.h).
the idle time instead of the atime.
This makes entries for people that have logged in but done nothing
else show up correctly.
Reviewed by: markk@knigma.org
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.
match with all of them, rather than only supporting a single user.
PR: 11121
Kinda submitted by: James Howard <howardjp@byzantine.student.umd.edu>
Reviewed by: DES
one character shorter than the previous in a stairstep fashion when long
idle times were involved.
A couple of nits:
- spelling/typo fix.
- some of the easier style(9) fixes where it was bothering me.
- Handle 100+ days idle time (ha!). Probably the right thing to do is
to do a snprintf into a buffer and strlen the result rather than doing
hackery on magic numbers.
XXX the wide (and mostly unused) username and tty columns annoy me since
it it could be used for more useful information for the command. We should
actually count the largest username and tty and adjust like 'ls -l' does.
as large as UT_LINESIZE (/usr/include/utmp.h). If the tty name is logged
with this size why isn't the w command reporting it?
(We should probably report the tty/cua prefix then as well ? /phk)
PR: 4187
Reviewed by: phk
Submitted by: Jorge M. Goncalves <ee96199@tom.fe.up.pt>
This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports.. eg: specialix and digiboard.
This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.