From owner-freebsd-amd64@FreeBSD.ORG Fri Jan 27 22:10:09 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 81C2516A420 for ; Fri, 27 Jan 2006 22:10:09 +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 060F843D45 for ; Fri, 27 Jan 2006 22:10:08 +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 k0RMA8cU044755 for ; Fri, 27 Jan 2006 22:10:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0RMA8Jc044754; Fri, 27 Jan 2006 22:10:08 GMT (envelope-from gnats) Date: Fri, 27 Jan 2006 22:10:08 GMT Message-Id: <200601272210.k0RMA8Jc044754@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: Fri, 27 Jan 2006 22:10:09 -0000 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: Fri, 27 Jan 2006 17:02: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? It's easy to do on any BSD system - in /usr/src/usr.bin/rup, make a copy rupx.c with this diff: *** rup.c Sat May 21 05:55:07 2005 --- rupx.c Fri Jan 27 16:17:25 2006 *************** *** 153,158 **** --- 153,159 ---- (double)host_stat->avenrun[0]/FSCALE, (double)host_stat->avenrun[1]/FSCALE, (double)host_stat->avenrun[2]/FSCALE); + printf("ipackets: %d opackets %d\n", host_stat->if_ipackets, host_stat->if_opackets); remember_host(raddrp->sin_addr); return(0); All other FreeBSD systems seem to return 0 for if_opackets (which is wrong), whereas 6.0 returns junk. NetBSD, Solaris, SunOS 4.x, & Irix 6.x all seem to do the right thing. I also note that the RPC/XDR code seems to be quite ancient - even SunOS 4.1.1 1990 code has declarations for an additional version 4 of the rstats protocol: RSTATVERS_VAR, with variable args for RSTAT_CPUSTATES & RSTAT_DK_NDRIVE. All the code appears to have version 3 (RSTATVERS_TIME), which rup uses. Cheers, Bruce Becker +1 416 410 0879 GTS Network Administration Toronto, Ont. Email: hostmaster@gts.net