$w command

ODOC: About w command

Displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

Syntax
w [-husfVo] [user]

-h -> Don’t print the header.

-u -> Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a “su” and do a “w” and a “w -u”.

-s -> Use the short format. Don’t print the login time, JCPU or PCPU times.

-f -> Toggle printing the from (remote hostname) field. The default as released is for the from field to not be printed, although your system administrator or distribution maintainer may have compiled a version in which the from field is shown by default.

-V -> Display version information.

-o -> Old style output. Prints blank space for idle times less than one minute.

user -> Show information about the specified user only.

Examples

praveen@praveen:~$ w
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
praveen  tty7     :0               06:38   48:04   1:37   0.29s gnome-session
praveen  pts/1    :0.0             07:26    0.00s  0.31s  0.00s w

With Regards,
S. Praveen

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s