Manpages

Manpage of ACCT

ACCT

Section: Linux Programmer's Manual (2)
Updated: 1998-11-04
Index
Return to Main Contents
 

NAME

acct - switch process accounting on or off  

SYNOPSIS

#include <unistd.h>

int acct(const char *filename);
 

DESCRIPTION

When called with the name of an existing file as argument, accounting is turned on, records for each terminating process are appended to filename as it terminates. An argument of NULL causes accounting to be turned off.  

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.  

ERRORS

ENOSYS
BSD process accounting has not been enabled when the operating system kernel was compiled. The kernel configuration parameter controlling this feature is CONFIG_BSD_PROCESS_ACCT.
ENOMEM
Out of memory.
EPERM
The calling process has no permission to enable process accounting.
ENOENT
The specified filename does not exist.
EACCES
The argument filename is not a regular file.
EIO
Error writing to the file filename.
EUSERS
There are no more free file structures or we run out of memory.
 

CONFORMING TO

SVr4 (but not POSIX). SVr4 documents EACCES, EBUSY, EFAULT, ELOOP, ENAMETOOLONG, ENOTDIR, ENOENT, EPERM and EROFS error conditions, but no ENOSYS.  

NOTES

No accounting is produced for programs running when a crash occurs. In particular, nonterminating processes are never accounted for.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
NOTES

This document was created by man2html, using the manual pages.
Time: 13:27:32 GMT, April 25, 2024