aacccctt() -- System Call (libc)

Enable/disable process accounting
#iinncclluuddee <aacccctt.hh>
aacccctt(_f_i_l_e)
cchhaarr *_f_i_l_e;

_P_r_o_c_e_s_s _a_c_c_o_u_n_t_i_n_g  records who initiates each system  process and how long
each process  takes to execute.  These data can  be analyzed, to administer
the system most efficiently.

The system call aacccctt() enables  or disables process accounting.  If _f_i_l_e is
not NULL,  then accounting  is turned  on; if _f_i_l_e  is NULL,  however, then
process accounting is turned off.

It  is usual,  but not  necessary, that _f_i_l_e  be /uussrr/aaddmm/aacccctt.   _f_i_l_e must
exist.  When  enabled, the system  appends a raw accounting  data record in
the format described by aacccctt.hh to _f_i_l_e as each process terminates.

aacccctt() is restricted to the superuser.

_S_e_e _A_l_s_o
aacc, aacccctt.hh, aaccccttoonn, eexxiitt(), lliibbcc, ssaa, ttiimmeess()

_D_i_a_g_n_o_s_t_i_c_s
Successful  calls  return zero.   aacccctt()  returns -1  for  errors, such  as
nonexistent _f_i_l_e or invocation by a user other than the superuser.

_N_o_t_e_s
The system  writes accounting records  for a process only  when the process
exits.  Processes that never terminate and processes running at the time of
a system crash do not produce accounting information.
