In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to understand the Linux basic command display login user w, for this problem, this article details the corresponding analysis and solution, hoping to help more small partners who want to solve this problem find a simpler and easier way.
w
Shows which users are logged in and what they are doing. The header displays, in this order, the current time, the system runtime, the number of currently logged in users, and the average system load for the past 1, 5, and 15 minutes. The following entries are then displayed for each user: login name, TTY name, remote host, login time, idle time, JCPU, PCPU, and command line for the current process. JCPU time is the time used by all processes attached to the TTY. It does not include background jobs from the past, but it does include background jobs that are currently running. PCPU time is the time used by the current process, named in the "what" field.
This command applies to Red Hat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
w [options] [user]
2. Option list
option
description
-h
Do not display title bar
-u
Ignoring the name and cpu time of the executing program
-s
Use short format, do not display login time, JCPU and PCPU time
-f
Show where users log in from
-V
output version information
3. Documents
/var/run/utmp, information about the user who is logging in.
/proc process information.
4. Examples
Display logged in user information
[root@localhost ~]# w
08:53:05 up 3 days, 18:42, 4 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
david tty7 :0 Sat20 15days 1.99s 0.00s pam: gdm-password
root pts/0 :1.0 Sat20 0.00s 0.08s 0.00s w
root pts/1 :1.0 21:28 11:24m 0.00s 0.00s bash
root tty1 :1 Sat20 15days 18.07s 18.07s /usr/bin/Xorg :1 -br -verbose -audi
[root@localhost ~]#
About how to understand the Linux basic command display login user w questions to share here, I hope the above content can have some help for everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.