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

  man pages->Tru64 Unix man pages -> acctcon (8)              
Title
Content
Arch
Section
 

acctcon(8)

Contents


NAME    [Toc]    [Back]

       acctcon1,  acctcon2 - Display connect-time accounting summaries

SYNOPSIS    [Toc]    [Back]

       acctcon1 [-l file] [-o file] [-p] [-t]

       acctcon2

OPTIONS    [Toc]    [Back]

       Writes line-usage format  from  the  input  file  (usually
       /var/adm/wtmp)  to  file  for the accounting period during
       which the file  /var/adm/wtmp  is  active.  The  following
       example shows the ASCII line-usage heading format:

              TOTAL  DURATION:  57 MINUTES LINE           MINUTES
              PERCENT     #  SESS     #  ON     #  OFF  pty/ttyp4
              37            64         3       3        7 console
              26           45        2      2        4  pty/ttyp5
              7            11         1       1       3 pty/ttyp6
              0             0         0       0        2   TOTALS
              69            -        6      6      16


              TOTAL  DURATION  specifies the total number of minutes
 used for connect sessions during the  accounting
  period  during which the /var/adm/wtmp file is
              active. The columns specify the line name, the number
  of  session  minutes  used,  the percentage of
              total elapsed time used for the sessions, the  number
  of sessions charged, the number of logins, and
              the number of logouts. The last line in  the  lineusage
 file totals the entries for each column.

              The line-usage format helps to track line usage and
              identify bad lines.  All hangups,  terminations  of
              the  login  command,  and terminations of the login
              shell cause the system to write logout records,  so
              that  the  number  of logouts is often greater than
              the number of sessions.  Writes  an  overall-record
              format   to  file  from  the  input  file  (usually
              /var/adm/wtmp) for  the  accounting  period  during
              which  the  /var/adm/wtmp file is active.  The following
 example shows the overall-record format:

              from mon day date hh:mm:ss yyyy  tz  to    mon  day
              date  hh:mm:ss yyyy tz 2    date changes  Number of
              times  the  date  was  changed.   21    acctg   off
              Number of times accounting functions
                                 were turned off.  25   run-level
              S   Number of times accounting functions
                                 ran in  single-user  mode.   108
              system  boot    Number  of  times  the  system  was
              rebooted.   21    acctg  on       Number  of  times
              accounting functions
                                 were  turned  on.  21   acctcon1
              Number of times the acctcon1 command
                                 was issued.


              The first lines specify the date  and  time  stamp,
              including time zone, of the accounting period start
              time and end time.  Writes the input file  (usually
              /var/adm/wtmp)  to  the  default output device. For
              example:

              pty/ttyp1   hoff    616883748   Jul   19   16:35:48
              1990   EST  pty/ttyp1   hoff    616883825   Jul  19
              16:37:05  1990   EST  pty/ttyp1   LOGIN   616883833
              Jul    19    16:37:13   1990   EST  pty/ttyp1   tom
              616883837  Jul  19  16:37:17  1990  EST

              The output columnar format lists the line reference
              name,  the  login  name,  the time in seconds since
              January 1, 1970, 0 hours, 0 minutes, 0 seconds, the
              date,  the  24-hour  clock  time, the year, and the
              time zone.  Uses the last time found in  the  input
              file  as the ending time for any current processes.
              This time, rather than current time,  is  necessary
              to  have  reasonable and repeatable values for noncurrent
 files. The output format is the same as the
              default output format.

              The acctcon1 command also maintains a list of ports
              on which users are logged  in.  When  the  acctcon1
              command  reaches  the  end  of its input, a session
              record is written for each port that still  appears
              to be active. The acctcon1 command assumes that the
              input source is the current file and  uses  current
              time  as  the ending time for each session still in
              progress.

DESCRIPTION    [Toc]    [Back]

       The acctcon1 and acctcon2  commands  are  described  separately.


   acctcon1
       The  acctcon1 command is invoked by the runacct shell procedure
 to write a sequence of login  and  logout  records.
       One  record  for  each  connect  session is written to the
       specified destination  as  a  sequence  of  login  session
       records.  The /var/adm/wtmp source file should be directed
       as input to the command.

       The following example shows  the  default  ASCII  columnar
       output format:

       285212673   1192   hoff  85     0      616883748   Jul  19
       16:35:48   1990  EST  285212673   1033    tom    10      0
       616883837  Jul 19 16:37:17  1990 EST 285212673  0     root
       1345  2852  616883855  Jul 19 16:37:35  1990 EST 285212673
       1120   jim   0      62    616888058  Jul 19 17:47:38  1990
       EST

       The columns  contain  the  following  information:  Device
       address,   expressed   as  a  decimal  equivalent  of  the
       major/minor device address at  which  the  connection  was
       activated.   User  ID  assigned  for  the  connect-session
       record.  Login name under which the  session  took  place.
       Total  number  of  prime-time seconds for the connect session.
  Total number of nonprime-time seconds for the  connect
 session.  Seconds since the date 0 hours, 0 minutes 0
       seconds, 1 January 1970.  Month, day of  the  month,  connect-session
 starting time, year, and time zone.

       The  order  of  date and time information is locale dependent.
 The timestamps shown use the default format for date
       and  time values; however, you can define the NLTIME environment
 variable to change this format.

   acctcon2
       The acctcon2 command is invoked by the runacct shell  procedure.
  It  converts  a sequence of login session records
       produced by the acctcon1 command into  connect-time  total
       accounting  records.  These  records are often merged with
       other total accounting records with the  acctmerg  command
       to produce a daily report.

EXAMPLES    [Toc]    [Back]

       The  following example converts login records to a default
       format login session record report:

              acctcon1 -t /var/adm/lineuse -o /var/adm/reboots \
                            < /var/adm/wtmp > /var/adm/logsess

              This   example   generates   three    files.    The
              /var/adm/logsess file lists ending date and 24-hour
              timestamp records that  correspond  with  the  last
              time  that  input  was obtained with the -t option.
              For  the   accounting   period   covered   by   the
              /var/adm/wtmp file, the /var/adm/lineuse line-usage
              summary file is generated by the -l option, and the
              /var/adm/reboots  overall  record  file is obtained
              with the -o option.  The following example converts
              a   series   of   login   session  records  in  the
              /var/adm/logsess file to a total accounting  record
              in  the  /var/adm/logacct  binary  file: acctcon2 <
              /var/adm/logsess > /var/adm/logacct


FILES    [Toc]    [Back]

       Specifies command  path.   Specifies  command  path.   The
       active  login/logout  database  file.   Accounting  header
       files that define formats for writing accounting files.

SEE ALSO    [Toc]    [Back]

      
      
       Commands:  login(1),   acct(8),   acctmerg(8),   fwtmp(8),
       init(8), wtmpconvert(8)

       Functions: acct(2)



                                                       acctcon(8)
[ Back ]
 Similar pages
Name OS Title
ac FreeBSD connect time accounting
ac OpenBSD connect time accounting
acctcon HP-UX connect-time accounting
acctcon2 HP-UX connect-time accounting
acctcon1 HP-UX connect-time accounting
acctcon IRIX connect-time accounting
wtmpconvert Tru64 Modify connect time accounting records from DIGITAL UNIX releases 4.0x and prior to new format
wtmpfix Tru64 Modify connect time accounting records to change formats and to make corrections in the records
acctwtmp Tru64 Modify connect time accounting records to change formats and to make corrections in the records
fwtmp Tru64 Modify connect time accounting records to change formats and to make corrections in the records
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service