w

 

  w --help
  -f  开启或关闭显示用户从何处登入系统。 
  -h  不显示各栏位的标题信息列。 
  -l  使用详细格式列表,此为预设值。 
  -s  使用简洁格式列表,不显示用户登入时间,终端机阶段作业和程序所耗费的CPU时间。 
  -u  忽略执行程序的名称,以及该程序耗费CPU时间的信息。 
  -V  显示版本信息。 

 

[root@bass ~]# w -s
 10:44:38 up  2:07,  9 users,  load average: 0.94, 0.98, 0.93
USER     TTY      FROM               IDLE WHAT
root     tty1     :0                2:07m /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-Bj4YG3/database -nolisten tcp vt1
root     pts/0    :0.0              7:42  ssh xxx.57.36.123
root     pts/2    :0.0              1:48m bash
root     pts/3    :0.0             20:01  ssh xxx.56.183.xxx
root     pts/4    :0.0              0.00s w -s
root     pts/5    :0.0             21:02  ssh xxx.56.183.xxx
root     pts/6    :0.0              1:58m htop
root     pts/7    :0.0             46:06  ssh xxx.57.36.123
root     pts/8    :0.0             38:55  ssh xxx.57.36.123
[root@bass ~]# w -i
 10:44:51 up  2:07,  9 users,  load average: 0.95, 0.98, 0.93
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1     :0               08:38    2:07m  4:31   4:31  /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-Bj4YG3/database -nolisten tcp vt1
root     pts/0    :0.0             08:39    7:55   0.19s  0.19s ssh xxx.57.36.123
root     pts/2    :0.0             08:40    1:48m  0.00s  0.00s bash
root     pts/3    :0.0             10:23   20:14   0.06s  0.05s ssh xxx.56.183.xxx
root     pts/4    :0.0             10:37    0.00s  0.02s  0.00s w -i
root     pts/5    :0.0             08:44   21:15   0.21s  0.20s ssh xxx.56.183.xxx
root     pts/6    :0.0             08:45    1:58m  2:06   2:06  htop
root     pts/7    :0.0             09:11   46:19   0.06s  0.06s ssh xxx.57.36.123
root     pts/8    :0.0             09:11   39:08   0.05s  0.05s ssh xxx.57.36.123
[root@bass ~]# w -l
 10:45:07 up  2:07,  9 users,  load average: 0.96, 0.99, 0.93
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1     :0               08:38    2:07m  4:31   4:31  /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-Bj4YG3/database -nolisten tcp vt1
root     pts/0    :0.0             08:39    8:11   0.19s  0.19s ssh xxx.57.36.123
root     pts/2    :0.0             08:40    1:48m  0.00s  0.00s bash
root     pts/3    :0.0             10:23   20:30   0.06s  0.05s ssh xxx.56.183.xxx
root     pts/4    :0.0             10:37    0.00s  0.02s  0.00s w -l
root     pts/5    :0.0             08:44   21:31   0.21s  0.20s ssh xxx.56.183.xxx
root     pts/6    :0.0             08:45    1:58m  2:07   2:07  htop
root     pts/7    :0.0             09:11   46:35   0.06s  0.06s ssh xxx.57.36.123
root     pts/8    :0.0             09:11   39:24   0.05s  0.05s ssh xxx.57.36.123
[root@bass ~]# w -u
 10:45:11 up  2:08,  9 users,  load average: 0.97, 0.99, 0.93
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1     :0               08:38    2:07m  4:31   4:31  /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-Bj4YG3/database -nolisten tcp vt1
root     pts/0    :0.0             08:39    8:15   0.19s  0.19s ssh xxx.57.36.123
root     pts/2    :0.0             08:40    1:48m  0.00s  0.00s bash
root     pts/3    :0.0             10:23   20:34   0.06s  0.05s ssh xxx.56.183.xxx
root     pts/4    :0.0             10:37    0.00s  0.02s  0.00s w -u
root     pts/5    :0.0             08:44   21:35   0.21s  0.20s ssh xxx.56.183.xxx
root     pts/6    :0.0             08:45    1:59m  2:07   2:07  htop
root     pts/7    :0.0             09:11   46:39   0.06s  0.06s ssh xxx.57.36.123
root     pts/8    :0.0             09:11   39:28   0.05s  0.05s ssh xxx.57.36.123

 

posted @ 2016-06-06 10:52  bass  阅读(315)  评论(0编辑  收藏  举报