Operating System - HP-UX
1753814 Members
7774 Online
108805 Solutions
New Discussion юеВ

Re: who command show stale logins

 
David P Britton
New Member

who command show stale logins

Hi,

When I run who, I'm showing a ton of stale logins. Most have come from ssh logins it seems (pts). When I log in again, it reclaims one of the stale login pts, so I don't think this is a danger of running out of PTSs.

However the who is out of date, so that is quite annoying to see 60 logged in users, but only have about 10.

I haven't done a lot of narrowing down, since if this is a common problem I'm sure someone else has seen it and maybe has a quick suggestion or answer. But if needed I can experiment some more.

Thanks!

David
2 REPLIES 2
RAC_1
Honored Contributor

Re: who command show stale logins

May be corrupted /var/adm/utmp file. You can just null it out. (You can also use fwtmpfix command to fix it.)

> /var/adm/wtmp

who
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: who command show stale logins

The who command at best is an approximation and is only and good as the underlying wtmp/utmp files. If this botherws you you can use the fwtmp command the read the binary file out as text, clean up the bogus entries, and then use the fwtmp command again to read the edited text file out as a binary. Because the who output should really never be trusted, it's really better to use the ps command to determine who is on your system. Man fwtmp for details.
If it ain't broke, I can fix that.