Date: Fri, 9 Aug 2002 17:52:59 +0200 From: Thomas Moestl <tmoestl@gmx.net> To: Patrick <patrick@godloveya.com> Cc: sparc@FreeBSD.ORG Subject: Re: vmstat Message-ID: <20020809155258.GA341@crow.dom2ip.de> In-Reply-To: <20020809145030.20772.qmail@vpop.dmv.com> References: <20020809145030.20772.qmail@vpop.dmv.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2002/08/09 at 10:50:29 -0400, Patrick wrote: > I've been looking into the issue with vmstat not working properly,and I've > narrowed it down to the getuptime() routine. > > if (boottime == 0) > kread(X_BOOTTIME, &boottime, sizeof(boottime)); > > > After the kread function, boottime is equal to 0, which fails. Yes, this is a type mismatch between userland (time_t == int) and kernel (struct timeval, where the first member tv_sec, in which vmstat is interested, is a long). Since sparc64 is big-endian, retrieving the time_t would read the most significant 32 bit of boottime.tv_sec, which were of course 0. I've just fixed this in CVS, thanks for the report! - thomas -- Thomas Moestl <tmoestl@gmx.net> http://www.tu-bs.de/~y0015675/ <tmm@FreeBSD.org> http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020809155258.GA341>