Analysis of accton and lastcomm commands in linux, acctonlastcomm

Source: Internet
Author: User
Tags touch command

Analysis of accton and lastcomm commands in linux, acctonlastcomm

We use the accton command to enable or disable process statistics. If no parameters are included, the process statistics will be disabled. Its main parameters are as follows:

(1)-V or -- version indicates that the version information is displayed and exited.

(2)-h or -- help to print help information.

In linux, to start process statistics, you must use the accton command and run it as root. The accton command is in the form of accton file, and the file must exist in advance. We can use the touch command to create the file. Once accton is activated, you can use the lastcomm command to detect the commands executed at any time in the system. To disable statistics, use the accton command without any parameters.

Lastcomm displays information about previously used commands. Accton is used to START process records. In this way, all commands are recorded in a specified file, and lastcomm is used to view the file for system management. The main options are as follows:

(1)-strict-match indicates exact match to each column.

(2) -- user name Only displays Command records of the specified user.

(3) -- command name only displays records of the specified command.

(4) -- tty name only displays commands run on the specified terminal.

(5)-f filename specifies a Command record file to replace the default file.

(6) -- debug prints other kernel information.

(7) -- version prints the version information.

(8) -- help prints help information.

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.