ac man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]

AC(8)			  BSD System Manager's Manual			 AC(8)

NAME
     ac - display connect time accounting

SYNOPSIS
     ac [-dp] [-w file] [users ...]

DESCRIPTION
     If the file /var/log/wtmp exists, a record of system event and individual
     login and logout times are written to it by init(8) and login(8).	The
     program ac examines these records and writes the accumulated connect time
     for individual logins to the standard output.

     The following options are available:

     -d	     Display the connect times in 24 hour periods.

     -p	     Display individual user totals.

     -w file
	     Read raw connect time data from file instead of the default file
	     /var/log/wtmp.

     If user arguments are specified, information is given for only those
     users.  Otherwise, ac displays information for all users for which there
     is data.

     The wtmp file will grow forever, and therefore must be periodically trun-
     cated.  This is normally done by the daemon script /etc/monthly, (sched-
     uled by cron(8)),	which renames and rotates the wtmp files before trun-
     cating them (retaining about six month's worth).  No information is col-
     lected however, if the wtmp file does not exist.

     All users are presumed to have logged out if the system shuts down or re-
     boots.

     Any logout records without preceding login records are ignored, thus user
     sessions starting before the raw data begins will not be included in the
     report.  For this reason, ac may not correctly present data for users
     that were logged in when the wtmp files were rotated.  To obtain correct
     data, either request data on a per-day basis (the -d option) or concate-
     nate multiple log files together in their creation order and run ac on
     the result.

     Any login records without subsequent logout records when the raw data
     ends will be treated as if the user logged out at midnight of the last
     day for which there is any login record, or as of the current time-of-
     day, whichever is earlier.

FILES
     /var/log/wtmp
     /var/log/wtmp.[0-7]  rotated files

SEE ALSO
     utmp(5),  init(8),	 login(8),  sa(8)

HISTORY
     An ac command appeared in Version 6 AT&T UNIX.

4th Berkeley Distribution	April 19, 1994				     1
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net