acct(2) DG/UX 5.4R3.00 acct(2)
NAME
acct - enable or disable process accounting
SYNOPSIS
#include <unistd.h>
int acct (path)
char * path;
where:
path Address of a pathname
DESCRIPTION
This function provides capabilities that are inherently
implementation dependent.
Acct enables or disables process accounting. If process accounting
is enabled, an accounting record will be written on an accounting
file for each process that terminates.
Path points to the path name of the accounting file. The accounting
file format and the information it contains are implementation
dependent.
Process accounting is disabled if path is NULL and enabled if path is
non-NULL.
If errors occur during the acct operation, the status of process
accounting is not changed. If errors occur when an accounting record
is written, the record may be lost.
ACCESS CONTROL
The effective-user-id of the calling process must be superuser.
RETURN VALUE
0 The accounting file was successfully changed.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EPERM Permission to enable or disable process accounting is
denied to the calling process.
EACCES The file named by path is not an ordinary file.
EISDIR The named file is a directory.
EROFS The named file resides on a read-only file system.
ENOENT The file the pathname resolved to does not exist.
ENOENT A non-terminal component of the pathname does not
Licensed material--property of copyright holder(s) 1
acct(2) DG/UX 5.4R3.00 acct(2)
exist.
ENOTDIR A non-terminal component of the pathname was not a
directory or symbolic link.
ENAMETOOLONG The pathname exceeds the length limit for pathnames.
ENAMETOOLONG A component of the pathname exceeds the length limit
for filenames.
ENOMEM There are not enough system resources to resolve the
pathname or to expand a symbolic link.
ELOOP The number of symbolic links encountered during
pathname resolution exceeded MAXSYMLINKS. A symbolic
link cycle is suspected.
EPERM The pathname contains a character not in the allowed
character set.
EFAULT The pathname does not completely reside in the
process's address space or the pathname does not
terminate in the process's address space.
SEE ALSO
acct(1M). exit(2), signal(2), acct(4).
Licensed material--property of copyright holder(s) 2