On Thu, Nov 10, 2005 at 06:56:46AM +0100, Andreas Bihlmaier wrote: > Hello misc@, > > a question that bugged me for quite a while: > > Why is the accounting in /etc/monthly? > I reffer to these (commented out) lines: > > #echo "" > #echo "Doing login accounting:" > #ac -p | sort -nr +1 > # > #echo "." > > If I uncomment them (as suggested in "Absolute OpenBSD" to get some basic > accounting (or just to find out HOW much time I spend in front of the screen). > > I get a report ever month, BUT now the problem: > > The way I read "man 8 ac" it states > <quote> > The default wtmp file will increase without bound unless it is truncated. > It is normally truncated by the daily scripts run by cron(8), which re- > name and rotate the wtmp files, keeping a week's worth of data on hand. > No login or connect time accounting is performed if /var/log/wtmp does > not exist. > </quote> >
note that the man page was a little confusing here, since it sounds like the /etc/daily script controls wtmp size. rather newsyslog does this. i have just committed a fix to the page to clarify that. > Doesn't this mean that I only get accounting for the last week of the month? > Shouldn't the lines above moved to /etc/weekly? > Did I miss something, or is this the intended behavior (for what reason)? > that's right. i just moved the ac(8) stuff from /etc/monthly to /etc/weekly. of course you could also adjust newsyslog to rotate wtmp less often. jmc