LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 11-03-2005, 02:40 AM   #1
edgjerp
Member
 
Registered: Dec 2004
Location: Trondheim, Norway
Distribution: kubuntu 10.04
Posts: 308

Rep: Reputation: 31
number of users


when I use top or users, I sometimes get one or two users logged in, which is the correct number, other times I get 14 or more copies of the same user. I know the number of users is logged in /var/run/utmp, but is there something I can do to make my system realize (and report) that there is only one (or two) users logged in. for a while, the number of users reported was (number of konsole windows open + number of tty's (1-6) used + 2), but that is no longer the case, making it hard to see how many are actually in (even in runlevel 1 I had about 8 users)

I run Mandriva 2006.0.
 
Old 11-03-2005, 02:49 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,283

Rep: Reputation: 172Reputation: 172
what about
who -q
Code:
hwdusa22!primaipa(146)$ who -q
neo21iA  hub05i3E hub05d2D neocrcd  beachmj  primaipa beachmj  neososA  
# users=8
 
Old 11-03-2005, 02:56 AM   #3
edgjerp
Member
 
Registered: Dec 2004
Location: Trondheim, Norway
Distribution: kubuntu 10.04
Posts: 308

Original Poster
Rep: Reputation: 31
I get:
gjerp gjerp gjerp gjerp gjerp gjerp gjerp gjerp gjerp gjerp gjerp gjerp gjerp
# brukere=13

currently I have no tty's active, and I am the only user logged in, local only, with 4 konsole windows.

what I need is not really a way to see how many users that are logged in, but to figure out how to make top and "users" to display the right number.
 
Old 11-03-2005, 07:36 AM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,283

Rep: Reputation: 172Reputation: 172
aaah. oh well.

well I just think it's just one of those things that we can't do very well.
I've tried such as this before.

all such commands: who, finger
give variable results.
 
Old 11-03-2005, 07:52 AM   #5
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,341

Rep: Reputation: 73
Maybe :
Code:
ac -p
?
 
Old 11-03-2005, 11:14 AM   #6
edgjerp
Member
 
Registered: Dec 2004
Location: Trondheim, Norway
Distribution: kubuntu 10.04
Posts: 308

Original Poster
Rep: Reputation: 31
is there a way I can tell my system "do not count each Konsole session as a separate login"? i.e. each tty, gui, and remote session counts for one (and only one) user in utmp and wtmp.
 
Old 11-04-2005, 02:34 AM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,283

Rep: Reputation: 172Reputation: 172
I doubt it.
I think You'll have to "do it yourself"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
number of users in a group cookie_ie Programming 7 03-24-2005 03:43 PM
number of users? Rick Winters Debian 5 06-21-2004 10:22 AM
Number of Linux Users liguorir Linux - Software 1 11-10-2003 10:24 AM
how to find the number of users mtest Programming 3 10-28-2003 02:41 AM
Apache: number of users on a website? mikeshn Linux - Software 0 07-22-2003 06:40 PM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration