From owner-freebsd-amd64@FreeBSD.ORG Mon Jan 30 19:30:10 2006 Return-Path: X-Original-To: freebsd-amd64@hub.freebsd.org Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99B6116A422 for ; Mon, 30 Jan 2006 19:30:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78A9543D53 for ; Mon, 30 Jan 2006 19:30:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0UJU7Ru086384 for ; Mon, 30 Jan 2006 19:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0UJU7bR086383; Mon, 30 Jan 2006 19:30:07 GMT (envelope-from gnats) Date: Mon, 30 Jan 2006 19:30:07 GMT Message-Id: <200601301930.k0UJU7bR086383@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org From: hotlips Internet admin Cc: Subject: Re: amd64/92412: rcp.rstatd reports bogus packets/per/second info X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hotlips Internet admin List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 19:30:10 -0000 The following reply was made to PR amd64/92412; it has been noted by GNATS. From: hotlips Internet admin To: sean@mcneil.com (Sean McNeil) Cc: bug-followup@FreeBSD.org Subject: Re: amd64/92412: rcp.rstatd reports bogus packets/per/second info Date: Mon, 30 Jan 2006 14:22:52 -0500 (EST) Thus saith Sean McNeil: | | | On Jan 30, 2006, at 11:02 AM, hotlips Internet admin wrote: | | > Thus saith Sean McNeil: | > | On Sun, 2006-01-29 at 07:30 +0000, hotlips Internet admin wrote: | > | > The following reply was made to PR amd64/92412; it has been | > noted by GNATS. | > | > | > | > From: hotlips Internet admin | > | > To: kris@obsecurity.org (Kris Kennaway) | > | > Cc: bug-followup@FreeBSD.org | > | > Subject: Re: amd64/92412: rcp.rstatd reports bogus packets/per/ | > second info | > | > Date: Sun, 29 Jan 2006 02:25:33 -0500 (EST) | > | > | > | > Thus saith Kris Kennaway: | > | > | On Fri, Jan 27, 2006 at 11:59:15AM -0500, hotlips Internet | > admin wrote: | > | > | | > | > | > | > >Description: | > | > | > | > packets/second value reported by rpc.rstatd to remote | > monitor hovers around | > | > | > | > 8000 or so with odd downward spikes approx every 90 | > seconds (it's not at | > | > | > | all related to actual interface traffic) | > | > | > | > | > | > | > | > >How-To-Repeat: | > | > | > | > keep displaying rpc.rstatd data from 6.0 system | > | > | > | | > | > | > | How are you using rpc.rstatd and rup? I don't see a way | > to make rup | > | > | > | display "packets/second", it only gives uptime and load | > average: | > | > | > | | > | > | > | # rup | > | > | > | fbsd-amd64.isc. 10:02am up 4 days, 14:00, load | > average: 2.00 2.00 2.00 | > | > | > | > | > | > Solaris perfmeter, actually. | > | > | | > | > | Do you know how I can query this on FreeBSD? | > | > | > | > | > | > oop, wrong (older) diff - use this one below... | > | | > | The diff would be more readable if you only include useful | > changes and | > | eliminate difference caused solely from white space. For | > instance, with | > | diff -ub. | > | > | > rup is also broken, sigh - patches below to account for | > 8-btye timevals | > | > | > -- | > Bruce Becker +1 416 410 0879 | > GTS Network Administration Toronto, Ont. | > Email: hostmaster@gts.net | > | > --------- 8< --------- 8< --------- 8< --------- 8< --------- 8< | > --------- | > | > --- rup.c.orig Sat May 21 05:55:07 2005 | > +++ rup.c Mon Jan 30 13:55:34 2006 | > @@ -93,6 +93,7 @@ | > static bool_t | > rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp) | > { | > + long longtime; | > struct tm *tmp_time; | > struct tm host_time; | > struct tm host_uptime; | > @@ -118,12 +119,14 @@ | > | > printf("%-*s\t", HOST_WIDTH, host); | > | > - tmp_time = localtime((time_t *)&host_stat->curtime.tv_sec); | > + longtime = host_stat->curtime.tv_sec; | > + tmp_time = localtime((time_t *)&longtime); | > host_time = *tmp_time; | > | | | Just curious, but why not declare a variable as time_t instead of | long? Seems like that would be more correct. | | | > host_stat->curtime.tv_sec -= host_stat->boottime.tv_sec; | > | > - tmp_time = gmtime((time_t *)&host_stat->curtime.tv_sec); | > + longtime = host_stat->curtime.tv_sec; | > + tmp_time = gmtime((time_t *)&longtime); | > host_uptime = *tmp_time; | > | > #define updays (host_stat->curtime.tv_sec / 86400) it didn't seem to matter because of the "u_int tv_sec" declaration in rstat_timeval in /usr/include/rpcsvc/rstat.h, and the surrounding "(time_t *)&" - it should be as you suggest however in fact the problem mentioned seems to have been noticed recently and is fixed somewhat more cleanly in current ... Cheers, Bruce Becker +1 416 410 0879 GTS Network Administration Toronto, Ont. Email: hostmaster@gts.net