From owner-freebsd-amd64@FreeBSD.ORG Mon Jan 30 19:07:54 2006 Return-Path: X-Original-To: freebsd-amd64@FreeBSD.org Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9013C16A420; Mon, 30 Jan 2006 19:07:54 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3644143D48; Mon, 30 Jan 2006 19:07:53 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id 9D202F2534; Mon, 30 Jan 2006 11:07:53 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (triton.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 36887-07; Mon, 30 Jan 2006 11:07:53 -0800 (PST) Received: from [10.1.0.10] (mobile.mcneil.com [10.1.0.10]) by mail.mcneil.com (Postfix) with ESMTP id 41449F2422; Mon, 30 Jan 2006 11:07:53 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <383CC154-8322-4307-BA6D-67A0CEF358F4@mcneil.com> Content-Transfer-Encoding: 7bit From: Sean McNeil Date: Mon, 30 Jan 2006 11:07:55 -0800 To: hotlips Internet admin X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at mcneil.com Cc: bug-followup@FreeBSD.org, freebsd-amd64@FreeBSD.org 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 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:07:54 -0000 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) > >