acct(2) System Calls Manual acct(2)Name
acct - turn accounting on or off
Syntax
acct(file)
char *file;
Description
The system is prepared to write a record in an accounting file for each process as it terminates. This call, with a null-terminated string
naming an existing file as argument, turns on accounting; records for each terminating process are appended to file. An argument of 0
causes accounting to be turned off.
The accounting file format is given in
This call is permitted only to the superuser. Accounting is automatically disabled when the file system the accounting file resides on
runs out of space. It is enabled when space once again becomes available.
Return Values
On error, -1 is returned. The file must exist and the call may be exercised only by the superuser. It is erroneous to try to turn on
accounting when it is already on. If successful, 0 is returned.
Diagnostics
The system call will fail if one of the following is true:
[EPERM] The caller is not the superuser.
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire pathname exceeded 1023 characters.
[ENOENT] The named file does not exist.
[EACCES] The path name is not a regular file.
[EROFS] The named file resides on a read-only file system.
[EFAULT] The file points outside the process's allocated address space.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EIO] An I/O error occurred while reading from or writing to the file system.
Restrictions
No accounting is produced for programs running when a crash occurs. In particular, nonterminating programs are never accounted for.
See Alsoacct(5), sa(8)acct(2)
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)
Hi, folks,
I have developed CK-ERP, which is an open source accounting / MRP / ERP / CRM system that runs on top of multiple middlewares. It provides accounting and back office functionalities to SMEs and utilizes the underlying middleware to administer accounts/groups.
Details about and... (0 Replies)
Hi, I am not sure if this will work or not. I am getting a syntax error.
I am reading fileA, using an acct number field trying to see if it exists in fileB and output to new file. Can anyone tell me if what I am doing will work or should I attempt it another way? Thanks.
exec < "${fileA}... (4 Replies)