Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Apropos / Subsearch:
optional field

acct(2)								      acct(2)


  acct - Enables and disables process accounting


  int acct (
	  char *path );


  path	    Specifies a	pointer	to the pathname	of the file, or	specifies a
	    null pointer.


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

  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 pro-
  cess accounting.


  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.


  If the acct()	function fails,	errno may be set to one	of the following

  [EPERM]   The	calling	process	does not have appropriate system privilege.

  [ENOENT]  The	file named by the path parameter does not exist.

  [EACCES]  The	file named by the path parameter is not	an ordinary file.

  [EACCES]  Write permission is	denied for the named accounting	file.

  [EROFS]   The	named file resides on a	read-only file system.


  Functions: exit(2), sigaction(2), sigvec(2), expacct(3), raise(3)