Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

acct(2) [osf1 man page]

acct(2) 							System Calls Manual							   acct(2)

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)

Check Out this Related Man Page

acct(2) 							   System Calls 							   acct(2)

acct - enable or disable process accounting SYNOPSIS
#include <unistd.h> int acct(const char *path); DESCRIPTION
The acct() function enables or disables the system process accounting routine. If the routine is enabled, an accounting record will be written in an accounting file for each process that terminates. The termination of a process can be caused by either an exit(2) call or a signal(3C)). The effective user ID of the process calling acct() must have the appropriate privileges. The path argument points to the pathname of the accounting file, whose file format is described on the acct.h(3HEAD) manual page. The accounting routine is enabled if path is non-zero and no errors occur during the function. It is disabled if path is (char *)NULL and no errors occur during the function. RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The acct() function will fail if: EACCES The file named by path is not an ordinary file. EBUSY An attempt is being made to enable accounting using the same file that is currently being used. EFAULT The path argument points to an illegal address. ELOOP Too many symbolic links were encountered in translating path. ENAMETOOLONG The length of the path argument exceeds {PATH_MAX}, or the length of a path argument exceeds {NAME_MAX} while _POSIX_NO_TRUNC is in effect. ENOENT One or more components of the accounting file pathname do not exist. ENOTDIR A component of the path prefix is not a directory. EPERM The {PRIV_SYS_ACCT} privilege is not asserted in the effective set of the calling process. EROFS The named file resides on a read-only file system. SEE ALSO
exit(2), acct.h(3HEAD), signal(3C), privileges(5) SunOS 5.10 20 Jan 2003 acct(2)
Man Page

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. UNIX for Dummies Questions & Answers

UNIX Program Change Question

I am an IT auditor with a big 4 accounting firm and am cur the process of conducting an application program change audit for a large public company related to Sarbanes Oxley. This is my first time using this forum and need some assistance in verifying a fact that I believe to be true. My client... (1 Reply)
Discussion started by: mpp122
1 Replies

4. Windows & DOS: Issues & Discussions

Do you prefer Quickbooks, Microsoft or another small business accounting software?

I am starting a small business. I need software to invoice and track payments, track income and expense and basically keep everything organized for tax time. I've read positive and negative on all small business accounting software, so now I'm really confused. Oh, my business is a service one, so I... (3 Replies)
Discussion started by: sunybck
3 Replies

5. 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

6. UNIX for Advanced & Expert Users

Process accounting and Shell process time

Hi All, I am running the following accounting on one of my executable, $ accton /home/myexe-acct $ ./myexe $ accton When I check the process timings I get the below result, Shell process time: 300ms myexe time: 100ms I want to know on why the shell(sh) process is taking so much time... (1 Reply)
Discussion started by: santoshbr4
1 Replies

7. 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

8. Solaris

Find path of executable having problem

Hi cannot find the path to a running process on a host. I looked and tried some suggestions in forums to no avail. can someone please help? I need to know where this process is starting from as we have several versions in multiple directories --------- Process name 1201 1 0 Feb 14 ?... (14 Replies)
Discussion started by: mnassiri
14 Replies

9. UNIX for Beginners Questions & Answers

Chkpoint file... is it a UNIX backup file ?

Hello Helping a friend who had an accounting program called multisoft, hasn't used it for 4 years. I believe it was installed on a Unix box. He has a tax audit and needed to switch on the pc / server to access the data but the hard drive was beeping... totally dead. He said he had a... (3 Replies)
Discussion started by: BillSwan
3 Replies

Featured Tech Videos