Open In App

accton command in Linux with Examples

Improve
Improve
Like Article
Like
Save
Share
Report

accton is one of important Linux/Unix command which is used by the administrator to monitor user activities. It is used to turn on or turn off the process for accounting or change info process accounting file. When the command is run in the terminal without any argument, it stops the process accounting.

Syntax:

accton [OPTION] on|off| file_name

Here, file_name is the name of the file where process accounting information is to save.

The system’s default process accounting file is saved in ‘/var/log/account/pacct‘. The default path of the file might change with different Linux platform i.e. it might be different for Red Hat or other Linux based platform. Usually, the process accounting is enabled automatically at boot time by the system itself.

Example 1: To turn on the process for accounting.

Input:

Output:

Example 2: To turn off the process for accounting.

Input:

Output:

Example 3: To save process accounting in a particular file let’s say the file name is geeksforgeeks.txt we can use the following command.

accton geeksforgeeks.txt

Input:

Output:

Options:

  • -h, –help: Shows help and exit.

  • -V, –version: Show version and exit.


Last Updated : 04 Apr, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads