*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> acct (2)              
Title
Content
Arch
Section
 

ACCT(2)

Contents


NAME    [Toc]    [Back]

       acct - switch process accounting on or off

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int acct(const char *filename);

DESCRIPTION    [Toc]    [Back]

       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    [Toc]    [Back]

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

ERRORS    [Toc]    [Back]

       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    [Toc]    [Back]

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

NOTES    [Toc]    [Back]

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





Linux 2.1.126			  1998-11-04			       ACCT(2)
[ Back ]
 Similar pages
Name OS Title
cpu_switch OpenBSD switch to another process context
mi_switch NetBSD switch to another process context
cpu_switch NetBSD switch to another process context
mi_switch OpenBSD switch to another process context
ctxsw OpenBSD switch to another process context
ctxsw NetBSD switch to another process context
Getopt::Std IRIX Process single-character switches with switch clustering
acctprc IRIX process accounting
acctprc2 HP-UX process accounting
acctprc HP-UX process accounting
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service