disk and NIC io statistics via sysctl
John-Mark Gurney
jmg at funkthat.com
Fri Aug 8 20:03:35 UTC 2014
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."
More information about the freebsd-hackers
mailing list