Date: Mon, 19 Apr 2004 14:08:56 -0700 From: Peter Wemm <peter@wemm.org> To: freebsd-sparc64@freebsd.org Cc: sparc64@freebsd.org Subject: Re: Minor problem with 64bTT: monthly accounting figures Message-ID: <200404191408.56929.peter@wemm.org> In-Reply-To: <p060204a1bc6936fd1174@[128.113.24.47]> References: <20040301145508.GA27240@seekingfire.com> <20040301150312.GQ35475@elvis.mu.org> <p060204a1bc6936fd1174@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 01 March 2004 11:03 am, Garance A Drosihn wrote: > At 4:03 PM +0100 3/1/04, Maxime Henrion wrote: > >Tillman Hodgson wrote: > >> Look a little odd this month: > >> > >> Subject: caliban.rospa.ca monthly run output > >> > >> Doing login accounting: > >> root 0.84 > >> total -298848.27 > >> toor -298849.12 > >> > > > -- End of monthly output -- > > This would be from the output of the 'ac' command. I tried > this on my 64-bTT machine, and it seemed to be working OK. > > >This is probably because the time is stored as a 32-bits integer > >in /var/run/utmp and /var/log/wtmp. > > If the time-value is defined as a fixed 32-bit integer (instead > of being time_t), then the records themselves should be fine. The > records (as written) won't be changing in size due to this change. > > So, if there is a bug here then it'll probably be in the 'ac' > program. That's my guess, at least. We can look into that some > more, but don't need to address it right away. Just fyi, ac does things like this: time_t ut_timecopy; ut_timecopy = _time32_to_time(event_up->ut_time); strlcpy(str_result, ctime(&ut_timecopy), sizeof(str_result)); However, there is also a big scary comment that says: * With sparc64 using 64-bit time_t's, there is some system * routine which sets ut_time==0 (the high-order word of a * 64-bit time) instead of a 32-bit time value. It sounds like something clobbers ut_time.. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404191408.56929.peter>