11a52a219Sbostic.\" Copyright (c) 1980, 1991, 1993 21a52a219Sbostic.\" The Regents of the University of California. All rights reserved. 33443465dSmckusick.\" 413251ec2Scael.\" %sccs.include.redist.man% 53443465dSmckusick.\" 6*7bde65b3Sbostic.\" @(#)ac.8 8.2 (Berkeley) 04/19/94 713251ec2Scael.\" 813251ec2Scael.Dd 913251ec2Scael.Dt AC 8 1013251ec2Scael.Os BSD 4 1113251ec2Scael.Sh NAME 1213251ec2Scael.Nm ac 1313251ec2Scael.Nd display connect time accounting 1413251ec2Scael.Sh SYNOPSIS 1513251ec2Scael.Nm ac 1613251ec2Scael.Op Fl d 1713251ec2Scael.Op Fl p 1813251ec2Scael.Op Fl w Ar file 1913251ec2Scael.Op Ar users ... 2013251ec2Scael.Sh DESCRIPTION 2113251ec2ScaelIf the file 2213251ec2Scael.Pa /var/log/wtmp 2313251ec2Scaelexists, 2413251ec2Scaela record of individual 2513251ec2Scaellogin and logout times are written to it by 2613251ec2Scael.Xr init 8 273443465dSmckusickand 2813251ec2Scael.Xr login 8 2913251ec2Scaelrespectively. 3013251ec2ScaelThe program 3113251ec2Scael.Nm ac 3213251ec2Scaelexamines these 3313251ec2Scaelrecords and writes the accumulated connect time for all logins to the 3413251ec2Scaelstandard output. 3513251ec2Scael.Pp 3613251ec2ScaelOptions available: 3713251ec2Scael.Bl -tag -width people 3813251ec2Scael.It Fl d 3913251ec2ScaelDisplay the connect times in 24 hour chunks. 4013251ec2Scael.It Fl p 4113251ec2ScaelDisplay individual user totals. 4213251ec2Scael.It Fl w Ar file 4313251ec2ScaelRead raw connect time data from 4413251ec2Scael.Ar file 4513251ec2Scaelinstead of the default file 4613251ec2Scael.Pa /var/log/wtmp . 4713251ec2Scael.It Ar users ... 48*7bde65b3SbosticDisplay totals for the given individuals 4913251ec2Scaelonly. 5013251ec2Scael.El 5113251ec2Scael.Pp 5213251ec2ScaelIf no arguments are given, 5313251ec2Scael.Nm 5413251ec2Scaeldisplays the total amount of login time for all active accounts on the 5513251ec2Scaelsystem. 5613251ec2Scael.Pp 5713251ec2ScaelThe default 5813251ec2Scael.Pa wtmp 5913251ec2Scaelfile is an infinitely increasing file 6013251ec2Scaelunless frequently truncated. This is normally 6113251ec2Scaeldone by the daily daemon scripts scheduled by 6213251ec2Scael.Xr cron 8 6313251ec2Scaelwhich rename and rotate the 6413251ec2Scael.Pa wtmp 6513251ec2Scaelfiles before truncating them (and keeping about a weeks worth on hand). 6613251ec2ScaelNo login times are collected however, if the file does not exist. 6713251ec2Scael.Sh FILES 6813251ec2Scael.Bl -tag -width /var/log/wtmp.[0-7] -compact 6913251ec2Scael.It Pa /var/log/wtmp 7013251ec2Scael.It Pa /var/log/wtmp.[0-7] 7113251ec2Scaelrotated files 7213251ec2Scael.El 7313251ec2Scael.Sh SEE ALSO 7413251ec2Scael.Xr init 8 , 7513251ec2Scael.Xr sa 8 , 7613251ec2Scael.Xr login 1 , 7713251ec2Scael.Xr utmp 5 . 7813251ec2Scael.Sh HISTORY 7913251ec2ScaelA 8013251ec2Scael.Nm 8113251ec2Scaelcommand appeared in Version 6 AT&T UNIX. 82