Getting started with Linux: w commands in Linux
Run the w command in Linux to find out who are currently logged on to the system and the programs they are running. If you run the w command separately, all users will be displayed. You can also specify the user name to only display information about a specific user.
W command parameters;
(1)-f enables or disables where the user logs on to the system.
(2)-h does not display the new series of titles for each column.
(3)-l uses the detailed format, which is the default value.
(4) The-s format is concise and does not display the CPU time consumed by the user's logon time, terminal, and program.
(5)-u ignores the name of the execution program and the CPU consumption time of the program.
(6)-V displays the version information.
Name: w-show Who is logged on and what they are doing.
Function Description: displays the user information currently logged on to the system.
Syntax: w [-fhlsuV] [user name]
Effect:
[Bkjia @ bkjia ~] $ W
12:06:28 up, 3 users, load average: 0.02, 0.08, 0.06
User tty from login @ IDLE JCPU PCPU WHAT
Bkjia tty2-08:34 3: 31 m 0.43 s 0.34 s emacs
Bkjia tty1: 0 08:34? 0.26 s pam: TPD-passwo
Bkjia pts/0: 0.0 0.00 s 0.05 s 0.02 s w
[Bkjia @ bkjia ~] $
Note: The header information includes the current time, system running time, number of users, and average load (past 1, 5, and 15 minutes ).
JCPU: CPU usage time of all corresponding tty processes, excluding previous background tasks, but including the currently running background tasks.
PCPU: the CPU usage time of the process currently displayed in WHAT domain.
Use the w command and uptime command in Linux to view the system load
This article permanently updates the link address: