1、图例
[root@VM-16-7-centos ~]# w
20:05:52 up 40 days, 5:30, 2 users, load average: 0.29, 0.25, 0.23
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 180.111.104.29 19:47 0.00s 0.02s 0.00s w
root pts/1 180.111.104.29 19:49 13:04 0.03s 0.00s less -s
2、描述
显示机器当下的用户和进程信息。
按照顺序显示当前时间,系统运行时长,当前用户登录数量,系统过去1、5、15分钟的平均负载。
用户当前进程显示:用户名,终端名称,远程主机IP,登陆时间,空闲时间,JCPU,PCPU,当前进程的命令行。
JCPU:连接到tty所有进程所使用的时间
PCPU:当前进程使用的时间
3、使用方式
w [options] user [...]
4、可选择参数
Options:
-h, --no-header do not print header
-u, --no-current ignore current process username
-s, --short short format
-f, --from show remote hostname field
-o, --old-style old style output
-i, --ip-addr display IP address instead of hostname (if possible)
--help display this help and exit
-V, --version output version information and exit