Commit | Line | Data |
---|---|---|
b42074ab CL |
1 | .\" Copyright (c) 1980, 1991 Regents of the University of California. |
2 | .\" All rights reserved. | |
c616fb17 | 3 | .\" |
b42074ab | 4 | .\" %sccs.include.redist.man% |
c616fb17 | 5 | .\" |
b42074ab CL |
6 | .\" @(#)ac.8 6.3 (Berkeley) %G% |
7 | .\" | |
8 | .Dd | |
9 | .Dt AC 8 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm ac | |
13 | .Nd display connect time accounting | |
14 | .Sh SYNOPSIS | |
15 | .Nm ac | |
16 | .Op Fl d | |
17 | .Op Fl p | |
18 | .Op Fl w Ar file | |
19 | .Op Ar users ... | |
20 | .Sh DESCRIPTION | |
21 | If the file | |
22 | .Pa /var/log/wtmp | |
23 | exists, | |
24 | a record of individual | |
25 | login and logout times are written to it by | |
26 | .Xr init 8 | |
c616fb17 | 27 | and |
b42074ab CL |
28 | .Xr login 8 |
29 | respectively. | |
30 | The program | |
31 | .Nm ac | |
32 | examines these | |
33 | records and writes the accumulated connect time for all logins to the | |
34 | standard output. | |
35 | .Pp | |
36 | Options available: | |
37 | .Bl -tag -width people | |
38 | .It Fl d | |
39 | Display the connect times in 24 hour chunks. | |
40 | .It Fl p | |
41 | Display individual user totals. | |
42 | .It Fl w Ar file | |
43 | Read raw connect time data from | |
44 | .Ar file | |
45 | instead of the default file | |
46 | .Pa /var/log/wtmp . | |
47 | .It Ar users ... | |
48 | Display totals for the given indiviuals | |
49 | only. | |
50 | .El | |
51 | .Pp | |
52 | If no arguments are given, | |
53 | .Nm | |
54 | displays the total amount of login time for all active accounts on the | |
55 | system. | |
56 | .Pp | |
57 | The default | |
58 | .Pa wtmp | |
59 | file is an infinitely increasing file | |
60 | unless frequently truncated. This is normally | |
61 | done by the daily daemon scripts scheduled by | |
62 | .Xr cron 8 | |
63 | which rename and rotate the | |
64 | .Pa wtmp | |
65 | files before truncating them (and keeping about a weeks worth on hand). | |
66 | No login times are collected however, if the file does not exist. | |
67 | .Sh FILES | |
68 | .Bl -tag -width /var/log/wtmp.[0-7] -compact | |
69 | .It Pa /var/log/wtmp | |
70 | .It Pa /var/log/wtmp.[0-7] | |
71 | rotated files | |
72 | .El | |
73 | .Sh SEE ALSO | |
74 | .Xr init 8 , | |
75 | .Xr sa 8 , | |
76 | .Xr login 1 , | |
77 | .Xr utmp 5 . | |
78 | .Sh HISTORY | |
79 | A | |
80 | .Nm | |
81 | command appeared in Version 6 AT&T UNIX. |