← 返回命令列表

Linux command

accton 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Enable process accounting

sudo accton [/var/log/account/pacct]

Disable process accounting

sudo accton off

Check the current accounting status

sudo accton

说明

accton enables or disables system process accounting, a kernel feature that records information about every process that terminates on the system. When enabled, the kernel writes a compact record for each completed process, including the command name, CPU time used, memory consumption, and exit status. With no arguments, accton displays the current accounting status. Specifying a file path enables accounting to that file. The off argument disables accounting. The accounting data can be analyzed using companion tools like sa (summarize accounting) and lastcomm (show last commands executed). This information is valuable for system auditing, resource usage analysis, and troubleshooting.

参数

off
Disable process accounting.

FAQ

What is the accton command used for?

accton enables or disables system process accounting, a kernel feature that records information about every process that terminates on the system. When enabled, the kernel writes a compact record for each completed process, including the command name, CPU time used, memory consumption, and exit status. With no arguments, accton displays the current accounting status. Specifying a file path enables accounting to that file. The off argument disables accounting. The accounting data can be analyzed using companion tools like sa (summarize accounting) and lastcomm (show last commands executed). This information is valuable for system auditing, resource usage analysis, and troubleshooting.

How do I run a basic accton example?

Run `sudo accton [/var/log/account/pacct]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does off do in accton?

Disable process accounting.