{"id":3603,"date":"2015-06-09T10:00:53","date_gmt":"2015-06-09T01:00:53","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=3603"},"modified":"2015-06-09T16:13:23","modified_gmt":"2015-06-09T07:13:23","slug":"aws-ec2%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9-%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%ab%e3%82%a2%e3%83%83%e3%83%97%e6%99%82%e3%81%ae%e6%b3%a8%e6%84%8f%e7%82%b9%e3%80%90sysstat%e3%81%ab","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/aws-ec2%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9-%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%ab%e3%82%a2%e3%83%83%e3%83%97%e6%99%82%e3%81%ae%e6%b3%a8%e6%84%8f%e7%82%b9%e3%80%90sysstat%e3%81%ab\/","title":{"rendered":"AWS EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 \u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u6642\u306e\u6ce8\u610f\u70b9\u3010sysstat\u306b\u3064\u3044\u3066\u3011"},"content":{"rendered":"<p>\u3053\u3093\u3061\u306b\u306f\u3002irihara\u3067\u3059\u3002<br \/>\nAWS\u306eEC2\u306a\u3069\u3067\u306f\u3001\u7686\u3055\u3093\u3054\u5b58\u77e5\u306e\u3088\u3046\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u304b\u3089\u7c21\u5358\u306b\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3084\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u304c<br \/>\n\u53ef\u80fd\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3059\u308b\u969b\u306b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u30ea\u30d6\u30fc\u30c8\uff08AWS\u306eManagement Console\u3067EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306eStop\/Start\uff09\u304c<br \/>\n\u5fc5\u8981\u306a\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6ce8\u610f\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>\u25a0\u6ce8\u610f\u70b9\n\u30fbEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306bEIP\u3092\u4ed8\u3051\u3066\u3044\u306a\u3044\u3068\u3001\u8d77\u52d5\u3057\u76f4\u3057\u305f\u6642\u306bIP\u30a2\u30c9\u30ec\u30b9\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3002\n\u30fb\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30b9\u30c8\u30a2\u30fb\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u6d88\u3048\u3066\u3057\u307e\u3046\u3002\n<\/pre>\n<p>\u305d\u306e\u4ed6\u306b\u3082\u3001Linux\u7cfbOS\u306e\u5834\u5408\u3001\u30b5\u30fc\u30d0\u306e\u5404\u30ea\u30bd\u30fc\u30b9\uff08\u30e1\u30e2\u30ea\u3001\u30c7\u30a3\u30b9\u30af\u3001CPU\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09\u306e\u8ca0\u8377\u72b6\u6cc1\u306a\u3069\u3092<br \/>\n\u76e3\u8996\u3059\u308b\u76ee\u7684\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u72b6\u614b\u76e3\u8996\u30c4\u30fc\u30eb\u306esysstat\u3092\u30b5\u30fc\u30d0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u8a2d\u5b9a\u3057\u3066\u3001\u30b5\u30fc\u30d0\u904b\u7528\u306b\u4f7f\u7528\u3057\u3066\u3044\u308b<br \/>\n\u30b1\u30fc\u30b9\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u6ce8\u610f\u3059\u3079\u304d\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306f\u3001<strong>\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3059\u308b\u969b\u306b\u3001\u7570\u306a\u308b\u30b3\u30a2\u6570\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u3092\u9078\u629e\u3057\u3066\u8d77\u52d5\u3057\u76f4\u3059\u3068\u3001<br \/>\nsar\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3082\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3001\u6b63\u3057\u304f\u30ed\u30b0\u304c\u63a1\u53d6\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/strong><\/p>\n<p>\u25a0\u30e1\u30c3\u30bb\u30fc\u30b8\u4f8b\uff08debian7.6\u306e\u5834\u5408\uff09<\/p>\n<pre># sar\nCannot open \/var\/log\/sysstat\/sa20: No such file or directory\nPlease check if data collecting is enabled in \/etc\/default\/sysstat\n<\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u3092\u5909\u66f4\u3057\u305f\u65e5\u306esysstat\u306e\u30ed\u30b0\uff08\/var\/log\/sysstat\u914d\u4e0b\u306a\u3069\uff09\u3092\u524a\u9664\u3057\u3066\u3001sysstat\u306e\u30b5\u30fc\u30d3\u30b9\u3092<br \/>\n\u518d\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre># \/etc\/init.d\/sysstat status\n[ ok ] sadc cron jobs are enabled.\n\n# \/etc\/init.d\/sysstat restart\n[ ok ] Starting the system activity data collector: sadc.\n<\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305f\u30ed\u30b0\u306b\u30c7\u30fc\u30bf\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre># sar\nLinux 3.2.0-4-686-pae (ip-172-31-14-23)         05\/20\/2015      _i686_  (2 CPU)\n\n01:51:37 PM       LINUX RESTART\n\n\n# ls -l \/var\/log\/sysstat\/\ntotal 4\n-rw-r--r-- 1 root root 336 May 20 14:11 sa20\n<\/pre>\n<p>\u3053\u306e\u305f\u3081\u3001\u5bfe\u7b56\u3068\u3057\u3066\u306f\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30bf\u30a4\u30d7\u3092\u5909\u66f4\u3059\u308b\u524d\uff08\u30b5\u30fc\u30d0\u505c\u6b62\u524d\uff09\u306b\u3001\u524d\u3082\u3063\u3066\/var\/log\/sysstat\u914d\u4e0b\u306e<br \/>\n\u30d5\u30a1\u30a4\u30eb\u3092\u3001\u5225\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u79fb\u52d5\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u5f8c\u304b\u3089\u53c2\u7167\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u25a0\u78ba\u8a8d\u65b9\u6cd5<\/p>\n<pre># sar -f \/home\/testuser\/sa20\nLinux 3.2.0-4-686-pae (ip-172-31-14-23)         05\/20\/2015      _i686_  (2 CPU)\n\n01:51:37 PM       LINUX RESTART\n\n01:55:01 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle\n02:05:01 PM     all      0.00      0.00      0.01      0.00      0.01     99.98\nAverage:        all      0.00      0.00      0.01      0.00      0.01     99.98\n<\/pre>\n<p>sar\u30b3\u30de\u30f3\u30c9\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>\u3000\u3010\u30aa\u30d7\u30b7\u30e7\u30f3\u3011\n\u3000\u3000\u3000-A\u2026\u5168\u3066\u306e\u30c7\u30fc\u30bf\u306e\u8868\u793a\n\u3000\u3000\u3000-n DEV\u2026\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u9001\u4fe1\uff0f\u53d7\u4fe1\u30d1\u30b1\u30c3\u30c8\u306e\u7d71\u8a08\u60c5\u5831\u306e\u8868\u793a\n\u3000\u3000\u3000-n EDEV\u2026\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30a8\u30e9\u30fc\u30d1\u30b1\u30c3\u30c8\u306b\u95a2\u3059\u308b\u60c5\u5831\u306e\u8868\u793a\n\u3000\u3000\u3000-u\u2026CPU\u306e\u5229\u7528\u72b6\u6cc1\u306e\u8868\u793a\u3002\n\u3000\u3000\u3000-b\u2026\u30c7\u30a3\u30b9\u30afI\/O\u306e\u5229\u7528\u72b6\u6cc1\u306e\u8868\u793a\n\u3000\u3000\u3000-r\u2026\u30e1\u30e2\u30ea\u3068\u30b9\u30ef\u30c3\u30d7\u306e\u4f7f\u7528\u72b6\u6cc1\u306e\u8868\u793a\n\u3000\u3000\u3000-W\u2026\u30b9\u30ef\u30c3\u30d7\u306e\u7d71\u8a08\u60c5\u5831\u306e\u8868\u793a\n\u3000\u3000\u3000-q\u2026\u30ed\u30fc\u30c9\u30a2\u30d9\u30ec\u30fc\u30b8\u306e\u78ba\u8a8d   $ sar -q\n\u3000\u3000\u3000-s\u2026\u958b\u59cb\u6642\u9593          $ sar -s 00:00:00\n\u3000\u3000\u3000-e\u2026\u7d42\u4e86\u6642\u9593          $ sar -e 03:00:00\n\u3000\u3000\u3000-f\u2026\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u5b9a       $ sar -f \/var\/log\/sa\/sa03\n<\/pre>\n<p>sysstat\u306f\u3001\u901a\u5e38Linux\u7cfbOS\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u3001\u7279\u5225\u306a\u8a2d\u5b9a\u306a\u3069\u3057\u306a\u304f\u3066\u3082\u4f7f\u7528\u3067\u304d\u308b\u306e\u3067\u3001<br \/>\n\u30b7\u30b9\u30c6\u30e0\u72b6\u614b\u306e\u78ba\u8a8d\u306b\u306f\u3082\u3063\u3066\u3053\u3044\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001ZABBIX\u3084cacti\u3001hinemos\u306a\u3069\u306e\u76e3\u8996\u30c4\u30fc\u30eb\u3092\u5c0e\u5165\u3059\u308c\u3070\u3001GUI\u3067\u306e\u78ba\u8a8d\u3082\u53ef\u80fd\u3067\u3059\u3057\u3001<br \/>\n\u4e00\u5143\u7684\u306b\u30b5\u30fc\u30d0\u3092\u7ba1\u7406\u3067\u304d\u3001\u69d8\u3005\u306a\u6a5f\u80fd\uff08\u30b8\u30e7\u30d6\u7ba1\u7406\u3001\u30dd\u30fc\u30c8\u76e3\u8996\u3001\u969c\u5bb3\u767a\u751f\u6642\u306e\u30e1\u30fc\u30eb\u9001\u4fe1\u306a\u3069\uff09\u3082\u4f7f\u3048\u308b\u306e\u3067\u3001<br \/>\n\u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u306e\u5c0e\u5165\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u3061\u306b\u306f\u3002irihara\u3067\u3059\u3002 AWS\u306eEC2\u306a\u3069\u3067\u306f\u3001\u7686\u3055\u3093\u3054\u5b58\u77e5\u306e\u3088\u3046\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u304b\u3089\u7c21\u5358\u306b\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3084\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u304c \u53ef\u80fd\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3059\u308b\u969b\u306b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u30ea\u30d6\u30fc\u30c8\uff08AWS\u306eMana&#8230;<\/p>\n","protected":false},"author":1,"featured_media":223,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"3603","footnotes":""},"categories":[20],"tags":[],"class_list":{"0":"post-3603","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/3603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=3603"}],"version-history":[{"count":3,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/3603\/revisions"}],"predecessor-version":[{"id":3619,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/3603\/revisions\/3619"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/223"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=3603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=3603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=3603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}