{"id":1359,"date":"2026-01-14T21:41:46","date_gmt":"2026-01-14T21:41:46","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1359"},"modified":"2026-01-14T21:41:46","modified_gmt":"2026-01-14T21:41:46","slug":"mwnci-iostat-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-iostat-function\/","title":{"rendered":"Mwnci iostat() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>iostat<strong>()<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>iostat()<\/i> function returns a hash keyed on disk device names, showing read\/write statistics.<\/p>\n<h2>Example<\/h2>\n<pre>include(\"sysstat\")\r\nData=iostat()\r\nprintln(Data,\"\\n\")\r\nforeach Device in keys(Data) {\r\n    DiskData=Data[Device]\r\n    printf(\"Device %s, kB read per sec=%.2f,  kB written per sec %.2f\\n\", Device, DiskData[\"kB_reads\"], DiskData[\"kB_wrtns\"])\r\n}\r\n\r\n{\"mmcblk0\": {\"kB_wrtn\": 27951545, \"kB_dscd\": 0, \"tps\": 3.98, \"kB_reads\": 24.94, \"kB_wrtns\": 157.22, \"kB_dscds\": 0, \"kB_read\": 4434148}, \"mmcblk0p1\": {\"kB_dscds\": 0, \"kB_read\": 8326, \"kB_wrtn\": 17, \"kB_dscd\": 0, \"tps\": 0, \"kB_reads\": 0.05, \"kB_wrtns\": 0}, \"mmcblk0p2\": {\"kB_dscds\": 0, \"kB_read\": 4424094, \"kB_wrtn\": 27951528, \"kB_dscd\": 0, \"tps\": 3.98, \"kB_reads\": 24.88, \"kB_wrtns\": 157.22}}\r\n\r\nDevice mmcblk0, kB read per sec=24.94,  kB written per sec 157.22\r\nDevice mmcblk0p1, kB read per sec=0.05,  kB written per sec 0.00\r\nDevice mmcblk0p2, kB read per sec=24.88,  kB written per sec 157.22\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax iostat() Description The iostat() function returns a hash keyed on disk device names, showing read\/write statistics. Example include(&#8220;sysstat&#8221;) Data=iostat() println(Data,&#8221;\\n&#8221;) foreach Device in keys(Data) { DiskData=Data[Device] printf(&#8220;Device %s, kB read per sec=%.2f, kB written per sec %.2f\\n&#8221;, Device, DiskData[&#8220;kB_reads&#8221;], DiskData[&#8220;kB_wrtns&#8221;]) } {&#8220;mmcblk0&#8221;: {&#8220;kB_wrtn&#8221;: 27951545, &#8220;kB_dscd&#8221;: 0, &#8220;tps&#8221;: 3.98, &#8220;kB_reads&#8221;: 24.94, &#8220;kB_wrtns&#8221;: 157.22, &#8220;kB_dscds&#8221;: 0, &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-iostat-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci iostat() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1359","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1359"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1359\/revisions"}],"predecessor-version":[{"id":1362,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1359\/revisions\/1362"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}