LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with who command (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-who-command-936677/)

dev@linuxquestion# 03-27-2012 07:30 AM

problem with who command
 
who command only shows the 5 users while i m having 20 users logged in why XRDP remote dekstop
so how can i find the total users who are logged in
below is the output of who and w

[root@sDirectserver ~]# w
17:36:05 up 7:22, 5 users, load average: 0.39, 0.77, 0.91
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty1 :0 10:14 1:52m 4:54 4:54 /usr/bin/Xorg :
root pts/0 :0.0 10:15 1:10 0.03s 0.03s bash
root pts/1 :0.0 17:34 0.00s 0.01s 0.01s w
prachis pts/3 :105.0 14:15 3:20m 0.00s 0.00s /bin/bash
vikass pts/4 :110.0 14:53 2:42m 0.00s 0.00s /bin/bash


[root@sDirectserver ~]# who
root tty1 2012-03-27 10:14 (:0)
root pts/0 2012-03-27 10:15 (:0.0)
root pts/1 2012-03-27 17:34 (:0.0)
prachis pts/3 2012-03-27 14:15 (:105.0)
vikass pts/4 2012-03-27 14:53 (:110.0)
[root@sDirectserver ~]#

tronayne 03-27-2012 07:49 AM

Have you tried
Code:

who -a
Hope this helps some.

Antares.Liu 03-27-2012 07:51 AM

Quote:

Originally Posted by dev@linuxquestion# (Post 4637568)
who command only shows the 5 users while i m having 20 users logged in why XRDP remote dekstop
so how can i find the total users who are logged in
below is the output of who and w

[root@sDirectserver ~]# w
17:36:05 up 7:22, 5 users, load average: 0.39, 0.77, 0.91
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty1 :0 10:14 1:52m 4:54 4:54 /usr/bin/Xorg :
root pts/0 :0.0 10:15 1:10 0.03s 0.03s bash
root pts/1 :0.0 17:34 0.00s 0.01s 0.01s w
prachis pts/3 :105.0 14:15 3:20m 0.00s 0.00s /bin/bash
vikass pts/4 :110.0 14:53 2:42m 0.00s 0.00s /bin/bash


[root@sDirectserver ~]# who
root tty1 2012-03-27 10:14 (:0)
root pts/0 2012-03-27 10:15 (:0.0)
root pts/1 2012-03-27 17:34 (:0.0)
prachis pts/3 2012-03-27 14:15 (:105.0)
vikass pts/4 2012-03-27 14:53 (:110.0)
[root@sDirectserver ~]#


The command 'who' has a opt '-q' to show all login names and number of users logged on. Maybe you can try it. You can use command 'last' to show listing of last logged in users.

dev@linuxquestion# 03-27-2012 07:53 AM

Problem with who command
 
THanks tronayne

It is still shows the same no of users a already tried who -a but didnt works


All times are GMT -5. The time now is 04:55 AM.