*BSD News Article 80929


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!metro!metro!asstdc.scgt.oz.au!nsw.news.telstra.net!act.news.telstra.net!psgrain!charnel.ecst.csuchico.edu!xmission!news-out.internetmci.com!news.internetMCI.com!newsfeed.internetmci.com!mr.net!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!EU.net!news2.EUnet.fr!newsbr.eunet.fr!usenet
From: fgm@osinet.fr (Frederic MARAND)
Newsgroups: comp.unix.bsd.bsdi.misc,comp.unix.bsd.freebsd.misc
Subject: Re: Differences in wtmp file format between FBSD and BSDI
Date: Wed, 16 Oct 1996 21:24:48 GMT
Organization: Groupe SEDI / Agorus SA / OSI SARL /
Lines: 25
Message-ID: <543n36$p67@newsbr.eunet.fr>
References: <53rl7h$jpo@nntp.igs.net>
NNTP-Posting-Host: 193.107.196.155
X-Newsreader: Forte Free Agent 1.0.82
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:5138 comp.unix.bsd.freebsd.misc:29420

pomegranite@cnwl.igs.net (Mat Trudel) wrote:

>Hi all,

>Does anyone know if there is a difference in the format of the wtmp
>files between FBSD 2.1.5 and BSDI 2.1? I'm setting up a web server
>running on FBSD, and wish to copy the wtmp files from our main server
>(running BSDI) to facilitate an "hours used this month"ish script for
>our customers.  The files copy no problem (using rdist into a
>different directory than /var/log) but when I run an ac -w wtmp.host
>user, it returns hour counts around the 50000 hour mark for any user.
>Any ideas on how to fix this, or an easier way to do it (I want to
>keep the actual processing off of the main server, and I'd like to
>stay away from nfs)

I suggest you take a long deep look at <sys/utmp.h> where the file
formats for all such files are defined (at least on other Unixes, I
hope it's the same for *BSD). If a difference exists between the two,
you should be able to find it here easily.

Writing a filter to convert one format to the other is a matter of
minutes using the getut() libraries. Alternatively, you could execute
your "ac" in the context of the other server, using "rsh" or "on".