[PATCH] Re: systat -v on -CURRENT

Friedemann Becker friedemann.becker at student.uni-tuebingen.de
Sun Apr 6 11:54:34 PDT 2003


Never talk about patches that you'll forget to attach ;)

On Sun, 6 Apr 2003, Friedemann Becker wrote:

> Date: Sun, 6 Apr 2003 20:52:11 +0200 (CEST)
> From: Friedemann Becker <zxmxy33 at mail.uni-tuebingen.de>
> To: freebsd-hackers at freebsd.org
> Subject: [PATCH] Re: systat -v on -CURRENT
>
> I found out, that /usr/src/usr.bin/systat/vmstat.c:dinfo() sometimes
> calculates -0 for disk utilization.
>
> I attatched a patch, that fixed this behaviour and return 0 for negative
> values of "elapsed time".
>
> Could someone take a look at it and commit it, if it's correct?
> it's a one line + 2 lines of comment patch :-)
>
> Friedemann
>
>
>
> On Sat, 5 Apr 2003, Craig Reyenga wrote:
>
> > Date: Sat, 5 Apr 2003 17:34:51 -0500
> > From: Craig Reyenga <creyenga at connectmail.carleton.ca>
> > To: Andre Guibert de Bruet <andy at siliconlandmark.com>
> > Cc: freebsd-current at freebsd.org
> > Subject: Re: systat -v on -CURRENT
> >
> > Now that you mention it, Yes: ad2 is -0% busy.
> >
> > Disks   ad0   ad2   cd0 pass0             ofod            intrn
> > KB/t   0.00  0.00  0.00  0.00             %slo-z    30576 buf
> > tps       0     0     0     0             tfree        23 dirtybuf
> > MB/s   0.00  0.00  0.00  0.00                       17867 desiredvnodes
> > % busy    0    -0     0     0                        1070 numvnodes
> >
> > -Craig
> >
> > ----- Original Message -----
> > From: "Andre Guibert de Bruet" <andy at siliconlandmark.com>
> > To: <current at freebsd.org>
> > Sent: Saturday, April 05, 2003 5:20 PM
> > Subject: systat -v on -CURRENT
> >
> >
> > > Hi,
> > >
> > > I've noticed that 'systat -v' sometimes reports a negative disk activity
> > > percentile. Has anyone else noticed this behavior?
> > >
> > > Before I look into the problem, is someone already working on a fix?
> > >
> > > Regards,
> > >
> > > > Andre Guibert de Bruet | Enterprise Software Consultant >
> > > > Silicon Landmark, LLC. | http://siliconlandmark.com/    >
> > > _______________________________________________
> > > freebsd-current at freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > > To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
> > >
> >
> > _______________________________________________
> > freebsd-current at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
> >
>
>
-------------- next part --------------
--- vmstat.c	Sun Apr  6 20:46:08 2003
+++ vmstat.c.old	Sun Apr  6 18:44:55 2003
@@ -878,11 +878,6 @@
 		 * where the device has been 100% busy, correct it */
 		device_busy = elapsed_time;
 
-	if (device_busy < 0)
-		/* device_busy sometimes becomes -0, so cut off negative
-		 * values */
-	  device_busy = 0;
-
 	lc = DISKCOL + lc * 6;
 	putlongdouble(kb_per_transfer, DISKROW + 1, lc, 5, 2, 0);
 	putlongdouble(transfers_per_second, DISKROW + 2, lc, 5, 0, 0);


More information about the freebsd-hackers mailing list