'w' shows 2 users?! - Suse

This is a discussion on 'w' shows 2 users?! - Suse ; Hello Susers, 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) ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: 'w' shows 2 users?!

  1. 'w' shows 2 users?!

    Hello Susers,

    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??

  2. Re: 'w' shows 2 users?!

    On 2008-04-26, anoncoholic wrote:
    > Hello Susers,
    >
    > 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??

    it's a multi user system, if you open several konsoles, then your single
    user can have several logins to the system, very not uncommon, i
    currently am logged in 7 times, in the same session. try
    `man w`

    vb

  3. Re: 'w' shows 2 users?!

    Vincent Batts wrote:
    > On 2008-04-26, anoncoholic wrote:
    >> Hello Susers,
    >>
    >> 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??

    > it's a multi user system, if you open several konsoles, then your single
    > user can have several logins to the system, very not uncommon, i
    > currently am logged in 7 times, in the same session. try
    > `man w`
    >
    > vb


    I'm the only one on as far as I know and only one session. via ssh.

  4. Re: 'w' shows 2 users?!

    In article <481360af$1@news.acsalaska.net>, anoncoholic wrote:
    > Vincent Batts wrote:
    >> On 2008-04-26, anoncoholic wrote:
    >>> Hello Susers,
    >>>
    >>> 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??

    >> it's a multi user system, if you open several konsoles, then your single
    >> user can have several logins to the system, very not uncommon, i
    >> currently am logged in 7 times, in the same session. try
    >> `man w`
    >>
    >> vb

    >
    > 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.

    W.

  5. Re: 'w' shows 2 users?!

    On Fri, 25 Apr 2008, in the Usenet newsgroup alt.os.linux.suse, in article
    <48127d87$1@news.acsalaska.net>, anoncoholic 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??


    Talk about no information - what distribution/release - what mode of
    login (GUI verses CLI - meaning runlevel 5 verses 3) - how are you
    running this command?

    Here, the 'w' command reports (and lists) 20 users, as does 'who' and
    'users', Using 'ps aux | grep bash' (because all of the users are using
    the bash shell), lists one extra shell, which is the sub-shell used to
    run the grep command in a pipe.

    Another command that may give clues is 'ps afuwx' which will show all
    processes on the system.

    Old guy

  6. Re: 'w' shows 2 users?!

    watcher@moog.netaxs.com wrote:
    > In article <481360af$1@news.acsalaska.net>, anoncoholic wrote:
    >> Vincent Batts wrote:
    >>> On 2008-04-26, anoncoholic wrote:
    >>>> Hello Susers,
    >>>>
    >>>> 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??
    >>> it's a multi user system, if you open several konsoles, then your single
    >>> user can have several logins to the system, very not uncommon, i
    >>> currently am logged in 7 times, in the same session. try
    >>> `man w`
    >>>
    >>> vb

    >> 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.
    >
    > W.


    I rebooted. Its working correctly now. Must have been some kind of hung
    session.

  7. Re: 'w' shows 2 users?!

    On Tue, 29 Apr 2008, in the Usenet newsgroup alt.os.linux.suse, in article
    , moe wrote:

    >watcher@moog.netaxs.com wrote:


    >> anoncoholic wrote:


    >>> Vincent Batts wrote:


    >>>> anoncoholic 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

+ Reply to Thread