From owner-freebsd-stable@freebsd.org Wed Jun 20 15:37:26 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 A88E5101FBBF for ; Wed, 20 Jun 2018 15:37:26 +0000 (UTC) (envelope-from Holger.Kipp@alogis.com) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03on0728.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe08::728]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04202804A3 for ; Wed, 20 Jun 2018 15:37:25 +0000 (UTC) (envelope-from Holger.Kipp@alogis.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alogis.onmicrosoft.com; s=selector1-alogis-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bZYLbatGELwv/d1Zq2CmCenFFOiiM5uR+iDIYuW+cU4=; b=Ja4ecEHaSmRTpTK3i4/Amk75XCZznjZkTY3jU7YyDBlMaMq/EoY3bm+oVqxw7J+4he1BVLn2aDcZF4QlkZf2KXeUiI850GQ7x8TWEbGGp9XaZvFlqqndbNSbnXTkOT60jzkaEWU6CAN3yM6l8UUln0oVpXUNMRMTAPOsRZYVMy4= Received: from AM6P192MB0503.EURP192.PROD.OUTLOOK.COM (52.134.121.25) by AM6P192MB0360.EURP192.PROD.OUTLOOK.COM (52.134.120.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.863.16; Wed, 20 Jun 2018 15:37:24 +0000 Received: from AM6P192MB0503.EURP192.PROD.OUTLOOK.COM ([fe80::44d2:66f4:2156:d2d1]) by AM6P192MB0503.EURP192.PROD.OUTLOOK.COM ([fe80::44d2:66f4:2156:d2d1%13]) with mapi id 15.20.0863.016; Wed, 20 Jun 2018 15:37:23 +0000 From: Holger Kipp To: Miroslav Lachman <000.fbsd@quip.cz> CC: "freebsd-stable@freebsd.org" Subject: Re: iostat busy value calculation Thread-Topic: iostat busy value calculation Thread-Index: AQHUCKh/spwao2z+mkSo3Caw3YLCbqRpR9mA Date: Wed, 20 Jun 2018 15:37:23 +0000 Message-ID: <5765F5AE-131A-4F2F-8C46-9E362611CDA1@alogis.com> References: <98c4156c-d2f0-f0c6-b859-9cea8ec29a42@quip.cz> In-Reply-To: <98c4156c-d2f0-f0c6-b859-9cea8ec29a42@quip.cz> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Holger.Kipp@alogis.com; x-originating-ip: [212.184.102.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6P192MB0360; 7:cyXTy+/QlUyehJ1QWHt6md8tG6ApFeWMcgEk+GF2NzXoqefQm7GRr/PvBElTcmRCOxHg1xFuWpcAbAzBRlCpPvnH5A+MpQvgthBN2JtpyQDm/+h5JGuZf1dU1Y4hEtFuPlCZXTNvxSB8SnwT69kgHtASKTL55abEhQeFHrCiYYti3c3KDa8NAgCf/Sh0xj7EHFOLV2OeCf+z4X9UJVIRpLpZBI6v/fmSWiYgjfxyMEN1XnjLN5fVTGyBMvNv3mUY x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 2981fb67-fef1-401e-261e-08d5d6c3b7ef x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6P192MB0360; x-ms-traffictypediagnostic: AM6P192MB0360: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(72170088055959); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM6P192MB0360; BCL:0; PCL:0; RULEID:; SRVR:AM6P192MB0360; x-forefront-prvs: 070912876F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39840400004)(396003)(376002)(366004)(346002)(39380400002)(199004)(189003)(33656002)(36756003)(5660300001)(106356001)(236005)(8936002)(6116002)(6512007)(54896002)(99286004)(2616005)(14454004)(229853002)(76176011)(5250100002)(102836004)(486006)(6436002)(82746002)(6486002)(476003)(25786009)(11346002)(3480700004)(8676002)(7736002)(413944005)(53936002)(4326008)(3846002)(2900100001)(6506007)(6916009)(83716003)(316002)(81166006)(81156014)(72206003)(186003)(26005)(3660700001)(478600001)(3280700002)(2906002)(66066001)(6246003)(86362001)(105586002)(68736007)(446003)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6P192MB0360; H:AM6P192MB0503.EURP192.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: alogis.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: F1CmRgNMYSG/tYNpcxP20BZP2QlW+AkDQH0YIGvhaZUEfA0bwMJGmp+ZiQHUcMMiDno8HacK8C3enbFi8tbnTqJtjOLwgdJraDlhW7CEnPFwbK86E0c8v/fcGcWLNBIAp00DOIIH06HaTDYzNgzCz/6G5Xe8p5elx92JSA2m1utLnGiMdGYoL6NVZ7p89+94lAKjBWWFzVHZdVHgdRUADFWHH44KqIJz6BboVS9kVoCpPsOcmISAL2KvzeN+ZnHSdpPvUH4uHJBPurE4mheZe8GlafzZDnfFw/t89Ffmctej27hRFmghuDghVqKGFBSD spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: alogis.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2981fb67-fef1-401e-261e-08d5d6c3b7ef X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2018 15:37:23.4725 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 15828ba7-fd50-4285-ae4d-078568595b48 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6P192MB0360 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 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:37:27 -0000 Dear Miroslav, looking at the manpage for iostat I see: %b % of time the device had one or more outstanding transac= tions tsvc_t/i total duration of transactions per time period, in secon= ds sb/i total time the device had one or more outstanding transa= c- tions per time period, in seconds So calculating the percentage using sb/i should be fairly easy. Best regards, Holger Am 20.06.2018 um 16:55 schrieb Miroslav Lachman <000.fbsd@quip.cz>: 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 f= irst 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 co= lumn 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 "bus= y" 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