Home > Process Management > w

w: View logged-in users and their activity

This command displays information about users currently logged into the system, the processes they are running, their login times, and idle times. It is useful for system administrators to understand the current system load and user activity.

Overview

The 'w' command provides a summary of users currently logged into the system and what tasks they are performing. This is useful for system administrators to gauge the current system load and user activity. It shows each user's terminal, login time, idle time (IDLE), JCPU, PCPU, and the command they are currently running (WHAT).

Key Features

  • List of logged-in users and terminal information
  • Login time and idle time for each user
  • Displays commands currently being executed by users
  • Monitors system load and user activity

Key Options

The 'w' command offers various options to control the output format or filter specific information.

Output Formatting

Information Filtering

Generated command:

Try combining the commands.

Description:

`w` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

Effectively understand the current system status through various usage examples of the 'w' command.

Basic Usage

w

Displays information about all currently logged-in users and their activities.

Output without Header

w -h

Displays only user information, omitting the header line at the top of the output.

Output in Short Format

w -s

Displays information concisely by omitting the JCPU, PCPU, and WHAT columns.

View Specific User Information

w john

Displays activity information only for the specified user 'john'.

Output without Header in Short Format

w -hs

Displays user information in a short format, omitting the header.

Tips & Notes

Useful tips and points to note when using the 'w' command.

Understanding JCPU and PCPU

JCPU is the total CPU time used by all processes on a given TTY (terminal), while PCPU is the CPU time used by the process currently shown in the 'WHAT' column. Comparing these can help infer what tasks a user is primarily engaged in.

  • **JCPU (Jiffy CPU time):** Total CPU time for all processes executed on that terminal.
  • **PCPU (Process CPU time):** CPU time for the current process displayed in the 'WHAT' column.

Interpreting the WHAT Column

The 'WHAT' column shows the command currently being executed by the user. This information is crucial for understanding what tasks users are performing on the system. Long commands may be truncated.

  • Key information for understanding user's current activity.
  • Be aware that long commands may be truncated.

System Load Monitoring

The 'w' command displays the system's current load (load average) at the top, along with 'uptime' information. This allows for a quick assessment of the overall system performance.


Same category commands