Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Apropos / Subsearch:
optional field

 acctcon(1M)							 acctcon(1M)

      acctcon, acctcon1, acctcon2 - connect-time accounting

      /usr/sbin/acct/acctcon [options]

      /usr/sbin/acct/acctcon1 [options]


      The acctcon1 command converts a sequence of login/logoff records read
      from its standard input to a sequence of records, one per login
      session.	Its input should normally be redirected from /var/adm/wtmp.
      Its output is ASCII, giving device, user ID, login name, prime connect
      time (seconds), non-prime connect time (seconds), session starting
      time (numeric), and starting date and time.  Prime connect time is
      defined as the connect time within a specific prime period on a non-
      holiday weekday (Monday through Friday).	The starting and ending time
      of the prime period and the year's holidays are defined in file

      acctcon2 expects as input a sequence of login session records,
      produced by acctcon1, and converts them into total accounting records
      (see tacct format in acct(4)).

      acctcon combines the functionality of acctcon1 and acctcon2 into one
      program.	It takes the same input format as acctcon1 and writes the
      same output as acctcon2.

      acctcon1 recognizes the following options:

	   -p		  Print input only, showing line name, login name,
			  and time (in both numeric and date/time formats).

	   -t		  acctcon1 maintains a list of lines on which users
			  are logged in.  When it reaches the end of its
			  input, it emits a session record for each line
			  that still appears to be active.  It normally
			  assumes that its input is a current file, so that
			  it uses the current time as the ending time for
			  each session still in progress.  The -t flag
			  causes it to use, instead, the last time found in
			  its input, thus ensuring reasonable and repeatable
			  numbers for non-current files.

      acctcon1 and acctcon recognize the following options:

	   -l file	  file is created to contain a summary of line usage
			  showing line name, number of minutes used,
			  percentage of total elapsed time used, number of

 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000

 acctcon(1M)							 acctcon(1M)

			  sessions charged, number of logins, and number of
			  logoffs.  This file helps track line usage,
			  identify bad lines, and find software and hardware
			  oddities.  Hang-up, termination of login (see
			  login(1)), and termination of the login shell each
			  generate logoff records, so that the number of
			  logoffs is often three to four times the number of
			  sessions.  See init(1M) and utmp(4).

	   -o file	  file is filled with an overall record for the
			  accounting period, giving starting time, ending
			  time, number of reboots, and number of date

      These commands are typically used as shown below.	 The file ctmp is
      created only for the use of commands described by the acctprc(1M)
      manual entry:

	   acctcon1 -t -l lineuse -o reboots <&lt&lt&lt; wtmp | sort +1n +2 >&gt&gt&gt; ctmp
	   acctcon2 <&lt&lt&lt; ctmp | acctmerg >&gt&gt&gt; ctacct


	   acctcon -t -l lineuse -o reboots <&lt&lt&lt; wtmp | acctmerg >&gt&gt&gt; ctacct


      The line usage report is confused by date changes.  Use wtmpfix (see
      fwtmp(1M)) to correct this situation.

      acct(1M), acctcms(1M), acctcom(1M), acctmerg(1M), acctprc(1M),
      acctsh(1M), fwtmp(1M), init(1M), login(1), runacct(1M), acct(2),
      acct(4), utmp(4).

      acctcon1: SVID2, SVID3

      acctcon2: SVID2, SVID3

 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000