[NTLUG:Discuss] wtmp begins $recently .. why?

steve sjbaker1 at airmail.net
Tue Jun 27 15:24:05 CDT 2006


Richard Geoffrion wrote:
> What system functions could cause wtmp to be reset/restarted/whatever  
> so that it 'begins' on a date that was NOT the day the system was 
> originally installed?  Googling and manning shows me that init and getty 
> have some interaction..but what could reset it so that history is lost 
> in wtmp when it's not lost in the btmp file?

The problem is that eventually the wtmp file would fill up your
harddrive  (well, it would when Unix first came out - but with
modern hard drives it could take a large fraction of the lifetime
of the universe before that happened!)

So anyway there is a program called 'logrotate' that clears out (and
archives) old logging files.

It's generally called from the 'cron' facility.  On SuSE machines,
there is a script that's launched from '/etc/cron.daily that runs
logrotate...so I suppose wtmp gets archived daily and (presumably)
the very oldest logs are deleted.

So I guess you could remove the logrotate script from /etc/cron.daily
and then the wtmp log would just get longer and longer.




More information about the Discuss mailing list