LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-06-2007, 10:55 AM   #1
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
ssh login stat problem


In some of the server when I check the users logged in through the "uptime" command it shows me more number of users logged in whereas when I use the "who" and "w" command it reports me much less numbers actually logged in.

Can anyone advise why this difference is there and how I can find a remedy for this.

The server is a RHEL 3 update 6.
 
Old 08-06-2007, 11:27 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
post the outputs of both
 
Old 08-06-2007, 11:35 AM   #3
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Original Poster
Rep: Reputation: 32
root:hosta# uptime
12:31:59 up 20 days, 2:58, 1474 users, load average: 0.27, 0.20, 0.18


root:hosta# w
12:32:04 up 20 days, 2:58, 1474 users, load average: 0.25, 0.20, 0.18
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
tpzadmin pts/0 xxxxxx.aaaaaaa Sun 4pm 1:44 15.12s 15.12s -bash
tpzadmin pts/2 xxxxxxxx.aaaaaaa Sun 4pm 6:46 13.25s 13.25s -bash
vga611 ttyp1 hostax.xxxxxxxx 12:31pm 4.00s 0.65s 0.63s bash
tpzadmin pts/3 yyyyyyy.xxxxxxx Sun 5pm 3:53 16.49s 16.49s -bash
tpzadmin pts/1 yyyyyy.xxxxxxxxx Sun 7pm 13:23 9.05s 9.05s -bash
vga611 pts/4 yyyyyy.xxxxxxxxxx 12:31pm 4.00s 0.32s 0.01s pbrun bash
root:hosta#
 
Old 08-06-2007, 11:36 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
? they both say 1474

and `uptime` by design doesn't show you who's logged in, just the total number.
 
Old 08-06-2007, 12:41 PM   #5
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Original Poster
Rep: Reputation: 32
who shows the number of the users as well as the user statistics who are already logged in..in the output it reports only 6 users logged in , where as in the actual stat it is stating 1474 users.
 
Old 08-06-2007, 07:47 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's a good qn ... you might find this page http://linux.die.net/man/5/utmp (and the whole site) useful.
I suspect that 1474 is actually the num of processes running, not unique user count.
 
Old 08-07-2007, 06:36 AM   #7
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Original Poster
Rep: Reputation: 32
I still could not understand this difference. Could you please advise?
 
Old 08-07-2007, 06:44 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, what I mean (as opposed to the manual) is that eg you could login 5 times, simultaneously, which would give you a (login) process total of 5, but only 1 unique user.
You clould also start 5 processes in the background from each login session, which would give you 30 (5 + 25) processes, but still 1 unique user logged in.
Also be aware that process count includes all the kernel processes and any other processes the system thinks it needs, see /etc/init.d .
HTH
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem login with ssh solarize Linux - Desktop 3 04-03-2007 03:23 AM
SSH login problem thomas_fogh Linux - Networking 2 03-22-2006 12:42 PM
SSH Login problem Artik Linux - Networking 6 10-17-2005 09:54 AM
Another ssh login problem silver2003 Linux - Security 3 10-03-2004 08:44 AM
ssh login problem K_M_McMahon Linux - Newbie 4 03-29-2004 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration