linux poison RSS
linux poison Email

Process Accounting HowTo

Process Accounting is used for

1. Keeps track of user processes.
2. Originally intended as a way to keep track of resources in order to bill departments/users for their usage.
3. Packages

psacct

Turning On/Off

1. Enabling - Use accton command and specify the file for storing the accounting information.

/sbin/accton /var/log/pacct

2. Disabling - Use accton command without specifying a file.

/sbin/accton

Viewing Information

1. ac - The 'ac' command is used to print out a report of connection times.

Examples:

ac # Print total connection time.
ac -dp # Give daily (-d) connection totals by person (-p)
ac --complain # Print out any problems in wtmp file (time-warps, missing records, etc.)

2. sa - The 'sa' command is used to summarize accounting information.

Examples:

sa # Print information about all commands in the process accounting file
sa -u # Print command information by user

3. lastcomm - Displays which commands have been executed.

Examples:

lastcomm # Display all commands executed on system
lastcomm rm # Display information about all invocations of the 'rm' command


0 comments:

Post a Comment

Related Posts with Thumbnails