Re: 'w' shows 2 users?!
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Wed, 30 Apr 2008 14:59:56 -0500
On Tue, 29 Apr 2008, in the Usenet newsgroup alt.os.linux.suse, in article
<dVORj.111147$Ft5.68466@xxxxxxxxxxxx>, moe wrote:
watcher@xxxxxxxxxxxxxxx wrote:
anoncoholic wrote:
Vincent Batts wrote:
anoncoholic <no@xxxxxx> wrote:
When I run the w command on one box it says 2 users, but then
lists just one, me. (if you've never tried it, theres a heading
line, then it lists all the users on the following lines) When I
type who, I see only 1 user, me. Why does w say 2 users, and who
is this mystery user??
`man w`
I'm the only one on as far as I know and only one session. via ssh.
When I run 'w', I see _3_ users. If I run 'who', it shows me as
logged into screen 0 of X, and into two pseudo-ttys. All correct, as
far as I can tell.
I rebooted. Its working correctly now. Must have been some kind of hung
session.
Like it says - "man w". You are looking at two different sources of
data.
FILES
/etc/utmp information about who is currently logged on
/proc process information
What this _sounds_ like is that you had a login of some kind that wasn't
shut down cleanly, and the entry in /etc/utmp didn't get corrected. When
you rebooted, that file gets zeroed by one of the initial boot scripts
(/etc/rc.d/rc.sysinit on this system has a line that reads
>/var/run/utmp
which uses shell re-direction to overwrite that file with '' - which is
to say, "nothing"). On the other hand, if you look in /proc/ you'll
find a number of processes, and that's where the individual lines about
each user is coming from.
You'll also want to look at the man page for 'utmp'.
Old guy
.
- References:
- 'w' shows 2 users?!
- From: anoncoholic
- Re: 'w' shows 2 users?!
- From: Vincent Batts
- Re: 'w' shows 2 users?!
- From: anoncoholic
- Re: 'w' shows 2 users?!
- From: watcher
- Re: 'w' shows 2 users?!
- From: moe
- 'w' shows 2 users?!
- Prev by Date: Re: Folding in Bluefish
- Next by Date: Re: System Memory
- Previous by thread: Re: 'w' shows 2 users?!
- Next by thread: Re: 'w' shows 2 users?!
- Index(es):
Relevant Pages
|
|