{"id":103,"date":"2015-03-05T09:04:43","date_gmt":"2015-03-05T09:04:43","guid":{"rendered":"https:\/\/www.nonamehosts.com\/blog\/?p=103"},"modified":"2015-03-05T09:04:43","modified_gmt":"2015-03-05T09:04:43","slug":"slow-system-check-it-with-iotop","status":"publish","type":"post","link":"https:\/\/www.nonamehosts.com\/blog\/tutorials\/slow-system-check-it-with-iotop\/","title":{"rendered":"Slow System? check it with iotop"},"content":{"rendered":"<p>The concept is pretty simple. It&#8217;s like the top program, but instead of CPU and memory usage, it monitors disk I\/O. If you have a system that is extremely slow to respond, but can&#8217;t seem to figure out what is going on, give iotop a try. You&#8217;ll probably have to install it, as I&#8217;ve never found a system with iotop installed by default, but it should be in the software repository of just about every Linux distro.<\/p>\n<p><!--more--><\/p>\n<h3 style=\"margin-bottom: 5px;\">Install iotop<\/h3>\n<p>Use the yum command to install iotop\u00a0under RHEL \/ CentOS Linux, enter:<\/p>\n<pre class=\"lang:sh highlight:0 decode:true\" title=\"install iotop\"># yum -y install iotop<\/pre>\n<h3 style=\"margin-bottom: 5px;\">How do I use iotop command?<\/h3>\n<p>iotop command displays columns for the I\/O bandwidth read and written by each process\/thread during the sampling period. It also displays the percentage of time the thread\/process spent while swapping in and while waiting on I\/O. For each process, its I\/O priority (class\/level) is shown. In addition, the total I\/O bandwidth read and written during the sampling period is displayed at the top of the interface.<\/p>\n<p><a href=\"https:\/\/www.nonamehosts.com\/blog\/wp-content\/uploads\/2015\/03\/iotopf1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-102 size-full aligncenter\" src=\"https:\/\/www.nonamehosts.com\/blog\/wp-content\/uploads\/2015\/03\/iotopf1.jpg\" alt=\"iotop ui\" width=\"550\" height=\"101\" \/><\/a>However, I recommend that you start iotop with &#8211;only option to see only processes or threads actually doing I\/O, instead of showing all processes or threads:<\/p>\n<pre class=\"lang:sh highlight:0 decode:true\" title=\"iotop --only\"># iotop --only<\/pre>\n<p>Other supported options by iotop command:<\/p>\n<pre class=\"lang:sh highlight:0 decode:true\" title=\"iotop options\">-o, --only\n              Only show processes or threads actually doing I\/O, instead of showing all processes or threads. This can be dynamically toggled by pressing o.\n       -b, --batch\n              Turn on non-interactive mode.  Useful for logging I\/O usage over time.\n       -n NUM, --iter=NUM\n              Set the number of iterations before quitting (never quit by default).  This is most useful in non-interactive mode.\n       -d SEC, --delay=SEC\n              Set the delay between iterations in seconds (1 second by default).  Accepts non-integer values such as 1.1 seconds.\n       -p PID, --pid=PID\n              A list of processes\/threads to monitor (all by default).\n       -u USER, --user=USER\n              A list of users to monitor (all by default)\n       -P, --processes\n              Only show processes. Normally iotop shows all threads.\n       -a, --accumulated\n              Show accumulated I\/O instead of bandwidth. In this mode, iotop shows the amount of I\/O processes have done since iotop started.\n       -k, --kilobytes\n              Use  kilobytes instead of a human friendly unit. This mode is useful when scripting the batch mode of iotop. Instead of choosing the most appropriate unit iotop will dis\u2010\n              play all sizes in kilobytes.\n       -t, --time\n              Add a timestamp on each line (implies --batch). Each line will be prefixed by the current time.\n       -q, --quiet\n              suppress some lines of header (implies --batch). This option can be specified up to three times to remove header lines.\n              -q     column names are only printed on the first iteration,\n              -qq    column names are never printed,\n              -qqq   the I\/O summary is never printed.<\/pre>\n<h3 style=\"margin-bottom: 5px;\">keyboard shortcuts for iotop command<\/h3>\n<ol>\n<li>Hit the <strong>left<\/strong> and <strong>right<\/strong> arrow keys to change the sorting.<\/li>\n<li>Hit <strong>r<\/strong> to reverse the sorting order.<\/li>\n<li>Hit <strong>o<\/strong> only to see processes or threads actually doing I\/O, instead of showing all processes or threads.<\/li>\n<li>Hit <strong>p<\/strong> only show processes. Normally iotop shows all threads.<\/li>\n<li>Hit <strong>a<\/strong> display accumulated I\/O instead of bandwidth. In this mode, iotop shows the amount of I\/O processes have done since iotop started.<\/li>\n<li>Ht <strong>i<\/strong> to change the priority of a thread or a process&#8217; thread(s) i.e. <a href=\"http:\/\/www.cyberciti.biz\/tips\/linux-set-io-scheduling-class-priority.html\">ionice<\/a>.<\/li>\n<li>Hot <strong>q<\/strong> to quit iotop.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The concept is pretty simple. It&#8217;s like the top program, but instead of CPU and memory usage, it monitors disk I\/O. If you have a system that is extremely slow to respond, but can&#8217;t seem to figure out what is going on, give iotop a try. You&#8217;ll probably have to install it, as I&#8217;ve never [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[61,68,115,119],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-iotop","tag-linux","tag-server","tag-slow"],"_links":{"self":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":0,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}