A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/linux-unix/accton-command-in-linux-with-examples/ below:

accton command in Linux with Examples

accton command in Linux with Examples

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.

Syntax
accton [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 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:

Common Options Available with the accton Command

The '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 the accton utility and exits. 1. -h, –help

Shows help and exit.

2. -V, --version

Show version and exit.

Conclusion

The 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