Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

acct(5) [redhat man page]

ACCT(5) 							File Formats Manual							   ACCT(5)

NAME
acct - execution accounting file SYNOPSIS
#include <sys/acct.h> DESCRIPTION
The kernel maintains an accounting information structure for all processes. If a process terminates, and accounting is enabled, the kernel calls the acct(2) function to prepare, and then append, a record for this process to the accounting file. The accounting structure struct acct is also described in the file /usr/include/linux/acct.h. SEE ALSO
acct(2), sa(1) Debian GNU/Linux 1995-10-31 ACCT(5)

Check Out this Related Man Page

acct(2) 							System Calls Manual							   acct(2)

NAME
acct - Enables and disables process accounting SYNOPSIS
int acct ( char *path ); PARAMETERS
Specifies a pointer to the pathname of the file, or specifies a null pointer. DESCRIPTION
The acct() function enables and disables UNIX process accounting. When enabled, process accounting produces an accounting record on behalf of each terminating process. The path parameter specifies the pathname of the file to which an accounting record is written. When the path parameter is 0 (zero) or a null value, the acct() function disables the accounting routine. If the path parameter refers to a symbolic link, the acct() function writes records to the file pointed to by the symbolic link. If Network File System is installed on your system, the accounting file can reside on another node. To ensure accurate accounting, each node must have its own accounting file, which can be located on any node in the network. The calling process must have superuser privilege to enable or disable process accounting. RETURN VALUES
Upon successful completion, the acct() function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the acct() function fails, errno may be set to one of the following values: The calling process does not have appropriate system privi- lege. The file named by the path parameter does not exist. The file named by the path parameter is not an ordinary file. Write permission is denied for the named accounting file. The named file resides on a read-only file system. RELATED INFORMATION
Functions: exit(2), sigaction(2), sigvec(2), expacct(3), raise(3) delim off acct(2)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

command accton question???

When i excute the command: # /usr/sbin/acct/accton /var/adm/acct it prompt error: #/usr/sbin/acct/accton: file mode not 0664 Who can help me to start process-accounting procedures,Thanks! (2 Replies)
Discussion started by: q30
2 Replies

2. UNIX for Dummies Questions & Answers

help using acct

Hi everybody, I'm Sun Solaris, I have problems on figuring out how i can start acct in unix. I understand how this accounting write in a file in /var/adm/wtmp. And with "acctcom -b " shows end part of all commands that were written in it. And "accton" shuts off this reporting. My question how... (3 Replies)
Discussion started by: Peterh
3 Replies

3. Solaris

user acct expiration

how can i tell on a solaris 9 if a user acct has an expiration date? and when that expuiration is. (6 Replies)
Discussion started by: BG_JrAdmin
6 Replies

4. UNIX for Dummies Questions & Answers

new pine user on pop3 acct

I recently started using unix in osx,and loving it! I am now wanting to use pine for email. I installed it using fink and besides it not being the most updated version, it seems to work fine, except that every message I erase seems to come back everytime I log in. It is a pop3 account. I have also... (0 Replies)
Discussion started by: larrinski
0 Replies

5. Cybersecurity

System Accounting

How do I enable System Accounting on Solaris 8? In Solaris 7 I would copy the /usr/lib/acct file to S22acct and start it like that. That doesn't seem to be an option in Solaris 8. Thanks for your help! (2 Replies)
Discussion started by: pc9456
2 Replies

6. Shell Programming and Scripting

Usage of "acctcom" command ??

Hi All, I want to know the any process end time using the "acctcom" command. I think "ps" command will give only running processes Start time. But i want know the running & completed processes: 1. Start Time 2. End Time 3. Process Name/Command Name 4. PID Please... (1 Reply)
Discussion started by: hanu_oracle
1 Replies

7. Solaris

Can I gzip or delete pacct files in solaris ?

Hi, On my server there are so many pacct files in /var/adm. It is eating up my /var partition. Can I delete or gzip those files ? Thanks NeeleshG (3 Replies)
Discussion started by: neel.gurjar
3 Replies

8. UNIX for Advanced & Expert Users

possible to lock accounts (passwd -l) and still allow acct to ssh to other server?

My scenario is as follows: We have a handful of batch accounts that run our production jobs. Our users are able to use sudo to become that account. Also, because of other reasons, the passwords are also listed in an encrypted file that each team can see their batch ID. So, I have some users... (5 Replies)
Discussion started by: cpolikowsky
5 Replies

9. UNIX for Advanced & Expert Users

Special accounting information

I need to figure out why did the system run out of memory and hung at a certain time. For further investigation, the info about every processes' CPU and memory consumption over time would be of high value. I see, that Unix accounting may be of some help. But I'm not sure if I can get this... (3 Replies)
Discussion started by: descentspb
3 Replies

10. Solaris

accton

I enabled accton and lastcomm can show all users command can restrict specified users, eq. root / user1, users command only? (1 Reply)
Discussion started by: goodbid
1 Replies

11. UNIX for Dummies Questions & Answers

shell scripts - list dead users accts and include a count at the end?

I am trying to show the number of dead accts or false shells running and include a count at the end. Does anyone know how to go about this? Thanks - citizencro (3 Replies)
Discussion started by: citizencro
3 Replies

12. Shell Programming and Scripting

Need help in writing a script that do internal grep on a log file..and extract acct no's from it..

I need to write a script, which takes the input a log file and create output file with acct no's line by line from selected records with text like (in red) : 18:51:18 | 217863|Acct 0110855565|RC 17608| 16 Subs| 1596 UsgRecs| 2 Secs| 430 CPUms| prmis2:26213 <MoveUsage d aemon needs to run... (7 Replies)
Discussion started by: rkrish
7 Replies

13. Shell Programming and Scripting

Need help to run query in loop for all acct nbr in a file..

I have a txt file with contents of acct nbr's like: 22222222222 33333333333 33445566778 I need to write a script which takes each acct nbr in the file and run the query like: select seq_nbr from event where acct_nbr='22222222222' and the query's output should be passed to a... (2 Replies)
Discussion started by: Rajesh Putnala
2 Replies

14. Debian

Some commands not logged in pacct

Hi, Examining the Debian Linux logfiles, I found out that not all commands are logged in my pacct (/var/log/account/pacct) For instance, if I run and stop Wireshark and do after that # lastcomm | grep "wireshark" The wireshark command is logged as expected. # lastcomm | grep... (1 Reply)
Discussion started by: suvios
1 Replies