Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!samsung!raybed2!rayssd!galaxia!dave From: dave@galaxia.Newport.RI.US (David H. Brierley) Newsgroups: comp.unix.admin Subject: Re: Overflowing wtmp Message-ID: <1147@galaxia.Newport.RI.US> Date: 2 Feb 91 03:41:45 GMT References: <92@tdatirv.UUCP> <705@camco.Celestial.COM> <1991Jan29.182320.1489@csn.org> Organization: Dave's Very Own Personal System Lines: 20 In article <1991Jan29.182320.1489@csn.org> skwu@spot.Colorado.EDU (WU SHI-KUEI) writes: >... I suppose one could read the whole file, close >it, then re-open it and write only the last N structures as shown in >Section 4 back. But why bother?? Why? Because when I have a problem with a system I like to be able to look at that systems history, including a history of logins. If I need to look at the login history I dont want to know all of the logins since Sunday, I want to know all of the logins for at least the last two weeks. What I did was to write a program that allows you to extract either the last N days or the last N kbytes. It does not attempt to rewrite the wtmp file so you need to stick a shell script wrapper around it. I run it every day (or maybe every other day) at 3am from cron. If anyone is interested in the source send me e-mail and I will either mail it back or post it if there is sufficient interest. -- David H. Brierley Home: dave@galaxia.newport.ri.us; Work: dhb@quahog.ssd.ray.com Send comp.sources.3b1 submissions to comp-sources-3b1@galaxia.newport.ri.us %% Can I be excused, my brain is full. **