{"id":1373,"date":"2021-12-25T07:40:35","date_gmt":"2021-12-24T22:40:35","guid":{"rendered":"http:\/\/192.168.20.1\/?p=1373"},"modified":"2021-12-25T07:56:08","modified_gmt":"2021-12-24T22:56:08","slug":"check-the-usage-status-of-individual-cpu-with-the-top-command","status":"publish","type":"post","link":"https:\/\/rlab.cavtime.net\/?p=1373","title":{"rendered":"Check the usage status of individual cpu with the &#8220;top&#8221; command"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>top \u30b3\u30de\u30f3\u30c9\u3067 cpu\u3054\u3068\u306e\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<h2>Environment<\/h2>\n<pre>$ cat \/etc\/os-release\r\nNAME=\"Ubuntu\"\r\nVERSION=\"18.04.6 LTS (Bionic Beaver)\"\r\nID=ubuntu\r\nID_LIKE=debian\r\nPRETTY_NAME=\"Ubuntu 18.04.6 LTS\"\r\nVERSION_ID=\"18.04\"\r\nHOME_URL=\"https:\/\/www.ubuntu.com\/\"\r\nSUPPORT_URL=\"https:\/\/help.ubuntu.com\/\"\r\nBUG_REPORT_URL=\"https:\/\/bugs.launchpad.net\/ubuntu\/\"\r\nPRIVACY_POLICY_URL=\"https:\/\/www.ubuntu.com\/legal\/terms-and-policies\/privacy-policy\"\r\nVERSION_CODENAME=bionic\r\nUBUNTU_CODENAME=bionic\r\n$ \r\n<\/pre>\n<h2>command &amp; method<\/h2>\n<p>top \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3042\u3068\u306b 1 \u3092\u62bc\u3059\u3068CPU\u3054\u3068\u306e\u5229\u7528\u72b6\u6cc1\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre>$ top\r\n\r\ntop - 07:36:51 up 21 days,  7:28,  1 user,  load average: 0.82, 0.70, 0.70\r\nTasks: 357 total,   2 running, 264 sleeping,   0 stopped,   0 zombie\r\n<span style=\"color: #ff0000;\">%Cpu(s):  7.1 us,  1.6 sy,  0.0 ni, 91.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st<\/span>\r\nKiB Mem : 49454984 total, 38656184 free,  6038008 used,  4760792 buff\/cache\r\nKiB Swap:  2097148 total,  2097148 free,        0 used. 42800492 avail Mem \r\n\r\n  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                         \r\n 2601 hyamazak  20   0 1114584 375000  18784 S  12.5  0.8   1675:29 qemu-system-x86                 \r\n 2607 hyamazak  20   0 1114584 375252  19044 R  12.5  0.8   1730:20 qemu-system-x86                 \r\n 1845 hyamazak  20   0   45424   4232   3432 R   6.2  0.0   0:00.01 top                             \r\n 2386 hyamazak  20   0 1117680 376520  18980 S   6.2  0.8   1567:56 qemu-system-x86                 \r\n 2387 hyamazak  20   0 1114584 373476  19332 S   6.2  0.8   1582:56 qemu-system-x86                 \r\n 2403 hyamazak  20   0 1114584 373104  18924 S   6.2  0.8   1556:08 qemu-system-x86                 \r\n 2491 hyamazak  20   0 1188316 379204  18888 S   6.2  0.8   1720:37 qemu-system-x86                 \r\n 2509 root      20   0       0      0      0 S   6.2  0.0  92:32.67 kvm-pit\/2491                    \r\n 2520 hyamazak  20   0 1114584 375208  19008 S   6.2  0.8   1763:09 qemu-system-x86                 \r\n 2660 hyamazak  20   0 1188316 379172  18900 S   6.2  0.8   1725:37 qemu-system-x86                 \r\n 2710 hyamazak  20   0 1114584 373092  19080 S   6.2  0.8   1590:32 qemu-system-x86                 \r\n 2724 hyamazak  20   0 1191412 376200  18908 S   6.2  0.8   1596:36 qemu-system-x86                 \r\n    1 root      20   0  225728   9508   6644 S   0.0  0.0   0:08.45 systemd                         \r\n    2 root      20   0       0      0      0 S   0.0  0.0   0:00.14 kthreadd                        \r\n    4 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker\/0:0H                    \r\n    6 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 mm_percpu_wq                    \r\n    7 root      20   0       0      0      0 S   0.0  0.0   0:01.22 ksoftirqd\/0                     \r\n    8 root      20   0       0      0      0 I   0.0  0.0   1:24.00 rcu_sched                       \r\n    9 root      20   0       0      0      0 I   0.0  0.0   0:00.00 rcu_bh                          \r\n   10 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration\/0                     \r\n   11 root      rt   0       0      0      0 S   0.0  0.0   0:01.40 watchdog\/0                      \r\n   12 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp\/0                         \r\n   13 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp\/1                         \r\n   14 root      rt   0       0      0      0 S   0.0  0.0   0:01.17 watchdog\/1                      \r\n   15 root      rt   0       0      0      0 S   0.0  0.0   0:00.01 migration\/1                     \r\n   16 root      20   0       0      0      0 S   0.0  0.0   0:00.22 ksoftirqd\/1                     \r\n   18 root       0 -20       0      0      0 I   0.0  0.0   0:00.00 kworker\/1:0H                    \r\n   19 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp\/2                         \r\n   20 root      rt   0       0      0      0 S   0.0  0.0   0:01.17 watchdog\/2                      \r\n<\/pre>\n<p>1 \u3092\u62bc\u3059<\/p>\n<pre>top - 07:31:09 up 21 days,  7:22,  1 user,  load average: 0.66, 0.69, 0.72\r\nTasks: 357 total,   2 running, 264 sleeping,   0 stopped,   0 zombie\r\n<span style=\"color: #ff0000;\">%Cpu0  : 10.5 us,  3.2 sy,  0.0 ni, 86.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu1  :  0.3 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu2  :  1.8 us,  0.0 sy,  0.0 ni, 97.8 id,  0.0 wa,  0.0 hi,  0.4 si,  0.0 st\r\n%Cpu3  : 11.9 us,  1.9 sy,  0.0 ni, 85.2 id,  1.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu4  :  7.1 us,  1.9 sy,  0.0 ni, 90.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu5  :  5.4 us,  1.3 sy,  0.0 ni, 93.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu6  : 14.8 us,  4.0 sy,  0.0 ni, 81.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st\r\n%Cpu7  : 10.9 us,  1.9 sy,  0.0 ni, 87.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st<\/span>\r\nKiB Mem : 49454984 total, 38655480 free,  6038912 used,  4760592 buff\/cache\r\nKiB Swap:  2097148 total,  2097148 free,        0 used. 42799580 avail Mem \r\n\r\n  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                         \r\n 2486 hyamazak  20   0 1114584 376888  18616 S   5.6  0.8   1603:12 qemu-system-x86                 \r\n 2387 hyamazak  20   0 1114584 373476  19332 S   5.3  0.8   1582:38 qemu-system-x86                 \r\n 2491 hyamazak  20   0 1188316 379204  18888 S   5.3  0.8   1720:17 qemu-system-x86                 \r\n 2520 hyamazak  20   0 1114584 375208  19008 S   5.3  0.8   1762:49 qemu-system-x86                 \r\n 2601 hyamazak  20   0 1114584 375000  18784 S   5.3  0.8   1675:11 qemu-system-x86                 \r\n 2607 hyamazak  20   0 1114584 375252  19044 S   5.3  0.8   1730:01 qemu-system-x86                 \r\n 2660 hyamazak  20   0 1188316 379172  18900 S   5.3  0.8   1725:18 qemu-system-x86                 \r\n 2710 hyamazak  20   0 1114584 373092  19080 S   5.3  0.8   1590:14 qemu-system-x86                 \r\n 2386 hyamazak  20   0 1117680 376520  18980 S   5.0  0.8   1567:38 qemu-system-x86                 \r\n 2403 hyamazak  20   0 1114584 373104  18924 S   4.7  0.8   1555:50 qemu-system-x86                 \r\n 2724 hyamazak  20   0 1191412 376200  18908 S   4.7  0.8   1596:18 qemu-system-x86                 \r\n 2790 hyamazak  20   0 1112976 347960  19064 S   4.0  0.7   1473:08 qemu-system-x86                 \r\n 2041 hyamazak  20   0  618864 112352  27080 R   1.0  0.2 134:57.40 panel-7-statusn                 \r\n 2171 hyamazak  20   0 2734520 188224  80264 S   1.0  0.4 304:37.29 gns3                            \r\n 1828 hyamazak  20   0   45392   4400   3492 R   0.7  0.0   0:00.03 top                             \r\n  394 root      19  -1  142224  55964  40660 S   0.3  0.1   1:53.54 systemd-journal                 \r\n 1654 root      20   0       0      0      0 I   0.3  0.0   0:00.01 kworker\/u16:2                   \r\n 1793 hyamazak  20   0 1529796  70832  40956 S   0.3  0.1  43:28.86 Xorg                            \r\n 1831 hyamazak  20   0   50576   4848   3716 S   0.3  0.0  14:58.98 dbus-daemon                     \r\n 1938 hyamazak  20   0  228544  26800  20888 S   0.3  0.1   5:59.09 xfwm4                           \r\n 2411 root      20   0       0      0      0 S   0.3  0.0  98:54.15 kvm-pit\/2403                    \r\n 2412 root      20   0       0      0      0 S   0.3  0.0  91:16.74 kvm-pit\/2387                    \r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Overview top \u30b3\u30de\u30f3\u30c9\u3067 cpu\u3054\u3068\u306e\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\u3002 Environment $ cat \/etc\/os-release NAME=&#8221;Ubuntu&#8221; VERSION=&#8221;18.04.6 LTS (Bionic [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[],"class_list":["post-1373","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts\/1373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1373"}],"version-history":[{"count":3,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts\/1373\/revisions"}],"predecessor-version":[{"id":1376,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=\/wp\/v2\/posts\/1373\/revisions\/1376"}],"wp:attachment":[{"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rlab.cavtime.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}