Re: 'w' shows 2 users?!



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
.



Relevant Pages

  • Re: w shows 2 users?!
    ... When I run the w command on one box it says 2 users, but then lists just ... (if you've never tried it, theres a heading line, then it ... it's a multi user system, if you open several konsoles, then your single ...
    (alt.os.linux.suse)
  • Re: w shows 2 users?!
    ... When I run the w command on one box it says 2 users, but then lists just ... (if you've never tried it, theres a heading line, then it ... it's a multi user system, if you open several konsoles, then your single ... I'm the only one on as far as I know and only one session. ...
    (alt.os.linux.suse)
  • w shows 2 users?!
    ... 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) ...
    (alt.os.linux.suse)
  • Re: Unexpected alignment when using styles for headings 1, 1.1, 1.
    ... The reason to place the insertion point in the first top-level paragraph of ... a list (which for heading numbering means the first Heading 1 paragraph of ... modification with the insertion point elsewhere. ... "Why does Word restart the lists?" ...
    (microsoft.public.word.docmanagement)
  • Re: Two multilevel lists in one document
    ... the built-in heading styles. ... figure captions to saying Figure_Apx. ... The general principle remain the same in Word 2007: numbering should ... lists in my document. ...
    (microsoft.public.word.docmanagement)