xref: /original-bsd/usr.sbin/ac/ac.8 (revision 72b8f354)
Copyright (c) 1980 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.

@(#)ac.8 6.2 (Berkeley) 06/24/90

AC 8 ""
C 4
NAME
ac - login accounting
SYNOPSIS
ac [ -w wtmp ] [ -p ] [ -d ] [ people ] ...
DESCRIPTION
Ac produces a printout giving connect time for each user who has logged in during the life of the current wtmp file. A total is also produced. -w is used to specify an alternate wtmp "" file. -p prints individual totals; without this option, only totals are printed. -d causes a printout for each midnight to midnight period. Any people will limit the printout to only the specified login names. If no wtmp "" file is given, /var/log/wtmp is used.

The accounting file /var/log/wtmp is maintained by init and login. Neither of these programs creates the file, so if it does not exist no connect-time accounting is done. To start accounting, it should be created with length 0. On the other hand if the file is left undisturbed it will grow without bound, so periodically any information desired should be collected and the file truncated.

FILES
/var/log/wtmp
"SEE ALSO"
init(8), sa(8), login(1), utmp(5).