From owner-freebsd-performance@FreeBSD.ORG Tue Sep 23 08:45:21 2014 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04FAB4B9 for ; Tue, 23 Sep 2014 08:45:21 +0000 (UTC) Received: from cu01176a.smtpx.saremail.com (cu01176a.smtpx.saremail.com [195.16.150.151]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B37A32FA for ; Tue, 23 Sep 2014 08:45:19 +0000 (UTC) Received: from [172.16.2.2] (izaro.sarenet.es [192.148.167.11]) by proxypop03.sare.net (Postfix) with ESMTPSA id 6D8359DCF83; Tue, 23 Sep 2014 10:45:16 +0200 (CEST) Subject: Re: I like iostat, but... Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Borja Marcos In-Reply-To: <20140923113844.6f9e9584965dfd401f6943af@systemdatarecorder.org> Date: Tue, 23 Sep 2014 10:45:14 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <659899B2-1816-41FA-9DED-57416928A1EE@sarenet.es> References: <20140922212209.GA9619@albert.catwhisker.org> <20140923113844.6f9e9584965dfd401f6943af@systemdatarecorder.org> To: Stefan Parvu X-Mailer: Apple Mail (2.1283) Cc: freebsd-performance@freebsd.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2014 08:45:21 -0000 On Sep 23, 2014, at 10:38 AM, Stefan Parvu wrote: >=20 >> ... I rather wish I could get the same information via sysctl. = (Well, >> something seems to be available via the "opaque" kern.devstat.all >> sysctl(8) variable, but sysctl(8) doesn't display all of it, and = parsing >> it seems as if that would require knowledge about the internals of = the >> system where the data were acquired.) >=20 > I gave up parsing sysctl via Perl for disks and network devices. It = would be > nice to have devstat properly working via sysctl for disk devices. = Similar way > kern.cp_times does. Currently there is no simple way to extract per = disk stats from > sysctl as a Perl or Sh consumer, unless we build a C module to do = that.=20 Anyway, for disk stats GEOM offers a nice API. You can get delays per = GEOM provider, bandwidths, etc. Borja.