From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 8 20:03:35 2014 Return-Path: Delivered-To: freebsd-hackers@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 05B117B; Fri, 8 Aug 2014 20:03:35 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B7D7A24F3; Fri, 8 Aug 2014 20:03:34 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s78K3XFe082105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Aug 2014 13:03:34 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s78K3XZF082104; Fri, 8 Aug 2014 13:03:33 -0700 (PDT) (envelope-from jmg) Date: Fri, 8 Aug 2014 13:03:32 -0700 From: John-Mark Gurney To: Stefan Parvu Subject: Re: disk and NIC io statistics via sysctl Message-ID: <20140808200332.GF88623@funkthat.com> Mail-Followup-To: Stefan Parvu , Ian Lepore , freebsd-hackers@freebsd.org References: <20140808184021.537feca9b15e3a261ea27fa7@systemdatarecorder.org> <1407515358.56408.374.camel@revolution.hippie.lan> <20140808211814.e14706bd0949b7a1a7827785@systemdatarecorder.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140808211814.e14706bd0949b7a1a7827785@systemdatarecorder.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 08 Aug 2014 13:03:34 -0700 (PDT) Cc: freebsd-hackers@freebsd.org, Ian Lepore X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 20:03:35 -0000 Stefan Parvu wrote this message on Fri, Aug 08, 2014 at 21:18 +0300: > > > magic secret kernel backdoor interfaces, all these userland tools are > > using documented interfaces such as sysctl to get their info. (There > > may be a few miscreants that open /dev/kmem and rudely poke around in > > kernel memory, but I'm not sure we have any of them in base. The lsof > > tool in ports is one that comes to mind for that.) > > Ian, understood - no magic here. I was looking to see if there are ready sysctl > structures, arrays or hashes which can package already the mentioned stats. > Like kern.cp_times, a very nice thing which is hidden and undocumented. > > I see very big improvement in sysctl and things are much organized since FreeBSD 5. > But we will need better documentation. I agree... If you write some, I will clean it up and commit it... :) > Im on iostat now - to understand how throughput per disk gets calculated. > > > In addition to the tools you've already mentioned that have the info you > > want, have a look at gstat for IO stats, netstat for net throughput, and > > systat for lots of stuff. > > gstat, thanks. havent used that. I will look over iostat, netstat. Probable would be nice > to have a section on sysctl man page or probable something totally new which describes > cpu | mem | disk | net and kernel statistics. These should be described in their own page.. Putting detailed information like this is sysctl(3) is wrong... Creating a new page and cross-ref'ing them is best... Most of the sysctl(3) entries are ones that were assigned numbers, now most sysctl's are OID_AUTO, and we should be using names instead... I don't see any names used in sysctl(3)... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."