I'm perplexed over the output of who versus w. who displays 8 'users', two of which I know for sure are not logged on the box. ( the last two entries ). helphand :0 2005-06-18 10:36 (console) root tty1 2005-06-11 21:11 helphand pts/0 2005-06-18 10:36 helphand pts/2 2005-06-18 10:36 helphand pts/1 2005-06-18 10:36 helphand pts/4 2005-06-18 16:19 dirtkid pts/6 2005-06-18 19:12 dirtkid pts/7 2005-06-18 19:15 w displays 6 'users', yet the count on the first line agrees with 'who', it says 8 users. helphand@helphand:~> w 23:17:49 up 9 days, 5:12, 8 users, load average: 0.04, 0.10, 0.09 USER TTY LOGIN@ IDLE JCPU PCPU WHAT helphand :0 10:36 ?xdm? 1:18m 0.07s /bin/sh /usr/X11R6/bin/kde root tty1 11Jun05 7days 0.13s 0.13s -bash helphand pts/0 10:36 12:41m 0.00s 27.23s kded [kdeinit] kded helphand pts/2 10:36 11:19m 0.66s 0.11s /bin/bash helphand pts/1 10:36 2:58m 0.21s 0.09s /bin/bash helphand pts/4 16:19 0.00s 0.29s 0.00s w helphand@helphand:~> A ps shows no processes running under the 'user' that lists in who; helphand@helphand:~> ps -ef | grep dirtkid helphand 10752 23285 0 23:18 pts/4 00:00:00 grep dirtkid So, why aren't these utilities consistent and why does 'who' see users as logged in when they are not? SuSE 9.3 64 bit. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
On Sat, 2005-06-18 at 23:21 -0700, Scott Leighton wrote:
I'm perplexed over the output of who versus w. who displays 8 'users', two of which I know for sure are not logged on the box. ( the last two entries ).
helphand :0 2005-06-18 10:36 (console) root tty1 2005-06-11 21:11 helphand pts/0 2005-06-18 10:36 helphand pts/2 2005-06-18 10:36 helphand pts/1 2005-06-18 10:36 helphand pts/4 2005-06-18 16:19 dirtkid pts/6 2005-06-18 19:12 dirtkid pts/7 2005-06-18 19:15
w displays 6 'users', yet the count on the first line agrees with 'who', it says 8 users.
helphand@helphand:~> w 23:17:49 up 9 days, 5:12, 8 users, load average: 0.04, 0.10, 0.09 USER TTY LOGIN@ IDLE JCPU PCPU WHAT helphand :0 10:36 ?xdm? 1:18m 0.07s /bin/sh /usr/X11R6/bin/kde root tty1 11Jun05 7days 0.13s 0.13s -bash helphand pts/0 10:36 12:41m 0.00s 27.23s kded [kdeinit] kded helphand pts/2 10:36 11:19m 0.66s 0.11s /bin/bash helphand pts/1 10:36 2:58m 0.21s 0.09s /bin/bash helphand pts/4 16:19 0.00s 0.29s 0.00s w helphand@helphand:~>
What does last | grep dirtkid show? Do the logins show after a reboot? -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
On Sunday 19 June 2005 3:45 am, Ken Schneider wrote:
On Sat, 2005-06-18 at 23:21 -0700, Scott Leighton wrote:
I'm perplexed over the output of who versus w. who displays 8 'users', two of which I know for sure are not logged on the box. ( the last two entries ).
helphand :0 2005-06-18 10:36 (console) root tty1 2005-06-11 21:11 helphand pts/0 2005-06-18 10:36 helphand pts/2 2005-06-18 10:36 helphand pts/1 2005-06-18 10:36 helphand pts/4 2005-06-18 16:19 dirtkid pts/6 2005-06-18 19:12 dirtkid pts/7 2005-06-18 19:15
w displays 6 'users', yet the count on the first line agrees with 'who', it says 8 users.
helphand@helphand:~> w 23:17:49 up 9 days, 5:12, 8 users, load average: 0.04, 0.10, 0.09 USER TTY LOGIN@ IDLE JCPU PCPU WHAT helphand :0 10:36 ?xdm? 1:18m 0.07s /bin/sh /usr/X11R6/bin/kde root tty1 11Jun05 7days 0.13s 0.13s -bash helphand pts/0 10:36 12:41m 0.00s 27.23s kded [kdeinit] kded helphand pts/2 10:36 11:19m 0.66s 0.11s /bin/bash helphand pts/1 10:36 2:58m 0.21s 0.09s /bin/bash helphand pts/4 16:19 0.00s 0.29s 0.00s w helphand@helphand:~>
What does last | grep dirtkid show? Do the logins show after a reboot?
last shows gone - no logout, which makes sense to me. It was my son using CywinX from a laptop to run the gimp. I suspected that he didn't logout properly when he finished, which is why I used 'who' in the first place and noticed the discrepancies. helphand@helphand:~> last | grep dirtkid dirtkid pts/7 Sat Jun 18 19:15 gone - no logout dirtkid pts/6 Sat Jun 18 19:12 gone - no logout dirtkid pts/5 192.168.1.101 Sat Jun 18 19:11 - 21:52 (02:41) He still shows up in 'who' this morning, I haven't rebooted yet. I'll try that after I've exhausted other points of investigation. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
* Scott Leighton <helphand@pacbell.net> [06-19-05 10:30]:
last shows gone - no logout, which makes sense to me. It was my son using CywinX from a laptop to run the gimp. I suspected that he didn't logout properly when he finished, which is why I used 'who' in the first place and noticed the discrepancies.
helphand@helphand:~> last | grep dirtkid dirtkid pts/7 Sat Jun 18 19:15 gone - no logout dirtkid pts/6 Sat Jun 18 19:12 gone - no logout dirtkid pts/5 192.168.1.101 Sat Jun 18 19:11 - 21:52 (02:41)
He still shows up in 'who' this morning, I haven't rebooted yet. I'll try that after I've exhausted other points of investigation.
Quoting trimmed. You are using linux, not windoz. A reboot is not necessary. Determine the process id's of the two instances you wish killed and kill them. You may have to process as root if you do not have permissions for "dirtkid". -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery
On Sunday 19 June 2005 8:38 am, Patrick Shanahan wrote:
Quoting trimmed.
You are using linux, not windoz. A reboot is not necessary. Determine the process id's of the two instances you wish killed and kill them. You may have to process as root if you do not have permissions for "dirtkid".
Humm, that's just the problem. There _are no_ process id's associated with the user 'dirtkid', who shows up in the 'who' display. Nothing to kill. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
* Scott Leighton <helphand@pacbell.net> [06-19-05 10:51]:
Humm, that's just the problem. There _are no_ process id's associated with the user 'dirtkid', who shows up in the 'who' display. Nothing to kill.
Use another tool. Linux is famous for tools. ie: ps aux | grep dirtkid -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery
On Sunday 19 June 2005 9:17 am, Patrick Shanahan wrote:
* Scott Leighton <helphand@pacbell.net> [06-19-05 10:51]:
Humm, that's just the problem. There _are no_ process id's associated with the user 'dirtkid', who shows up in the 'who' display. Nothing to kill.
Use another tool. Linux is famous for tools.
ie: ps aux | grep dirtkid
Tried that a lot earlier in the thread, no go. helphand@helphand:~> who helphand :0 2005-06-18 10:36 (console) root tty1 2005-06-11 21:11 helphand pts/0 2005-06-18 10:36 helphand pts/2 2005-06-18 10:36 helphand pts/1 2005-06-18 10:36 helphand pts/4 2005-06-18 16:19 dirtkid pts/6 2005-06-18 19:12 dirtkid pts/7 2005-06-18 19:15 helphand@helphand:~> ps aux | grep dirtkid helphand 29358 0.0 0.0 3784 756 pts/4 R+ 09:27 0:00 grep dirtkid helphand@helphand:~> Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
* Scott Leighton <helphand@pacbell.net> [06-19-05 11:34]:
Tried that a lot earlier in the thread, no go.
helphand :0 2005-06-18 10:36 (console) root tty1 2005-06-11 21:11 helphand pts/0 2005-06-18 10:36 helphand pts/2 2005-06-18 10:36 helphand pts/1 2005-06-18 10:36 helphand pts/4 2005-06-18 16:19 dirtkid pts/6 2005-06-18 19:12 dirtkid pts/7 2005-06-18 19:15
helphand@helphand:~> ps aux | grep dirtkid helphand 29358 0.0 0.0 3784 756 pts/4 R+ 09:27 0:00 grep dirtkid helphand@helphand:~>
?? ps aux | grep pts\/[6,7] -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery
On Sunday 19 June 2005 10:01 am, Patrick Shanahan wrote:
ps aux | grep pts\/[6,7]
helphand@helphand:~> ps aux | grep pts\/[6,7] helphand@helphand:~> Nope, nothing. Anders made the following comment...
'who' just reads from the utmp or wtmp databases. If they didn't log out 'properly' this database will be out of sync and 'who' will still show the user as logged in.
So, basically that explains the strange who results. I'll mark it up as 'mystery solved'. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
* Scott Leighton <helphand@pacbell.net> [06-19-05 10:30]:
last shows gone - no logout, which makes sense to me. It was my son using CywinX from a laptop to run the gimp. I suspected that he didn't logout properly when he finished, which is why I used 'who' in the first place and noticed the discrepancies.
helphand@helphand:~> last | grep dirtkid dirtkid pts/7 Sat Jun 18 19:15 gone - no logout dirtkid pts/6 Sat Jun 18 19:12 gone - no logout dirtkid pts/5 192.168.1.101 Sat Jun 18 19:11 - 21:52 (02:41)
He still shows up in 'who' this morning, I haven't rebooted yet. I'll try that after I've exhausted other points of investigation.
Quoting trimmed.
You are using linux, not windoz. A reboot is not necessary. Determine the process id's of the two instances you wish killed and kill them. You may have to process as root if you do not have permissions for "dirtkid". There will not be any processes. The logins are being reported because
On Sun, 2005-06-19 at 10:38 -0500, Patrick Shanahan wrote: they system still an incorrect entry in the last database that was not cleared because of a bad logout. I don't know if even a reboot will clear them. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
On Sunday 19 June 2005 17:28, Scott Leighton wrote:
last shows gone - no logout, which makes sense to me. It was my son using CywinX from a laptop to run the gimp. I suspected that he didn't logout properly when he finished, which is why I used 'who' in the first place and noticed the discrepancies.
helphand@helphand:~> last | grep dirtkid dirtkid pts/7 Sat Jun 18 19:15 gone - no logout dirtkid pts/6 Sat Jun 18 19:12 gone - no logout dirtkid pts/5 192.168.1.101 Sat Jun 18 19:11 - 21:52 (02:41)
He still shows up in 'who' this morning, I haven't rebooted yet. I'll try that after I've exhausted other points of investigation.
'who' just reads from the utmp or wtmp databases. If they didn't log out 'properly' this database will be out of sync and 'who' will still show the user as logged in.
On Sunday 19 June 2005 10:04 am, Anders Johansson wrote:
'who' just reads from the utmp or wtmp databases. If they didn't log out 'properly' this database will be out of sync and 'who' will still show the user as logged in.
Thanks Anders, that explanation makes sense and explains what I am seeing. I feel better knowing there is a logical explanation for the strange results <g>. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
Scott Leighton wrote:
I'm perplexed over the output of who versus w. who displays 8 'users', two of which I know for sure are not logged on the box. ( the last two entries ).
helphand :0 2005-06-18 10:36 (console) root tty1 2005-06-11 21:11 helphand pts/0 2005-06-18 10:36 helphand pts/2 2005-06-18 10:36 helphand pts/1 2005-06-18 10:36 helphand pts/4 2005-06-18 16:19 dirtkid pts/6 2005-06-18 19:12 dirtkid pts/7 2005-06-18 19:15
w displays 6 'users', yet the count on the first line agrees with 'who', it says 8 users.
helphand@helphand:~> w 23:17:49 up 9 days, 5:12, 8 users, load average: 0.04, 0.10, 0.09 USER TTY LOGIN@ IDLE JCPU PCPU WHAT helphand :0 10:36 ?xdm? 1:18m 0.07s /bin/sh /usr/X11R6/bin/kde root tty1 11Jun05 7days 0.13s 0.13s -bash helphand pts/0 10:36 12:41m 0.00s 27.23s kded [kdeinit] kded helphand pts/2 10:36 11:19m 0.66s 0.11s /bin/bash helphand pts/1 10:36 2:58m 0.21s 0.09s /bin/bash helphand pts/4 16:19 0.00s 0.29s 0.00s w helphand@helphand:~>
A ps shows no processes running under the 'user' that lists in who;
helphand@helphand:~> ps -ef | grep dirtkid helphand 10752 23285 0 23:18 pts/4 00:00:00 grep dirtkid
So, why aren't these utilities consistent and why does 'who' see users as logged in when they are not? SuSE 9.3 64 bit.
Scott
I'm seeing the same counts on 9.3 x86 and x86_64 for both, who (GNU coreutils) 5.3.0 and procps version 3.2.5 for w. I'm perplexed also as to why your numbers differ. "w" doesn't appear in my output from the w command. I haven't done a YOU in a while, that may be worth considering as a factor -- the versions may highlight this. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Keen licensed Private Pilot Retired IBM Mainframes and Sun Servers Tech Support Specialist Microsoft Windows Free Zone - Linux used for all Computing Tasks
On Sunday 19 June 2005 4:01 am, Sid Boyce wrote:
I'm seeing the same counts on 9.3 x86 and x86_64 for both, who (GNU coreutils) 5.3.0 and procps version 3.2.5 for w. I'm perplexed also as to why your numbers differ. "w" doesn't appear in my output from the w command. I haven't done a YOU in a while, that may be worth considering as a factor -- the versions may highlight this. Regards Sid.
I appear to have the same versions you have. I _am_ completely up to date on YOU patches. helphand@helphand:~> who --v who (GNU coreutils) 5.3.0 helphand@helphand:~> w -V procps version 3.2.5 helphand@helphand:~> uname -a Linux helphand 2.6.11.4-21.7-default #1 Thu Jun 2 14:23:14 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux Everything is working fine, I'm just befuddled as to why who shows him still logged in, even as of this morning. As noted in a response to Ken, he shows up in last as gone - no logout. That's about the only clue I have at the moment. helphand@helphand:~> last | grep dirtkid dirtkid pts/7 Sat Jun 18 19:15 gone - no logout dirtkid pts/6 Sat Jun 18 19:12 gone - no logout dirtkid pts/5 192.168.1.101 Sat Jun 18 19:11 - 21:52 (02:41) Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-21.7-default x86_64
participants (5)
-
Anders Johansson
-
Ken Schneider
-
Patrick Shanahan
-
Scott Leighton
-
Sid Boyce