View user's operating system administrator if you want to know the behavior of the user at a certain moment, just enter the command W and enter the following command in the shell terminal:
[Email protected] ~]# W
You can see the Execute w command and display the result.
Command message meaning the information shown above is indicated as follows:
The first line shows the summary information of the system, and the fields indicate the current time of the system, the system running time, the total number of users logged in and the system average load information. For fields as shown, the meaning is:
18:05:00 indicates that the time to execute W is at 18:05 P.M. 00 seconds.
Up 14:00 14:00 means the system runs for 14 hours and 00 minutes.
3 users indicate that the total number of systems logged in today is 3.
The load average, along with the numbers that follow, indicates how much the system has been loading in the last 1, 5, 10 minutes, the smaller the value, the lighter the system load.
Starting from the second line constitutes a list of logged-in user information, a total of 8 columns, showing what each user is doing and the system resources that the user occupies.
User: Displays the login username. The user repeatedly logs in, the account will also appear repeatedly.
TTY: The terminal used by the user to log in.
From: Shows where the user landed the system.
[Email protected]: is the login at, indicating the time of landing into the system.
Idle: User idle time, starting at the end of the user's last task.
JCPU: A terminal designator that represents the CPU time spent on all process tasks associated with the terminal during this time period.
PCPU: Refers to the CPU time that is spent after the task of the what domain is executed.
What: Represents the currently executing task.
To see if a user is logged in to a system user, you can add a user name after W, and you will see the user performing the task.
[Email protected] ~]# W NQH
By default, all of the above information is displayed, and if you only care about one aspect, you can use only the relevant options.
To view logged-in users, the same system administrator who wants to know who is logged in at a given moment can use the WHO command provided by the system to view the users and other information currently logged in to the system:
[email protected] ~]# who
You can see that the above information is very similar to the W command. If you want to make the list more detailed, you can add the option-hit and so on.
You can get the user's willingness to accept other user information (-T) and also display the idle time (-i) and the title bar (-h). If a user is willing to accept the message, a "+" is displayed in the MESG column, and a command MESG can be used to send the message to the user.
Behavior information for logged-on users under Linux-W and who commands