{"id":7728,"date":"2023-01-10T23:16:20","date_gmt":"2023-01-10T14:16:20","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=7728"},"modified":"2024-02-08T07:24:49","modified_gmt":"2024-02-07T22:24:49","slug":"linux%e3%81%ae%e3%83%aa%e3%82%bd%e3%83%bc%e3%82%b9%e3%81%ae%e4%bd%bf%e7%94%a8%e7%8a%b6%e6%b3%81%e3%82%92sar%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7%e9%81%8e%e5%8e%bb%e5%88%86%e3%82%92%e5%90%ab","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/7728","title":{"rendered":"Linux\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u4f7f\u7528\u72b6\u6cc1\u3092\u904e\u53bb\u5206\u3092\u542b\u3081\u3066\u78ba\u8a8d\u3059\u308b\uff01\uff08sar\uff09"},"content":{"rendered":"<p>Linux\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u4f7f\u7528\u72b6\u6cc1\u3092\u3001sar\u30b3\u30de\u30f3\u30c9\u3067\u904e\u53bb\u5206\u3092\u542b\u3081\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>sar\u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>sar\u30b3\u30de\u30f3\u30c9\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u305b\u3093\u3002sysstat\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>RHEL\u7cfb\u306eOS\u306bsysstat\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h3>\n<p>RHEL\u7cfb\u306e\u5834\u5408\u306f\u3001dnf\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo dnf -y install sysstat\r\n<\/pre>\n<h3>Debian\u7cfb\u306eOS\u306bsysstat\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h3>\n<p>Debian\u7cfb\u306e\u5834\u5408\u306f\u3001apt\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo dnf -y install sysstat\r\n<\/pre>\n<h3>sar\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u3067\u304d\u306a\u3044\u3068\u304d\u306f\u30fb\u30fb\u30fb<\/h3>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u3001sar\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar\r\nCannot open \/var\/log\/sysstat\/sa11: No such file or directory\r\nPlease check if data collecting is enabled\r\n<\/pre>\n<p>sar\u30b3\u30de\u30f3\u30c9\u304c\u6709\u52b9\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo vi \/etc\/default\/sysstat\r\n...\r\nENABLED=&quot;true&quot;\r\n<\/pre>\n<h2>\u904e\u53bb\u5206\u306e\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\uff01\uff08sar -f \/var\/log\/sa\/saXX\uff09<\/h2>\n<p>\u904e\u53bb\u5206\u3092\u8868\u793a\u3059\u308b\u5834\u5408\u306f\u3001\u300c-f\u300d\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002RHEL\u7cfb\u306e\u5834\u5408\u306f\u300c-f \/var\/log\/sa\/saXX\u300d\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u300cXX\u300d\u306f\u65e5\u4ed8\u306b\u306a\u308a\u3001\u7d041\u30f6\u6708\u524d\u307e\u3067\u306e\u60c5\u5831\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar -f \/var\/log\/sa\/sa05\r\nel9_1.0.1.x86_64 (vmsans01) \t01\/05\/2023 \t_x86_64_\t(2 CPU)\r\n\r\n12:00:15 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle\r\n12:10:15 AM     all      0.25      0.03      0.65      0.04      0.00     99.02\r\n12:20:15 AM     all      0.26      0.00      0.50      0.03      0.00     99.21\r\n12:30:15 AM     all      0.25      0.00      0.49      0.08      0.00     99.19\r\n12:40:15 AM     all      0.26      0.03      0.51      0.04      0.00     99.15\r\n...\r\n<\/pre>\n<h2>CPU\u4f7f\u7528\u7387\u3092\u8868\u793a\u3059\u308b\uff01\uff08sar -P ALL\uff09<\/h2>\n<p>CPU\u4f7f\u7528\u7387\u306f\u3001\u300c-P ALL\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar -P ALL\r\nLinux 5.14.0-162.6.1.el9_1.0.1.x86_64 (vmsans01) \t01\/10\/2023 \t_x86_64_\t(2 CPU)\r\n\r\n09:19:35 PM  LINUX RESTART\t(2 CPU)\r\n\r\n...\r\n\r\n10:50:11 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle\r\n11:00:21 PM     all      0.28      0.00      0.43      0.08      0.00     99.20\r\n11:00:21 PM       0      0.33      0.00      0.39      0.08      0.00     99.20\r\n11:00:21 PM       1      0.22      0.00      0.47      0.09      0.00     99.21\r\n\r\nAverage:        CPU     %user     %nice   %system   %iowait    %steal     %idle\r\nAverage:        all      1.36      0.00      1.12      1.19      0.00     96.33\r\nAverage:          0      1.26      0.00      0.85      1.04      0.00     96.85\r\nAverage:          1      1.46      0.01      1.39      1.34      0.00     95.80\r\n<\/pre>\n<h2>\u30e1\u30e2\u30ea\u4f7f\u7528\u7387\u3092\u8868\u793a\u3059\u308b\uff01\uff08sar -r\uff09<\/h2>\n<p>\u30e1\u30e2\u30ea\u4f7f\u7528\u7387\u306f\u3001\u300c-r\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar -r\r\nLinux 5.14.0-162.6.1.el9_1.0.1.x86_64 (vmsans01) \t01\/10\/2023 \t_x86_64_\t(2 CPU)\r\n\r\n09:19:35 PM  LINUX RESTART\t(2 CPU)\r\n\r\n09:20:20 PM kbmemfree   kbavail kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty\r\n...\r\n10:50:11 PM    101404    605968    882960     48.69        16    301572   5217868    133.43    321608    656360        16\r\n11:00:21 PM    127404    612716    872068     48.09        16    286448   5216912    133.41    354216    609364        16\r\nAverage:       143786    438830   1076497     59.36        11    220820   5150384    131.70    293895    847853        16\r\n<\/pre>\n<h2>\u30da\u30fc\u30b8\u30f3\u30b0\u30b9\u30da\u30fc\u30b9\u4f7f\u7528\u7387\u3092\u8868\u793a\u3059\u308b\uff01\uff08sar -S\uff09<\/h2>\n<p>\u30da\u30fc\u30b8\u30f3\u30b0\u30b9\u30da\u30fc\u30b9\u4f7f\u7528\u7387\u306f\u3001\u300c-S\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar -S\r\nLinux 5.14.0-162.6.1.el9_1.0.1.x86_64 (vmsans01) \t01\/10\/2023 \t_x86_64_\t(2 CPU)\r\n\r\n09:19:35 PM  LINUX RESTART\t(2 CPU)\r\n\r\n09:20:20 PM kbswpfree kbswpused  %swpused  kbswpcad   %swpcad\r\n09:30:11 PM   1897120    200028      9.54     25844     12.92\r\n...\r\n11:00:21 PM   1000716   1096432     52.28     99288      9.06\r\n11:10:50 PM   1001228   1095920     52.26     99384      9.07\r\nAverage:      1312070    785078     37.44     66927      8.52\r\n<\/pre>\n<h2>I\/O\u306e\u72b6\u6cc1\u3092\u8868\u793a\u3059\u308b\uff01\uff08sar -b\uff09<\/h2>\n<p>I\/O\u306e\u72b6\u6cc1\u306f\u3001\u300c-b\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar -b\r\nLinux 5.14.0-162.6.1.el9_1.0.1.x86_64 (vmsans01) \t01\/10\/2023 \t_x86_64_\t(2 CPU)\r\n\r\n09:19:35 PM  LINUX RESTART\t(2 CPU)\r\n\r\n09:20:20 PM       tps      rtps      wtps      dtps   bread\/s   bwrtn\/s   bdscd\/s\r\n...\r\n10:50:11 PM      1.26      0.45      0.82      0.00      7.66      8.49      0.00\r\n11:00:21 PM      1.96      0.96      1.00      0.00     40.46     12.09      0.00\r\n11:10:50 PM      1.12      0.19      0.93      0.00      5.54     10.90      0.00\r\nAverage:       111.31    105.89      5.42      0.00   3105.90    563.31      0.00\r\n<\/pre>\n<h2>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u4f7f\u7528\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\uff01\uff08sar -n DEV\uff09<\/h2>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u4f7f\u7528\u72b6\u6cc1\u306f\u3001\u300c-n DEV\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sar -n DEV\r\nLinux 5.14.0-162.6.1.el9_1.0.1.x86_64 (vmsans01) \t01\/10\/2023 \t_x86_64_\t(2 CPU)\r\n\r\n09:19:35 PM  LINUX RESTART\t(2 CPU)\r\n\r\n09:20:20 PM     IFACE   rxpck\/s   txpck\/s    rxkB\/s    txkB\/s   rxcmp\/s   txcmp\/s  rxmcst\/s   %ifutil\r\n...\r\n11:00:21 PM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:00:21 PM    enp0s3      0.48      0.15      0.04      0.01      0.00      0.00      0.10      0.00\r\n11:00:21 PM   docker0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:00:21 PM br-3c00ffa748d1      0.01      0.02      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:00:21 PM veth57465ff      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:00:21 PM veth858be17      0.60      0.32      0.15      0.10      0.00      0.00      0.00      0.00\r\n11:00:21 PM veth7a5a5ff      5.43      4.88      1.54      1.26      0.00      0.00      0.00      0.00\r\n11:00:21 PM veth772dea3      5.18      6.02      1.36      1.69      0.00      0.00      0.00      0.00\r\n11:10:50 PM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:10:50 PM    enp0s3      1.09      0.63      0.08      0.11      0.00      0.00      0.11      0.00\r\n11:10:50 PM   docker0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:10:50 PM br-3c00ffa748d1      0.03      0.04      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:10:50 PM veth57465ff      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\n11:10:50 PM veth858be17      0.60      0.34      0.15      0.10      0.00      0.00      0.00      0.00\r\n11:10:50 PM veth7a5a5ff      5.73      5.12      1.61      1.31      0.00      0.00      0.00      0.00\r\n11:10:50 PM veth772dea3      5.41      6.30      1.41      1.76      0.00      0.00      0.00      0.00\r\nAverage:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\nAverage:       enp0s3      0.62      0.34      0.07      0.07      0.00      0.00      0.08      0.00\r\nAverage:      docker0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\nAverage:    br-3c00ffa748d1      0.05      0.07      0.00      0.00      0.00      0.00      0.00      0.00\r\nAverage:    veth57465ff      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00\r\nAverage:    veth858be17      0.63      0.37      0.15      0.10      0.00      0.00      0.00      0.00\r\nAverage:    veth7a5a5ff      5.53      4.96      1.57      1.28      0.00      0.00      0.00      0.00\r\nAverage:    veth772dea3      5.26      6.11      1.38      1.72      0.00      0.00      0.00      0.00\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>Linux\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u72b6\u6cc1\u3092\u904e\u53bb\u5206\u3092\u542b\u3081\u3066\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u300csar\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002OS\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3089\u3001sysstat\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u81ea\u52d5\u3067\u30ea\u30bd\u30fc\u30b9\u72b6\u6cc1\u3092\u53d6\u5f97\u3057\u3066\u304a\u304f\u3068\u904e\u53bb\u5206\u3082\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/8881\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u7a3c\u50cd\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u7a3c\u50cd\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/div><div class=\"substr\">Linux\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u7a3c\u50cd\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3067\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H5qkUu\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51ZPkoBGdZL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u4f7f\u7528\u72b6\u6cc1\u3092\u3001sar\u30b3\u30de\u30f3\u30c9\u3067\u904e\u53bb\u5206\u3092\u542b\u3081\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[193],"tags":[282,1164,25,582,1161,1168],"class_list":["post-7728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring-linux-basics","tag-linux","tag-sar","tag-25","tag-582","tag-1161","tag-1168"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=7728"}],"version-history":[{"count":2,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7728\/revisions"}],"predecessor-version":[{"id":15913,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7728\/revisions\/15913"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=7728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=7728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=7728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}