{"id":14224,"date":"2022-01-21T11:58:29","date_gmt":"2022-01-21T11:58:29","guid":{"rendered":"https:\/\/linuxways.net\/?p=14224"},"modified":"2022-01-21T11:58:29","modified_gmt":"2022-01-21T11:58:29","slug":"iostat-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/iostat-command-in-linux\/","title":{"rendered":"iostat Command in Linux"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>The iostat command in Linux allows users to monitor system i\/o statistics on the device. It is based on how long the devices are operating at the average baud rate to monitor the input\/output of the system. Based on reports, system configurations can be changed to optimize CPU performance. This command is in the sysstat package.<\/p>\n<p>Now we&#8217;re gonna teach you to use the iostat command in Linux.<\/p>\n<h2>Installing sysstat package<\/h2>\n<p>Since the iostat command is in the sysstat package, you need to install it:<\/p>\n<pre>$ sudo apt install sysstat<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"250\" class=\"wp-image-14225\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-484.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-484.png 993w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-484-300x76.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-484-768x193.png 768w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/p>\n<h2>Using iostat command<\/h2>\n<p>To display monitoring reports:<\/p>\n<pre>$ iostat<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"470\" class=\"wp-image-14226\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-485.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-485.png 994w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-485-300x142.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-485-768x363.png 768w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><\/p>\n<p>In the output, you can see the CPU report and Device report.<\/p>\n<p><strong>Parameter<\/strong>:<\/p>\n<p>1. CPU<\/p>\n<p>%user: % CPU usage<\/p>\n<p>%nice: % CPU usage with nice priority<\/p>\n<p>% system: % CPU usage at the system level<\/p>\n<p>%iowait: % of CPU time idle and system request i\/o<\/p>\n<p>%steal: % virtual CPU waiting while another virtual processor is serving the hypervisor<\/p>\n<p>%idle: % CPU time idle and no system request i\/o<\/p>\n<p>2. Device<\/p>\n<p>Device: the I\/O device name<\/p>\n<p>tps: the transfers per second<\/p>\n<p>kB_read\/s: the amount of data CPU read per second in kiloBytes (kB)<\/p>\n<p>kB_wrtn\/s: the amount of data CPU written per second in kiloBytes (kB)<\/p>\n<p>kB_dscd\/s: the rate of data CPU discarded per second in kiloBytes (kB)<\/p>\n<p>kB_read: the total number of blocks read<\/p>\n<p>kB_wrtn: the total number of blocks written<\/p>\n<p>kB_dscd: the total number of blocks discarded<\/p>\n<h2>The syntax of the iostat command<\/h2>\n<pre>$ iostat [option] [device-name]<\/pre>\n<p><strong>option<\/strong>:<\/p>\n<p>1. -c: displaying summary of monitoring reports<\/p>\n<pre>$ iostat -c<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"189\" class=\"wp-image-14227\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-486.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-486.png 994w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-486-300x57.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-486-768x146.png 768w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><\/p>\n<p>2. -d: displaying I\/O devices report only<\/p>\n<pre>$ iostat -d<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"408\" class=\"wp-image-14228\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-487.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-487.png 993w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-487-300x123.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-487-768x316.png 768w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/p>\n<p>3. -x: displaying the detailed report<\/p>\n<pre>$ iostat -x<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"996\" height=\"447\" class=\"wp-image-14229\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-488.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-488.png 996w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-488-300x135.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-488-768x345.png 768w\" sizes=\"auto, (max-width: 996px) 100vw, 996px\" \/><\/p>\n<p>4. -m: displaying reports in MegaBytes<\/p>\n<pre>$ iostat -m<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"992\" height=\"471\" class=\"wp-image-14230\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-489.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-489.png 992w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-489-300x142.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-489-768x365.png 768w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/p>\n<p>5. -k: displaying reports in kiloBytes<\/p>\n<pre>$ iostat -k<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"995\" height=\"472\" class=\"wp-image-14231\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-490.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-490.png 995w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-490-300x142.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-490-768x364.png 768w\" sizes=\"auto, (max-width: 995px) 100vw, 995px\" \/><\/p>\n<p>6. -p: displaying device block report<\/p>\n<pre>$ iostat -p<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"489\" class=\"wp-image-14232\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-491.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-491.png 994w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-491-300x148.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-491-768x378.png 768w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>We just taught you to use the iostat command in Linux.<\/p>\n<p>Thank you for referring!<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction The iostat command in Linux allows users to monitor system i\/o statistics on the device. It is based on how long the devices are operating at the&hellip;<\/p>","protected":false},"author":1,"featured_media":14258,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,5,83,165,2],"tags":[869,35],"class_list":["post-14224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-mint","category-opensuse","category-red-hat","category-ubuntu","tag-iostat-command","tag-linux"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=14224"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/14258"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=14224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=14224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=14224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}