Last Updated : 23 Sep, 2024
'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 the info process accounting file. When the command is run in the terminal without any argument, it stops the process accounting.
Syntaxaccton [OPTION] on|off| file_name
where,
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 platforms i.e. it might be different for Red Hat or other Linux based platforms. Usually, the process accounting is enabled automatically at boot time by the system itself.
Linux accton Command Examples Example 1: Turning On Process AccountingInput:
Output:
Example 2: To turn off the process for accounting.Input:
Output:
Example 3: To save process accounting in a particular fileLet's say the file name is 'geeksforgeeks.txt' we can use the following command.
accton geeksforgeeks.txt
Input:
Output:
Common Options Available with the accton CommandThe 'accton' command supports several useful options to manage process accounting:
Option Description -h, --help Displays help information and exits the command. -V, --version Displays the version of theaccton
utility and exits. 1. -h, –help
Shows help and exit.
2. -V, --versionShow version and exit.
ConclusionThe accton command is an essential tool for system administrators who need to monitor, log, and analyze user activities and system processes. The accton command provides a simple yet powerful way to manage process accounting in Linux whether you're managing security, auditing resource usage, or simply monitoring user behavior.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4