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

Sean McNeil sean at mcneil.com
Mon Jan 30 11:10:09 PST 2006


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

From: Sean McNeil <sean at mcneil.com>
To: hotlips Internet admin <hostmaster at GTS.NET>
Cc: freebsd-amd64 at FreeBSD.org,
 bug-followup at FreeBSD.org
Subject: Re: amd64/92412: rcp.rstatd reports bogus packets/per/second info
Date: Mon, 30 Jan 2006 11:07:55 -0800

 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 <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: 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 at 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)
 >
 >
 


More information about the freebsd-amd64 mailing list