ACCT(2,L) AIX Technical Reference ACCT(5,F)
-------------------------------------------------------------------------------
acct
PURPOSE
Enables and disables process accounting.
SYNTAX
int acct (path)
char *path;
DESCRIPTION
The acct system call enables the accounting routine when the path parameter
specifies a valid path name of a file and no errors occur during the system
call. The path name specifies the file to which accounting records are written
for each process as it terminates. (For information about the accounting file,
see "acct.") When the path parameter is 0 or NULL, the acct system call
disables the accounting routine.
Warning: To ensure accurate accounting, each node must have its own accounting
file, which can be located on any node in the network.
The effective user ID of the calling process must be superuser to use the acct
system call.
RETURN VALUE
Upon successful completion, acct returns a value of 0. If acct fails, a value
of -1 is returned, and errno is set to indicate the error.
ERROR CONDITIONS
The acct system call fails if one or more of the following are true:
EPERM The effective user ID of the calling process is not superuser.
EBUSY An attempt is made to enable accounting when it is already enabled.
ENOTDIR A component of the path parameter is not a directory.
ENOENT Any component of the accounting file's path name does not exist.
EACCES Any component of the path parameter denies search permission.
EACCES The file named by the path parameter is not an ordinary file.
EISDIR The named file is a directory.
Processed November 7, 1990 ACCT(2,L) 1
ACCT(2,L) AIX Technical Reference ACCT(5,F)
EROFS The named file resides on a read-only file system.
EFAULT The path parameter points to a location outside of the process's
allocated address space.
ENAMETOOLONG
A component of the path parameter exceeded NAME_MAX characters or the
entire path parameter exceeded PATH_MAX characters.
ENOENT A hidden directory was named, but no component inside it matched the
process's current site path list.
ENOENT A symbolic link was named, but the file to which it refers does not
exist.
ELOOP A loop of symbolic links was detected.
ENOSPC The file system is out of inodes.
ENFILE The system inode table is full.
ETXTBSY Write access is requested for a pure procedure (shared text) file
that is being executed.
If the Transparent Computing Facility is installed on your system, acct can
also fail if one or more of the following are true:
ESITEDN1 path cannot be accessed because a site went down.
ESITEDN2 The operation was terminated because a site failed.
EINTR A signal was caught during the acct system call.
ENOSTORE path is a name relative to the working directory, but no site which
stores this directory is currently up.
ENOSTORE A component of path is replicated but is not stored on any site which
is currently up.
EROFS Write access is requested for a file on a replicated file system in
which the primary copy is unavailable.
RELATED INFORMATION
In this book: "acct," "exit, _exit" and "sigaction, sigvec, signal."
The acct command in AIX Operating Commands Reference.
Processed November 7, 1990 ACCT(2,L) 2