accton - Unix, Linux Command


Previous Page
Next Page  


accton - The accton command turns on/off process accounting or changes the file where the info of process accounting is saved. 


accton [option] on|off|filename
accton [-v |--version] [-h |--help]


accton command performs process accounting. This is widely used to monitor user activities and resource consumption, by default accton command uses /var/log/account/pacct file, user can specify their own file, this OutFile parameter is not created by the accton command. The file specified by the OutFile parameter must already exist with the proper group, owner, and permissions. When it is run in background, this command saves and keeps track user activities and resource consumption.


V, --version Print the version number of ac to standard output and quit.
-h, --help Prints the usage string and default locations of system files to standard output and exits.
on Turns on process accounting using the default accounting.
off Turns off process accounting.
filename Turns on process accounting with given filename.


Note: accton command should be run with root user previlages.


To see version of accton,

#accton -V       (--version    Show version and exit)

output: accton: GNU Accounting Utilities (release 6.5.5) 


To turn on process accounting,

#accton on

output: Turning on process accounting, file set to the default '/var/log/account/pacct'.


To turn off process accounting,

#accton off

output: Turning off process accounting.


To turn on process accounting with user defined filename,

#accton /home/ubuntu/proc_acct
output: Turning on process accounting, file set to '/home/ubuntu/proc_acct'.

Note: /home/ubuntu/proc_acct file is user defined filename, This file should exist before running command.

Previous Page
Next Page