|
Home > Archive > Red Hat General > January 2004 > system showing more users loggen in than there actually is
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
system showing more users loggen in than there actually is
|
|
|
| Is this a bug or what.
Problem :
i had two xterms up and one was running top showing 2 users which was fine.
At some point the other xterm crashed but the xterm running top still showed
2 users. i've done a w, who -d, finger and i couldn't find any reason why
the system still showed 2 users logged in. At that point only one user was
logged on.
Question:
Why is the system still showing 2 users when only one is loged in?
running Fedora Core 1 2.4.22-1.2138.nptlsmp
Now i don't want to hear that this is a fedora problem cuz i'm also running
FreeBSD and i can simulate the same problem. I think this is a kernel
problem.
| |
| Ali-Reza Anghaie 2004-01-23, 7:13 pm |
| In linux.redhat Rollo <rfjunk@sbcglobal.net> wrote:quote:
> Why is the system still showing 2 users when only one is loged in?
Top is saying 2 users have processes running.. i.e. you and root lets say.
Or if you have daemon processes running as different users, that will
also increase the counter, as long as those users have active processes
being given time.
Cheers, -Ali
--
OpenPGP Key: 030E44E6
--
Was I helpful?: http://svcs.affero.net/rm.php?r=packetknife
--
Only the dead have seen the end of war. -- Plato
| |
| Bill Marcum 2004-01-23, 7:13 pm |
| ["Followup-To:" header set to alt.linux.]
On Wed, 07 Jan 2004 06:38:54 GMT, Rollo
<rfjunk@sbcglobal.net> wrote:quote:
> Is this a bug or what.
>
> Problem :
> i had two xterms up and one was running top showing 2 users which was fine.
> At some point the other xterm crashed but the xterm running top still showed
> 2 users. i've done a w, who -d, finger and i couldn't find any reason why
> the system still showed 2 users logged in. At that point only one user was
> logged on.
>
> Question:
> Why is the system still showing 2 users when only one is loged in?
>
Here is a sample of "w" output on my system:
03:05:29 up 25 days, 4:54, 7 users, load average: 0.05, 0.03, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
bmarcum :0 - Sun22 ?xdm? 5:03m 0.07s -:0
bmarcum pts/4 :0.0 15:26 9:17m 1.12s 1.12s ssh -t
shiba sc
bmarcum pts/1 :0:S.0 Sun22 34:08 38.21s 8.94s aptitude
bmarcum pts/3 :0:S.2 Sun23 29:36 8.94s 8.94s mutt
bmarcum pts/6 :0:S.3 Mon10 2:44m 11.81s 11.81s mutt -f
mbox
bmarcum pts/2 :0:S.1 Sun22 6:22 1:12 1:12 slrn
bmarcum pts/5 :0:S.4 02:29 5.00s 0.32s 0.06s w
The "bmarcum :0" line is for the X display. The next line is an xterm,
and the others are sessions of "screen" all running on the same xterm.
I had another xterm that was started with the command "xterm -ut", so
it was not listed.
--
Absurd Procrustean Egghead Cornstarch Variant Bill Marcum
| |
| Bill Vermillion 2004-01-23, 7:13 pm |
| In article <2QNKb.5344$ir7.250@newssvr22.news.prodigy.com>,
Rollo <rfjunk@sbcglobal.net> wrote:quote:
>Is this a bug or what.
quote:
>Problem : i had two xterms up and one was running top showing 2
>users which was fine. At some point the other xterm crashed but
>the xterm running top still showed 2 users. i've done a w, who
>-d, finger and i couldn't find any reason why the system still
>showed 2 users logged in. At that point only one user was logged
>on.
That's not a problem - just a side effect of the crash.
Since it crashed and did not exit cleanly and thus remove
the entries in the utmp file which is used to keep track of
all current logins. Therefor the entry still exists for the
application which crashed and 'w' will still show them logged in.
quote:
>Question:
>Why is the system still showing 2 users when only one is loged in?
See above.
quote:
>running Fedora Core 1 2.4.22-1.2138.nptlsmp
quote:
>Now i don't want to hear that this is a fedora problem cuz i'm
>also running FreeBSD and i can simulate the same problem. I think
>this is a kernel problem.
It's a user problem by not cleanly logging out :-)
I've seen this on almost all Unix systems I've used in the last 20
years. It's not a bug. It's not a kernel problem. If anything
it is at the most a design flaw.
If this really bothers you go to /var/log and null out utmp.
Then 'w' will show no one logged in. When you log out and back in
new entries will be created.
Bill
--
Bill Vermillion - bv @ wjv . com
| |
| Ali-Reza Anghaie 2004-01-23, 7:14 pm |
| In linux.redhat Bill Vermillion <bv@wjv.comremove> wrote:quote:
> In article <2QNKb.5344$ir7.250@newssvr22.news.prodigy.com>,
> Rollo <rfjunk@sbcglobal.net> wrote:
>
>
> That's not a problem - just a side effect of the crash.
>
> Since it crashed and did not exit cleanly and thus remove
> the entries in the utmp file which is used to keep track of
> all current logins. Therefor the entry still exists for the
> application which crashed and 'w' will still show them logged in.
Hrmm. I read it differently than you.. the way I read it was that
his 'w' and such were returning the right values. Which, IIUC,
wouldn't have hapened in the situation you describe.
I should just pull the SRPM and check the code. You're probably
right.. I always understood it to be active user sessions/shells
with running processes. But things like my spamassassin would've
upped the count during counts but didn't, so that can't be
right. Erm.
Cheers, -Ali
--
OpenPGP Key: 030E44E6
--
Was I helpful?: http://svcs.affero.net/rm.php?r=packetknife
--
May you do Good Magic with Perl. -- Larry Wall
| |
|
|
"Ali-Reza Anghaie" <ali@packetknife.com> wrote in message
news:DtGdnRL9YqlDv2OiRVn-iQ@speakeasy.net...quote:
> In linux.redhat Bill Vermillion <bv@wjv.comremove> wrote:
>
> Hrmm. I read it differently than you.. the way I read it was that
> his 'w' and such were returning the right values. Which, IIUC,
> wouldn't have hapened in the situation you describe.
>
> I should just pull the SRPM and check the code. You're probably
> right.. I always understood it to be active user sessions/shells
> with running processes. But things like my spamassassin would've
> upped the count during counts but didn't, so that can't be
> right. Erm.
>
> Cheers, -Ali
>
> --
> OpenPGP Key: 030E44E6
> --
> Was I helpful?: http://svcs.affero.net/rm.php?r=packetknife
> --
> May you do Good Magic with Perl. -- Larry Wall
To the response from Bill
you are right. /var/run/utmp is read and i think that's where it gets it's
information from. So a crash maybe would not update/touch this file. This
file would show crashed sessions as well as logins. I found that if you list
/dev/pts it would show active sessions in real time.
I haven't rebooted yet but top says 2 users.- listing /dev/pts shows...
[root@dual /]# ls -l /dev/pts
total 0
crw--w---- 1 root tty 136, 0 Jan 9 00:29 0
[root@dual /]#
So there - one user logged on which at this time there is only one user
logged on....
So the thing i don't like is w, who, top, finger is accurate assuming no
xterm or telnet crashes or zombies.
| |
| Bill Vermillion 2004-01-23, 7:14 pm |
| In article <wZrLb.7335$o13.3119@newssvr23.news.prodigy.com>,
Rollo <rfjunk@sbcglobal.net> wrote:quote:
>
>"Ali-Reza Anghaie" <ali@packetknife.com> wrote in message
>news:DtGdnRL9YqlDv2OiRVn-iQ@speakeasy.net...
[QUOTE][color=darkred]
>To the response from Bill
quote:
>you are right. /var/run/utmp is read and i think that's where
>it gets it's information from. So a crash maybe would not
>update/touch this file. This file would show crashed sessions as
>well as logins. I found that if you list /dev/pts it would show
>active sessions in real time.
quote:
>I haven't rebooted yet but top says 2 users.- listing /dev/pts shows...
You don't have to reboot. Just cd to /var/run andquote:
> utmp That is somewhat shell dependant. But removing the
contents of utmp will not crash the system. Then if you want
things to look right after doing that, just log out and log back
in.
There have been some other *n*x systems where the contents of utmp
have caused problems with scripts that limited the logins for
users. They could come in with a PC ap, and do other things on the
PC. At the end of they day they'd shut down their PC without
closing the session to the *n*x system, and the next day they could
not log in. That has been where I've seen the most complaints.
quote:
>[root@dual /]# ls -l /dev/pts
>total 0
>crw--w---- 1 root tty 136, 0 Jan 9 00:29 0
>[root@dual /]#
quote:
>So there - one user logged on which at this time there is only
>one user logged on....
quote:
>So the thing i don't like is w, who, top, finger is accurate
>assuming no xterm or telnet crashes or zombies.
Until computers get a hell of a lot smarter you are going to ahve
to live with that :-)
Bill
--
Bill Vermillion - bv @ wjv . com
| |
|
|
"Bill Vermillion" <bv@wjv.comREMOVE> wrote in message
news:Hr4L4C.wv9@wjv.com...quote:
> In article <2QNKb.5344$ir7.250@newssvr22.news.prodigy.com>,
> Rollo <rfjunk@sbcglobal.net> wrote:
>
>
> That's not a problem - just a side effect of the crash.
>
> Since it crashed and did not exit cleanly and thus remove
> the entries in the utmp file which is used to keep track of
> all current logins. Therefor the entry still exists for the
> application which crashed and 'w' will still show them logged in.
>
>
>
> See above.
>
>
>
> It's a user problem by not cleanly logging out :-)
>
> I've seen this on almost all Unix systems I've used in the last 20
> years. It's not a bug. It's not a kernel problem. If anything
> it is at the most a design flaw.
>
> If this really bothers you go to /var/log and null out utmp.
> Then 'w' will show no one logged in. When you log out and back in
> new entries will be created.
>
> Bill
>
>
> --
> Bill Vermillion - bv @ wjv . com
Thanks for the info Bill
|
|
|
|
|