kmack Posted April 6, 2003 Report Share Posted April 6, 2003 I am full of questions today. Sorry if this is really basic, but I am lost right now and want to learn and understand this. When I run "top" (as user btw) it list 3 users most of the time. I am one, I assumed root is another, but who is #3? Just a moment ago, I ran top and had 4 users! So I did a bit of reading and tried $users and got: kelly, kelly, kelly, kelly I rebooted and ran $users, now have 3 again. [kelly@localhost kelly]$ users kelly kelly kelly What's this mean? Is it normal or do I have something going on here? AND most important, how can if find this kind of info by myself in the future so I don't waste the time of others? :wink: TIA! Quote Link to comment Share on other sites More sharing options...
aru Posted April 6, 2003 Report Share Posted April 6, 2003 What's this mean? Is it normal or do I have something going on here? AND most important, how can if find this kind of info by myself in the future so I don't waste the time of others? :wink: TIA! That depends on what environment are you. For example if you open several gnome-terminals you'll get a new user listed for each one of the terminals. But if you are using another terminal emulator, such as aterm, then doesn't matter how many terminals you open, because you won't see any user logged-in in your machine... Don't ask me why because I don't know the reason. I guess that it depends on the terminal emulator you are running. Just some examples: I'm at VT-1 (console - F1) and at fluxbox (VT-7), and I fire up an aterm. If I run /usr/bin/w (check its man page), I get: arusabal@mandrakeusers ~$ w 4:10pm up 1 day, 16:32, 1 user, load average: 0.27, 0.57, 0.57 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT arusabal vc/1 - 3:52pm 17:54 0.38s 0.29s -bash arusabal@mandrakeusers ~$ Now I open two gnome-terminals, and run again from my aterm w: arusabal@mandrakeusers ~$ w 4:11pm up 1 day, 16:34, 3 users, load average: 0.55, 0.58, 0.57 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT arusabal vc/1 - 3:52pm 19:07 0.38s 0.29s -bash arusabal pts/1 :0.0 4:11pm 11.00s 0.35s 0.35s bash arusabal pts/2 :0.0 4:11pm 3.00s 0.37s 0.37s bash arusabal@mandrakeusers ~$ See how now it reports 3 users. Finally I logout from VT-1 and close both gnome-terminals: arusabal@mandrakeusers ~$ w 4:13pm up 1 day, 16:35, 0 users, load average: 0.50, 0.53, 0.54 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT See, I'm still using fluxbox, aterm, opera... so I'm loged into my system, otherwise I wouldn't been typing this. But the number of users is 0 :shock: So IMHO those reports on number of users in your system are related to "users logged from a terminal" and understanding as a terminal something that emulates the protocols of old phisical terminals (gnome-terminal, ssh, through mingetty...), but reports nothing if you are logged on X. What I use to know who is phisically running something in my system, is the following alias which reports the 'real' and 'system' users who are doing something at present time: arusabal@mandrakeusers ~$ alias whops alias whops='ps aux | awk '''!/USER/ {print $1}''' | sort -u' arusabal@mandrakeusers ~$ whops apache lp mysql postfix root arusabal xfs arusabal@mandrakeusers ~$ I could have add some code to difference real from system users, but as we are few users (my family) and I know all the nicks, I didn't care. Quote Link to comment Share on other sites More sharing options...
kmack Posted April 6, 2003 Author Report Share Posted April 6, 2003 Thanks loads! Your explanation and examples help me make some sense out of it. I had tried to find some documentation that would help me understand it, but did not find anything that helped. I am running 9.0 and KDE 3.0.5a here. That's my learning curve progress so far, though I am trying some other wm's too. [kelly@localhost kelly]$ w 10:07pm up 3:59, 3 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT kelly pts/0 - 6:09pm 3:58m 0.00s ? - kelly pts/1 - 10:07pm 0.00s 0.03s 0.01s w got the same from root too. Then: [kelly@localhost kelly]$ who kelly :0 Apr 6 18:08 kelly pts/0 Apr 6 18:09 kelly pts/1 Apr 6 22:11 Which shows me the three me's... :) Again, thanks for taking the time to help me get a bit of a handle on how this works and what it is saying. It really does help me and I greatly appreciate your patience. Quote Link to comment Share on other sites More sharing options...
MoonChild Posted April 6, 2003 Report Share Posted April 6, 2003 Most of the commands tell you who is bound to a tty But if you read the man pages, you can see more details who returns the users connected for example I am not sure what w does... But check to see how they count the users Quote Link to comment Share on other sites More sharing options...
kmack Posted April 7, 2003 Author Report Share Posted April 7, 2003 Thanks MoonChild! I am in the process of trying to learn more of the Linux commands. Think I will make a schedule of daily reading of man pages and try to attack one or two per day until I work my way through them. On thing I have to admit though... the writing style of the manpages and the difficulty of reading them on screen makes an old book-based person like me struggle to understand them. With a book one can flip the pages and compare things. With on screen the scrolling only allows me to see one page at a time. On the more detailed commands with L O N G manpages it is murder! :roll: I bought Linux in a Nutshell by O'Reilly but it has abbreviated most of the commands and doesn't have a full set of them either. Good book, but sometimes doesn't cover the things I am looking for at the moment. :? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.