Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2007 23:30:04 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-amd64@FreeBSD.org
Subject:   Re: amd64/117664: iostat can't display IO current vlaue in first line
Message-ID:  <200710312330.l9VNU4Uq062886@freefall.freebsd.org>

index | next in thread | raw e-mail

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

From: John Baldwin <jhb@freebsd.org>
To: freebsd-amd64@freebsd.org
Cc: chifeng <chifeng@gmail.com>, freebsd-gnats-submit@freebsd.org
Subject: Re: amd64/117664: iostat can't display IO current vlaue in first line
Date: Wed, 31 Oct 2007 13:53:35 -0400

 On Tuesday 30 October 2007 03:22:39 am chifeng wrote:
 > 
 > >Number:         117664
 > >Category:       amd64
 > >Synopsis:       iostat can't display IO current vlaue in first line
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-amd64
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          change-request
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Tue Oct 30 07:30:02 UTC 2007
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     chifeng
 > >Release:        FreeBSD6.2-Release-p8
 > >Organization:
 > Platform Computing
 > >Environment:
 > FreeBSD cnxabuild.asia.corp.platform.com 6.2-RELEASE-p8 FreeBSD 
 6.2-RELEASE-p8 #0: Tue Oct 16 12:32:14 CST 2007     
 root@xabuild.asia.corp.platform.com:/usr/obj/usr/src/sys/PLATFORM  amd64
 > >Description:
 > When I write a shell script plugin for munin, I hope get a current value of 
 IO statistics. But iostat can't do it, it first statistics that are printed 
 are avaraged over the system uptime. If I use "iostat -c 2 | tail -1 " 
 command, this will wait 2s at least. 
 > so I think for iostat first line, 1) iostat should be display current value, 
 2) have a parameter to display current value at least. 
 
 There isn't a 'current value' for iostat to dump.  The kernel just keeps 
 running counts and iostat simulates a current value by saving the values each 
 time and computing a delta for each line after the first.  However, for the 
 first line there is no saved value so it cannot compute a delta.  Probably 
 you need to write your own plugin that saves the previous values and computes 
 deltas when queried similar to how iostat behaves.
 
 -- 
 John Baldwin


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710312330.l9VNU4Uq062886>