This is a discussion on Re: accouting log rotation within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Tue, Nov 22, 2005 at 11:54:44AM +0000, Antoine Jacoutot wrote: > Hi... > > Since there's a new ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Tue, Nov 22, 2005 at 11:54:44AM +0000, Antoine Jacoutot wrote: > Hi... > > Since there's a new accouting log rotation in current now, wouldn't it be a good > thing to incorporate the following changes from ac(8) ? Or am I just ignorant ? > Thanks. > > Antoine > > > --- /etc/weekly.orig Tue Nov 22 12:45:32 2005 > +++ /etc/weekly Tue Nov 22 12:45:56 2005 > @@ -39,6 +39,8 @@ > echo "Rebuilding whatis databases:" > makewhatis > > -# echo "" > -# echo "Doing login accounting:" > -# ac -p | sort -nr +1 > +if [ -f /var/account/acct ]; then > + echo "" > + echo "Doing login accounting:" > + ac -p | sort -nr +1 > +fi > > --- /etc/newsyslog.conf.orig Tue Nov 22 12:48:02 2005 > +++ /etc/newsyslog.conf Tue Nov 22 12:45:01 2005 > @@ -11,7 +11,7 @@ > /var/log/maillog 600 7 * 24 Z > /var/log/messages 644 5 30 * Z > /var/log/secure 600 7 * 168 Z > -/var/log/wtmp 644 7 * 168 ZB > +/var/log/wtmp 644 7 * $W6D4 ZB > /var/log/xferlog 640 7 250 * Z > /var/log/ppp.log 640 7 250 * Z > /var/log/pflog 600 3 250 * ZB > /var/run/pflogd.pid the hooks for accounting are already contained in /etc/rc - basically accton(1) will be run if /var/account/acct exists. whether you wish to have daily/weekly/monthly/... mails or not is your choice. ac(8) now documents one way to do this. jmc |