ATnotes time-Several Linux system management commands

Source: Internet
Author: User
ATnotes time-Linux system management commands-Linux general technology-Linux technology and application information. For more information, see the following. Less/var/log/message

The who command queries the utmp file and reports to each user currently logged on.
The w command queries the utmp file and displays information about each user in the current system and the processes it runs.
Users prints the current logon user with a single line. Each displayed user name corresponds to a logon session.
Last [user name] system user logon log. Search for wtmp In the last command to display the users that have logged on since the first file creation.
The ac Command reports the user connection time (hours) based on the logon entry and exit times in the current/var/log/wtmp file. If no signs are used, the total time is reported.
Ac-d (Press ENTER) to display the total connection time of each day
Ac-p (Press ENTER) to display the total connection time of each user
Lastlog

Process statistics

UNIX tracks every command run by each user. The process Statistics subsystem is not activated by default and must be started.

Run the touch command to create a pacct file:

Touch/var/log/pacct

Then run accton: accton/var/log/pacct

Once accton is activated, you can use the lastcomm command to monitor the commands executed in the system at any time. To disable statistics, you can use the accton command without any parameters.

Lastcomm

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.