Return-Path: Received: from mail-sy3aus01on0103.outbound.protection.outlook.com ([104.47.117.103]:52201 "EHLO AUS01-SY3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751857AbdJ3DaJ (ORCPT ); Sun, 29 Oct 2017 23:30:09 -0400 From: Ryan Doyle To: "linux-nfs@vger.kernel.org" Subject: [PATCH] nfs-utils: display NFS RPC queue time for mountstats and nfs-iostat Date: Mon, 30 Oct 2017 03:30:06 +0000 Message-ID: Content-Type: multipart/mixed; boundary="_002_MEXPR01MB0711C64DC23E94EE366C5455A2590MEXPR01MB0711ausp_" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: --_002_MEXPR01MB0711C64DC23E94EE366C5455A2590MEXPR01MB0711ausp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi there I've got a patch to display the NFS queue statistics for mountstats and nfs= iostat exported in /proc/self/mountstats. The RTT and total execution time = is currently displayed but I think it's also useful displaying how long the= task was queued for too. If others agree, please feel free to apply it. Cheers, Ryan= --_002_MEXPR01MB0711C64DC23E94EE366C5455A2590MEXPR01MB0711ausp_ Content-Type: text/x-patch; name="report_nfs_queue_stats_v1.patch" Content-Description: report_nfs_queue_stats_v1.patch Content-Disposition: attachment; filename="report_nfs_queue_stats_v1.patch"; size=4475; creation-date="Mon, 30 Oct 2017 03:21:41 GMT"; modification-date="Mon, 30 Oct 2017 03:21:41 GMT" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3Rvb2xzL21vdW50c3RhdHMvbW91bnRzdGF0cy5weSBiL3Rvb2xzL21vdW50 c3RhdHMvbW91bnRzdGF0cy5weQppbmRleCBhNjhkNzAyLi4yOWI1ZjVhIDEwMDY0NAotLS0gYS90 b29scy9tb3VudHN0YXRzL21vdW50c3RhdHMucHkKKysrIGIvdG9vbHMvbW91bnRzdGF0cy9tb3Vu dHN0YXRzLnB5CkBAIC01ODcsNiArNTg3LDcgQEAgY2xhc3MgRGV2aWNlRGF0YToKICAgICAgICAg b3BzID0gZmxvYXQocnBjX3N0YXRzWzBdKQogICAgICAgICByZXRyYW5zID0gZmxvYXQocnBjX3N0 YXRzWzFdIC0gcnBjX3N0YXRzWzBdKQogICAgICAgICBraWxvYnl0ZXMgPSBmbG9hdChycGNfc3Rh dHNbM10gKyBycGNfc3RhdHNbNF0pIC8gMTAyNAorICAgICAgICBxdWV1ZWRfZm9yID0gZmxvYXQo cnBjX3N0YXRzWzVdKQogICAgICAgICBydHQgPSBmbG9hdChycGNfc3RhdHNbNl0pCiAgICAgICAg IGV4ZSA9IGZsb2F0KHJwY19zdGF0c1s3XSkKIApAQCAtNTk2LDExICs1OTcsMTMgQEAgY2xhc3Mg RGV2aWNlRGF0YToKICAgICAgICAgICAgIHJldHJhbnNfcGVyY2VudCA9IChyZXRyYW5zICogMTAw KSAvIG9wcwogICAgICAgICAgICAgcnR0X3Blcl9vcCA9IHJ0dCAvIG9wcwogICAgICAgICAgICAg ZXhlX3Blcl9vcCA9IGV4ZSAvIG9wcworICAgICAgICAgICAgcXVldWVkX2Zvcl9wZXJfb3AgPSBx dWV1ZWRfZm9yIC8gb3BzCiAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICBrYl9wZXJfb3AgPSAw LjAKICAgICAgICAgICAgIHJldHJhbnNfcGVyY2VudCA9IDAuMAogICAgICAgICAgICAgcnR0X3Bl cl9vcCA9IDAuMAogICAgICAgICAgICAgZXhlX3Blcl9vcCA9IDAuMAorICAgICAgICAgICAgcXVl dWVkX2Zvcl9wZXJfb3AgPSAwLjAKIAogICAgICAgICBvcCArPSAnOicKICAgICAgICAgcHJpbnQo Zm9ybWF0KG9wLmxvd2VyKCksICc8MTZzJyksIGVuZD0nJykKQEAgLTYwOSw3ICs2MTIsOCBAQCBj bGFzcyBEZXZpY2VEYXRhOgogICAgICAgICBwcmludChmb3JtYXQoJ2tCL29wJywgJz4xNnMnKSwg ZW5kPScnKQogICAgICAgICBwcmludChmb3JtYXQoJ3JldHJhbnMnLCAnPjE2cycpLCBlbmQ9Jycp CiAgICAgICAgIHByaW50KGZvcm1hdCgnYXZnIFJUVCAobXMpJywgJz4xNnMnKSwgZW5kPScnKQot ICAgICAgICBwcmludChmb3JtYXQoJ2F2ZyBleGUgKG1zKScsICc+MTZzJykpCisgICAgICAgIHBy aW50KGZvcm1hdCgnYXZnIGV4ZSAobXMpJywgJz4xNnMnKSwgZW5kPScnKQorICAgICAgICBwcmlu dChmb3JtYXQoJ2F2ZyBxdWV1ZSAobXMpJywgJz4xNnMnKSkKIAogICAgICAgICBwcmludChmb3Jt YXQoKG9wcyAvIHNhbXBsZV90aW1lKSwgJz4yNC4zZicpLCBlbmQ9JycpCiAgICAgICAgIHByaW50 KGZvcm1hdCgoa2lsb2J5dGVzIC8gc2FtcGxlX3RpbWUpLCAnPjE2LjNmJyksIGVuZD0nJykKQEAg LTYxNyw3ICs2MjEsOCBAQCBjbGFzcyBEZXZpY2VEYXRhOgogICAgICAgICByZXRyYW5zbWl0cyA9 ICd7MDo+MTAuMGZ9ICh7MTo+My4xZn0lKScuZm9ybWF0KHJldHJhbnMsIHJldHJhbnNfcGVyY2Vu dCkuc3RyaXAoKQogICAgICAgICBwcmludChmb3JtYXQocmV0cmFuc21pdHMsICc+MTYnKSwgZW5k PScnKQogICAgICAgICBwcmludChmb3JtYXQocnR0X3Blcl9vcCwgJz4xNi4zZicpLCBlbmQ9Jycp Ci0gICAgICAgIHByaW50KGZvcm1hdChleGVfcGVyX29wLCAnPjE2LjNmJykpCisgICAgICAgIHBy aW50KGZvcm1hdChleGVfcGVyX29wLCAnPjE2LjNmJyksIGVuZD0nJykKKyAgICAgICAgcHJpbnQo Zm9ybWF0KHF1ZXVlZF9mb3JfcGVyX29wLCAnPjE2LjNmJykpCiAKICAgICBkZWYgZGlzcGxheV9p b3N0YXRzKHNlbGYsIHNhbXBsZV90aW1lKToKICAgICAgICAgIiIiRGlzcGxheSBORlMgYW5kIFJQ Q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vcCA9IDAuMAogICAgICAgICAgICAgZXhl X3Blcl9vcCA9IDAuMAorICAgICAgICAgICAgcXVldWVkX2Zvcl9wZXJfb3AgPSAwLjAKIAogICAg ICAgICBvcCArPSAnOicKICAgICAgICAgcHJpbnQoZm9ybWF0KG9wLmxvd2VyKCksICc8MTZzJyks IGVuZD0nJykKQEAgLTM0OCw3ICszNTEsOCBAQCBjbGFzcyBEZXZpY2VEYXRhOgogICAgICAgICBw cmludChmb3JtYXQoJ2tCL29wJywgJz4xNnMnKSwgZW5kPScnKQogICAgICAgICBwcmludChmb3Jt YXQoJ3JldHJhbnMnLCAnPjE2cycpLCBlbmQ9JycpCiAgICAgICAgIHByaW50KGZvcm1hdCgnYXZn IFJUVCAobXMpJywgJz4xNnMnKSwgZW5kPScnKQotICAgICAgICBwcmludChmb3JtYXQoJ2F2ZyBl eGUgKG1zKScsICc+MTZzJykpCisgICAgICAgIHByaW50KGZvcm1hdCgnYXZnIGV4ZSAobXMpJywg Jz4xNnMnKSwgZW5kPScnKQorICAgICAgICBwcmludChmb3JtYXQoJ2F2ZyBxdWV1ZSAobXMpJywg Jz4xNnMnKSkKIAogICAgICAgICBwcmludChmb3JtYXQoKG9wcyAvIHNhbXBsZV90aW1lKSwgJz4y NC4zZicpLCBlbmQ9JycpCiAgICAgICAgIHByaW50KGZvcm1hdCgoa2lsb2J5dGVzIC8gc2FtcGxl X3RpbWUpLCAnPjE2LjNmJyksIGVuZD0nJykKQEAgLTM1Niw3ICszNjAsOCBAQCBjbGFzcyBEZXZp Y2VEYXRhOgogICAgICAgICByZXRyYW5zbWl0cyA9ICd7MDo+MTAuMGZ9ICh7MTo+My4xZn0lKScu Zm9ybWF0KHJldHJhbnMsIHJldHJhbnNfcGVyY2VudCkuc3RyaXAoKQogICAgICAgICBwcmludChm b3JtYXQocmV0cmFuc21pdHMsICc+MTYnKSwgZW5kPScnKQogICAgICAgICBwcmludChmb3JtYXQo cnR0X3Blcl9vcCwgJz4xNi4zZicpLCBlbm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