Prints a summary of current system activity.
w [ -h ] [ -u ] [ -w ] [ -l | -s ] [ User ]
The w command prints a summary of the current activity on the system. The summary includes the following:
The heading line of the summary shows the current time of day, how long the system has been up, the number of users logged into the system, and the load average. The load average is the number of runnable processes over the preceding 1-, 5-, 15-minute intervals.
The following examples show the different formats used for the login time field:
10:25am | The user logged in within the last 24 hours. |
Tue10am | The user logged in between 24 hours and 7 days. |
12Mar91 | The user logged in more than 7 days ago. |
If a user name is specified with the User parameter, the output is restricted to that user.
-h | Suppresses the heading. |
-l | Prints the summary in long form. This is the default. |
-s | Prints the summary in short form. In the short form, the tty is abbreviated, and the login time, system unit time, and command arguments are omitted. |
-u | Prints the time of day, amount of time since last system startup, number of users logged on, and number of processes running. This is the default. Specifying the -u flag without specifying the -w or -h flag is equivalent to the uptime command. |
-w | The equivalent of specifying the -u and -l flags, which is the default. |
/etc/utmp | |
Contains the list of users. |
The who command, finger command, ps command, uptime command.