From owner-freebsd-fs@FreeBSD.ORG  Wed Oct 12 19:31:09 2011
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 90B7D106566B
	for <freebsd-fs@freebsd.org>; Wed, 12 Oct 2011 19:31:09 +0000 (UTC)
	(envelope-from bsd@vink.pl)
Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com
	[209.85.213.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 4FCA78FC0A
	for <freebsd-fs@freebsd.org>; Wed, 12 Oct 2011 19:31:09 +0000 (UTC)
Received: by ywp17 with SMTP id 17so452884ywp.13
	for <freebsd-fs@freebsd.org>; Wed, 12 Oct 2011 12:31:08 -0700 (PDT)
Received: by 10.223.5.201 with SMTP id 9mr95922faw.5.1318446394511;
	Wed, 12 Oct 2011 12:06:34 -0700 (PDT)
Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com
	[209.85.214.54])
	by mx.google.com with ESMTPS id u6sm5268003fan.17.2011.10.12.12.06.33
	(version=SSLv3 cipher=OTHER); Wed, 12 Oct 2011 12:06:34 -0700 (PDT)
Received: by bkbzs8 with SMTP id zs8so530279bkb.13
	for <multiple recipients>; Wed, 12 Oct 2011 12:06:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.145.15 with SMTP id b15mr238821bkv.52.1318446392907; Wed,
	12 Oct 2011 12:06:32 -0700 (PDT)
Received: by 10.204.52.146 with HTTP; Wed, 12 Oct 2011 12:06:32 -0700 (PDT)
In-Reply-To: <94455706-B90D-4DBD-A7DE-E9A38F118D35@patpro.net>
References: <20110915120007.F41FF10656E1@hub.freebsd.org>
	<4B8C8026-1E12-4C32-88E3-9B34A3E58A91@patpro.net>
	<86ipnwg1s0.fsf@kopusha.home.net>
	<94455706-B90D-4DBD-A7DE-E9A38F118D35@patpro.net>
Date: Wed, 12 Oct 2011 21:06:32 +0200
Message-ID: <CAH17caUYJ4hj_bPqOcNg33OhytdzELjiHOs4CjV+75-5fcQO8w@mail.gmail.com>
From: Wiktor Niesiobedzki <bsd@vink.pl>
To: Patrick Proniewski <patpro@patpro.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Mikolaj Golub <trociny@freebsd.org>, freebsd-fs@freebsd.org
Subject: Re: measuring IO asynchronously
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Oct 2011 19:31:09 -0000

2011/10/12 Patrick Proniewski <patpro@patpro.net>
>
> On 10 oct. 2011, at 20:05, Mikolaj Golub wrote:
>
> > On Mon, 10 Oct 2011 16:33:11 +0200 Patrick Proniewski wrote:
> > PP> I would like to monitor the storage on various FreeBSD servers,
> > PP> especially I/O per seconds. Is there any way to gather statistics
> > PP> about I/O via asynchronous request, lets say, for example, using a
> > PP> munin plugin? =C2=A0`iostat -w 1` and `zpool iostat tank 1` are
> > PP> interesting, but not useable asynchronously.
> >
> > I use for this a simple program that I wrote some time ago. It uses dev=
stat(9)
> > kernel interface and outputs counters, like below
> >
> > kopusha:~% devstat ada0
> > ada0:
> > =C2=A0 =C2=A0 =C2=A0 =C2=A01339552256 bytes read
> > ../..
> > You can find it in ports (sysutils/devstat).
>
> Thank you Mikolaj, I'm going to give it a try!
>

What's wrong about iostat? (and how it is used by munin plugin)
%iostat -I -x
                        extended device statistics
device     r/i                  w/i             kr/i
kw/i         wait svc_t  %b
ada0     26756321.0 77603114.0 411881657.5 1192108987.0    0   3.2   1
ada1     13483063.0   1131450.0 943635180.5    43584216.0    0   5.7   0
ada2     13831313.0   1131763.0 943961104.5    43587768.0    0   5.5   0


Cheers,

Wiktor Niesiobedzki