From owner-freebsd-stable@freebsd.org Wed Jun 20 15:06:02 2018 Return-Path: Delivered-To: freebsd-stable@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 6A8CA101DC50 for ; Wed, 20 Jun 2018 15:06:02 +0000 (UTC) (envelope-from SRS0=2bF4=JG=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C5E37E384 for ; Wed, 20 Jun 2018 15:06:01 +0000 (UTC) (envelope-from SRS0=2bF4=JG=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id E5C4C2847C for ; Wed, 20 Jun 2018 17:05:53 +0200 (CEST) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 06CE02849E for ; Wed, 20 Jun 2018 16:55:29 +0200 (CEST) To: freebsd-stable@freebsd.org From: Miroslav Lachman <000.fbsd@quip.cz> Subject: iostat busy value calculation Message-ID: <98c4156c-d2f0-f0c6-b859-9cea8ec29a42@quip.cz> Date: Wed, 20 Jun 2018 16:55:28 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 15:06:02 -0000 I would like to know how the value of disk "busy" is calculated? I want to use values from iostat in the monitoring (zabbix). iostat shows averages by default and the last column is "busy %", but the first output contains averages from the system boot til now. # iostat -x -t da extended device statistics device r/s w/s kr/s kw/s qlen svc_t %b ada0 2.5 13.8 49.0 287.9 0 45.7 2 ada1 2.6 13.8 51.7 287.9 0 39.6 2 I don't want to use "iostat -x -t da -w 20" to get averages of the last 20 seconds because it means monitoring needs to wait 20 seconds on each run. I can use absolute values from iostat. This output is without any delay and the monitoring SW can calculate averages between two runs. But the last column is no busy %, it is sb/i. # iostat -I -x -t da extended device statistics device r/i w/i kr/i kw/i qlen tsvc_t/i sb/i ada0 7403218.0 40825749.0 144647824.0 849655694.0 0 2204904.2 73121.8 ada1 7537423.0 40825749.0 152643874.5 849655694.0 0 1914301.0 69996.5 So the question is - If I want to plot "busy %" in the graph - how the "busy" value in the first example is calculated? Is it possible to calculate it from the numbers that I have from "iostat -I -x" and the know time interval between two runs? Miroslav Lachman