From owner-freebsd-fs@freebsd.org Mon Feb 12 09:07:16 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2C14F0516A for ; Mon, 12 Feb 2018 09:07:16 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B9E46872F for ; Mon, 12 Feb 2018 09:07:16 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f43.google.com with SMTP id f137so19450459lfe.4 for ; Mon, 12 Feb 2018 01:07:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HgMvPmEJIm/7H2WCEEIbEw/xyZizY2WzGa50xj2bQL4=; b=Id1Lm7z9+pEd+FxUoOZx21MTC8Wh2kPW0n16qL78T/4PaJCAM57mPySXfraBTcHW4g 5bKTnnpIsjZP5ISlUNEmGz/6E8WbyoUHwOnvxUwJSWx2OPTSiIzdqrmC0EUGLsVmtAMN OX48OdFLpu5c4lVK1BfzYSzCw8Z0PCGu/IDE6pfFJ/++pulLefCR9RiXxYyX7uKBKAAs dWW5RYohhzXjEVZyVO1xaPIKDjpGn2LcGEqi65rxjBrzqs9vMTHzeHhVxruVcFHQCObP 21aJKXUEa5ABW/mjrVTR4XDamWKlAoOeP6ShAY2fQQLm4lE5+u/onAGrdPz/zjj02AWp P4Sg== X-Gm-Message-State: APf1xPC5+gmpXoH71RQPa+cfetCiStDRyf1yzg39omuEWts/Y0FqSP0w ENn5ACbe4rMu0d067A0OtkODsfzZUU0= X-Google-Smtp-Source: AH8x224dewWArJC3uT2qanNxuHXY7M22ATUo78QT7ILMwRgVyeRqUjmye/2alZGKHFMLPww+Kc3D8A== X-Received: by 10.25.167.85 with SMTP id q82mr7109838lfe.112.1518426429191; Mon, 12 Feb 2018 01:07:09 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id q133sm687433lfe.60.2018.02.12.01.07.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 01:07:08 -0800 (PST) Subject: Re: raw filesystem counters To: Peter Jeremy , "E.S. Rosenberg" Cc: freebsd-fs@freebsd.org References: <20180212055505.GD3353@server.rulingia.com> From: Andriy Gapon Message-ID: <7e201ce9-6162-ae5e-ea54-6f98cf2dd29f@FreeBSD.org> Date: Mon, 12 Feb 2018 11:07:07 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180212055505.GD3353@server.rulingia.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2018 09:07:17 -0000 On 12/02/2018 07:55, Peter Jeremy wrote: > On 2018-Feb-11 21:06:12 +0200, "E.S. Rosenberg" wrote: >> Is there any way to access raw disk counters similar to those found on >> Linux in: >> /sys/class/block//stat >> >> Preferably also by accessing such a virtual file and not by using iostat / >> zpool iostat which are already pre-processing counters and need to be run >> constantly to get accurate real-time estimates. > > For the raw disk data, have a look at the statistics functions in > libgeom(3). You can use the source code for gstat(8) to get a better idea > how to drive it. Or maybe devstat(3). > I don't know of any published API for vdev-level ZFS statistics and, > unfortunately, "zpool iostat" only supports "humanized" output, which makes > it difficult to use them as input to further monitoring. There are some > ARC statistics under sysctl kstat.zfs.misc > -- Andriy Gapon