Date: Fri, 8 Aug 2014 18:40:21 +0300 From: Stefan Parvu <sparvu@systemdatarecorder.org> To: freebsd-hackers@freebsd.org Subject: disk and NIC io statistics via sysctl Message-ID: <20140808184021.537feca9b15e3a261ea27fa7@systemdatarecorder.org>
next in thread | raw e-mail | index | archive | help
Hi, Fetching CPU and Memory statistics, using sysctl interface and perl seems nice and easy. I made great progress with sysrec a generic recorder reporting: cpu mem disk and nic stats on FreeBSD. Now Im getting into disk and nic sections: 1. Disk Im able to get a list of all disks on a system using kern.disks sysctl variable. I want to be able to report per disk something like: readreq rate read requests per second, rate writereq rate write requests per second, rate totreq rate total read + write requests per second, rate readbyt rate read bytes per second, in KB, rate writebyt rate write bytes per second, in KB, rate totbyt rate total read + write bytes per second, in KB, rate iostat seems the simplest way to fetch these, but how about sysctl interface ? I could not figure out any sysctl parameters for disk throughput. How one will fetch throughput per disk via sysctl ? 2. NIC Same will go for network card interfaces. I want to fetch per NIC throughput and errors via sysctl, something like these: 1 timestamp time seconds since Epoch 2 interface number NIC name, string 3 rxKB rate the number of KBytes received per sec 4 rxpcks rate the no. of packets received per sec 5 rxerrs rate the number of errors while received packets per sec 6 rxdrop rate the number of packets that were dropped per sec 7 rxfifo rate the number of FIFO overruns on received packets per sec 8 rxframe rate the number of carrier errors on received packet per sec 9 rxcompr rate the number of compressed packets received per sec 10 rxmulti rate the number of multicast packets received per sec 11 txKB rate the number of KBytes transmitted per sec 12 txpcks rate the number of packets transmitted per sec 13 txerrs rate the number of errors transmitting packets per sec 14 txdrop rate the number of packets that were dropped per sec 15 txfifo rate the number of FIFO overruns on transmitted packets per sec 16 txcolls rate the number of collisions that were detecte per sec 17 txcarr rate the number of carrier errors on transmitted packets per sec 18 txcompr rate the number of compressed packets transmitted per sec 19 ttpcks rate the total number of packets (received + transmitted) per sec 20 ttKB rate the total number of KBytes (received + transmitted) per sec Any ideas ? Many thanks, -- Stefan Parvu <sparvu@systemdatarecorder.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140808184021.537feca9b15e3a261ea27fa7>