
                   HOW TO ENABLE PROCESS ACCOUNTING ON LINUX
                                       
   
   
   _Last updated: Fri Aug 8 09:25:58 HKT 1997_
   
--------------------------------------------------
Translated by Ilgiz Kalmetev (2:5011/36.6@fidonet)
--------------------------------------------------
   
        :      Albert M.C. Tam
        (bertie@scn.org).      , 
        ,      
        , ,  /   
               / 
        ;     .   
          ,    ,   
        - ,    ,  .
                 
         , //    
         ,    
          .
   
     ,     (accounting)   
   Linux       . 
            1.3.73 
   (  RedHat 4.1,  2.0.27).    ( 1.3.73)
     ,     .
   
         bertie@scn.org,   
       .   .
   
   
     _________________________________________________________________
   
   
   
  - ?
  
    -         
   Linux.   Linux    , 
     ,     ,
        .

            
     ,    ,  
    
   
      Linux
   
          ( >= 1.3.73).  
          ,   
        ().   
   
   ftp://iguana.hut.fi/pub/linux/Kernel/process_accounting 
       
   
,      Linux

   
   __
   
       Linux    1.3.73,  
   2.x.     
   
   http://sunsite.unc.edu/pub/Linux/kernel/v2.0 
       
   
   
   _   _
   
        Linux,   
             .  
   ,    
   
   http://sunsite.unc.edu/pub/Linux/system/admin/quota-acct-modified.tgz 
       
   
   
   
     _________________________________________________________________
   
   
   
    Linux

   
   
   _1.      _
   
      :
   
   http://sunsite.unc.edu/pub/Linux/system/admin/quota-acct-modified.tgz 
       
   
   
   _2.        
           _
   
    :
   

        #   .
        if [ -x /sbin/accton ]
        then
                /sbin/accton /var/log/pacct
                echo "Process accounting turned on."
        fi

   
   
   _3.     "pacct"_
   
             
     /var/log/pacct .
   
       :
   

        touch /var/log/pacct

   
         root    -
    root,      :

        chown root /var/log/pacct
        chmod 0644 /var/log/pacct

   
   
   _4. _
   
     ,      .
   
     _________________________________________________________________
   

   
   
   
   _ac_
   
   ac        , 
     / /  /var/log/wtmp . ac   
       ( -d)     ( -p).
   
   _accton_
   
   accton       . 
           
    .
   
   _last_
   
   last   /var/log/wtmp     
    .
   
   _sa_
   
   sa        ,
     -  ,  CPU,
       /var/account/pacct.
   
   _lastcomm_
   
   lastcomm        ,
     /var/account/pacct.
