Getting started with Linux: w commands in Linux

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.