xref: /csrg-svn/usr.sbin/ac/ac.8 (revision 66982)
161770Sbostic.\" Copyright (c) 1980, 1991, 1993
261770Sbostic.\"	The Regents of the University of California.  All rights reserved.
318817Smckusick.\"
447469Scael.\" %sccs.include.redist.man%
518817Smckusick.\"
6*66982Sbostic.\"     @(#)ac.8	8.2 (Berkeley) 04/19/94
747469Scael.\"
847469Scael.Dd
947469Scael.Dt AC 8
1047469Scael.Os BSD 4
1147469Scael.Sh NAME
1247469Scael.Nm ac
1347469Scael.Nd display connect time accounting
1447469Scael.Sh SYNOPSIS
1547469Scael.Nm ac
1647469Scael.Op Fl d
1747469Scael.Op Fl p
1847469Scael.Op Fl w Ar file
1947469Scael.Op Ar users ...
2047469Scael.Sh DESCRIPTION
2147469ScaelIf the file
2247469Scael.Pa /var/log/wtmp
2347469Scaelexists,
2447469Scaela record of individual
2547469Scaellogin and logout times are written to it by
2647469Scael.Xr init 8
2718817Smckusickand
2847469Scael.Xr login 8
2947469Scaelrespectively.
3047469ScaelThe program
3147469Scael.Nm ac
3247469Scaelexamines these
3347469Scaelrecords and writes the accumulated connect time for all logins to the
3447469Scaelstandard output.
3547469Scael.Pp
3647469ScaelOptions available:
3747469Scael.Bl -tag -width people
3847469Scael.It Fl d
3947469ScaelDisplay the connect times in 24 hour chunks.
4047469Scael.It Fl p
4147469ScaelDisplay individual user totals.
4247469Scael.It Fl w Ar file
4347469ScaelRead raw connect time data from
4447469Scael.Ar file
4547469Scaelinstead of the default file
4647469Scael.Pa /var/log/wtmp .
4747469Scael.It Ar users ...
48*66982SbosticDisplay totals for the given individuals
4947469Scaelonly.
5047469Scael.El
5147469Scael.Pp
5247469ScaelIf no arguments are given,
5347469Scael.Nm
5447469Scaeldisplays the total amount of login time for all active accounts on the
5547469Scaelsystem.
5647469Scael.Pp
5747469ScaelThe default
5847469Scael.Pa wtmp
5947469Scaelfile is an infinitely increasing file
6047469Scaelunless frequently truncated.  This is normally
6147469Scaeldone by the daily daemon scripts scheduled by
6247469Scael.Xr cron 8
6347469Scaelwhich rename and rotate the
6447469Scael.Pa wtmp
6547469Scaelfiles before truncating them (and keeping about a weeks worth on hand).
6647469ScaelNo login times are collected however, if the file does not exist.
6747469Scael.Sh FILES
6847469Scael.Bl -tag -width /var/log/wtmp.[0-7] -compact
6947469Scael.It Pa /var/log/wtmp
7047469Scael.It Pa /var/log/wtmp.[0-7]
7147469Scaelrotated files
7247469Scael.El
7347469Scael.Sh SEE ALSO
7447469Scael.Xr init 8 ,
7547469Scael.Xr sa 8 ,
7647469Scael.Xr login 1 ,
7747469Scael.Xr utmp 5 .
7847469Scael.Sh HISTORY
7947469ScaelA
8047469Scael.Nm
8147469Scaelcommand appeared in Version 6 AT&T UNIX.
82