/var/log/wtmp always reseting to 0
Howdy, I'm running FreeBSD 4.10 my /var/log/wtmp file gets reset to 0 Kb (as well as the wtmp.X.gz files) at the end/beginning of each month. I noticed this last month when the monthly run output notice sent to roots mail stated = __Snip_ TO:[EMAIL PROTECTED] Subject: davez.org monthly run output Doing login accounting: total0.00 -- End of monthly output -- ___End Snip___ At first I thought maybe a isolated case but this month the same thing happened, the end of month accounting shows no logins and when I check the log files they are all empty 0Kb prior to todays activity. Anyone else seen this or have any ideas what may be wrong? Thanks in advance for any help provided - Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: /var/log/wtmp always reseting to 0
On Fri, 1 Oct 2004, Richard Lynch wrote: man logrotate Probably the logs are getting rotated and old ones discarded. Or, possibly, you haven't realized that the old logs are in /var/log/*.# where * matches the old log name, and # is 1 to N, for some N defined in logrotate configuration. man logrotate does nothing = Snip Command Output___ $ man logrotate No manual entry for logrotate End Snip_ Given that all wtmp.#.gz files have a 0 size would seem to indicate all the files were emptied somehow? __Snip Command Output_ $ cd /var/log $ ls -al wtmp* -rw-r--r-- 1 root wheel 308 Oct 1 18:34 wtmp -rw-r--r-- 1 root wheel0 Oct 1 05:48 wtmp.0 -rw-r--r-- 1 root wheel0 Oct 1 05:42 wtmp.1 -rw-r--r-- 1 root wheel0 Oct 1 05:36 wtmp.2 -rw-r--r-- 1 root wheel0 Oct 1 05:30 wtmp.3 $ ___End Snip__ Also the end of month accounting report sent to root shows no logins at all wound indicate the wtmp file must be resetting to 0 prior to the end of the month account process taking place? Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: /var/log/wtmp always reseting to 0
At 6:52 PM -0400 10/1/04, questions wrote: On Fri, 1 Oct 2004, Richard Lynch wrote: man logrotate Probably the logs are getting rotated and old ones discarded. man logrotate does nothing On FreeBSD, the utility is called newsyslog. The entry would be in /etc/newsyslog.conf . You should have an entry in there for /var/log/wtmp, but all that will do is rotate the file. It isn't going to truncate it. __Snip Command Output_ $ cd /var/log $ ls -al wtmp* -rw-r--r-- 1 root wheel 308 Oct 1 18:34 wtmp -rw-r--r-- 1 root wheel0 Oct 1 05:48 wtmp.0 -rw-r--r-- 1 root wheel0 Oct 1 05:42 wtmp.1 -rw-r--r-- 1 root wheel0 Oct 1 05:36 wtmp.2 -rw-r--r-- 1 root wheel0 Oct 1 05:30 wtmp.3 $ ___End Snip__ Uh, it seems odd that all those files have a date of Oct 1. newsyslog should only rotate the file once on any given day, not five times, once every six minutes. Did someone change the entry for newsyslog in /etc/crontab ? The only reference to newsyslog in /etc/crontab should look like: # Rotate log files every hour, if necessary. 0 * * * * rootnewsyslog -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]