How To Use accton Command In Linux

accton command in Linux is used for turning the process accounting on/off. Also, it can be used for changing the file where the info of process accounting is stored. By default, this command is executed without any argument, it simply turns the process accounting off. This command is considered to be one of the most important command for System Administrators as it allows them to monitor user activities. The administrators often use to run this command in background to keep a track over user activities and resource consumption.


accton [OPTION] on|off| file_name

in the above syntax, the users can choose any option either on or off, whereas the file_name specifies where the process accounting details will be saved.


accton -h: Shows help and exit
accton -v: Shows versions and exit

Note: The default process accounting file’s path may vary depending upon various Linux platforms. Usually, the process accounting is automatically enabled on any Linux platforms while the system boots.

Below are some of the examples of how to use accton command in different ways when required:

Example 1: accton command to turn on process accounting

$ accton on

Example 2: accton command to turn off process accounting

$ accton off

Example 3: accton command to save process accounting to a file named process_accounting.txt

$ accton process_accounting.txt