amd64/92412: rcp.rstatd reports bogus packets/per/second info

hotlips Internet admin hostmaster at GTS.NET
Fri Jan 27 14:10:09 PST 2006


The following reply was made to PR amd64/92412; it has been noted by GNATS.

From: hotlips Internet admin <hostmaster at GTS.NET>
To: kris at obsecurity.org (Kris Kennaway)
Cc: bug-followup at 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 at gts.net


More information about the freebsd-amd64 mailing list