Who is *really* logged in?

Brad De Vries devriesbj at gmail.com
Mon Oct 22 08:49:22 PDT 2007


Hey all, I'm curious if someone can answer this question.  I ran a few
commands and it's not entirely clear to me.

$ who /var/log/wtmp | wc -l
23291
$ who | wc -l
579
$ who /var/run/utmp | wc -l
579
$ uptime
 11:39:04 up 97 days, 20:35, 579 users,  load average: 1.62, 1.05, 1.01
$ w | wc -l
51

$ cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

I've gathered that wtmp is historical whereas utmp is current, so I
can accept the first two answers.  What I can't understand is why
"who" and "uptime" show 579 users and "w" only shows 51.

The reason I started investigating this is because I see some users
logged in under "who" but when I try to "ps -ft pts/###" it responds
with "ERROR: TTY could not be found."

Any thoughts?

TIA,
Brad.



More information about the Linux-users mailing list