{"id":1667,"date":"2014-11-17T10:00:52","date_gmt":"2014-11-17T01:00:52","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=1667"},"modified":"2014-11-12T11:13:06","modified_gmt":"2014-11-12T02:13:06","slug":"%e3%82%b5%e3%83%90%e3%82%ab%e3%83%b3-%e3%83%af%e3%83%b3%e3%83%a9%e3%82%a4%e3%83%8a%e3%83%bc","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/%e3%82%b5%e3%83%90%e3%82%ab%e3%83%b3-%e3%83%af%e3%83%b3%e3%83%a9%e3%82%a4%e3%83%8a%e3%83%bc\/","title":{"rendered":"\u30b5\u30d0\u30ab\u30f3 \u30ef\u30f3\u30e9\u30a4\u30ca\u30fc"},"content":{"rendered":"<p>kobata\u3067\u3059\u3002<br \/>\n\u30b5\u30d0\u30ab\u30f3\u304c\u4f7f\u3046\u7c21\u5358\u306aBash\u306e\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n<\/p>\n<h2>\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3068\u306f<\/h2>\n<ul>\n<li>1\u884c\u3060\u3051\u306e\u30d7\u30ed\u30b0\u30e9\u30e0<\/li>\n<li>\u826f\u304f\u5229\u7528\u3055\u308c\u308b\u8a00\u8a9e\u306fPerl\u3001Ruby\u3001Bash<\/li>\n<li>\u30a8\u30c7\u30a3\u30bf\u3092\u8d77\u52d5\u3059\u308b\u307b\u3069\u306e\u624b\u9593\u306f\u304b\u3051\u305f\u304f\u306a\u3044\u6642\u306b\u5229\u7528<\/li>\n<\/ul>\n<p>\u81ea\u5206\u306f\u4f5c\u696d\u304c\u9762\u5012\u306a\u6642\u3084\u3001\u540c\u3058\u52d5\u4f5c\u3092\u7e70\u308a\u8fd4\u3059\u6642\u306b\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u307e\u3059\u3002<br \/>\n<\/p>\n<h2>\u2460\u30c7\u30fc\u30bf\u79fb\u884c\u4e2d\u306b\u8ee2\u9001\u91cf\u3092\u76ee\u8996<\/h2>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwhile true; do df -h |grep \/home ; sleep 1 ; done\r\n<\/pre>\n<p>\n\u30b3\u30f3\u30c6\u30f3\u30c4\u30c7\u30fc\u30bf\u3084\u30e1\u30fc\u30eb\u30c7\u30fc\u30bf\u3001DB\u306eDump\u30c7\u30fc\u30bf\u306a\u3069\u3092\u79fb\u884c\u4e2d\u5229\u7528\u3002<br \/>\n\u3069\u306e\u304f\u3089\u3044\u30c7\u30fc\u30bf\u79fb\u884c\u3057\u305f\u304b\u9032\u6357\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u305b\u3063\u304b\u3061\u306a\u4eba\u3084\u30c7\u30fc\u30bf\u8ee2\u9001\u306b\u3088\u308b\u30b5\u30fc\u30d0\u8ca0\u8377\u304c\u6c17\u306b\u306a\u308b\u4eba\u306f\u5229\u7528\u304f\u3060\u3055\u3044\u3002<br \/>\n<\/p>\n<h2>\u2461rrd\u30d5\u30a1\u30a4\u30eb\u3092dump\/restore<\/h2>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nfor i in *.rrd ; do rrdtool dump $i &gt; \/home\/kobata\/cacti\/${i%.rrd}.xml ; done ;\r\n<\/pre>\n<p>\nCacti\u306e\u30ea\u30d7\u30ec\u30a4\u30b9\u6642\u306a\u3069\u306b\u5229\u7528\u3002<br \/>\nfor\u6587\u3092\u5229\u7528\u3059\u308c\u3070\u3001scp\u306a\u3069\u3067\u8907\u6570\u30b5\u30fc\u30d0\u3078\u30c7\u30fc\u30bf\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nfor i in 1 2 3 ; do scp kobata.txt 192.168.1.$i:\/home\/kobata\/ ;done\r\n<\/pre>\n\n<h2>\u2462\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u306e\u62bd\u51fa<\/h2>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nfor (( i=0; i&lt;=9; i++ )) ; do grep &quot;14\/Mar\/2012:0$i&quot; \/var\/www_logs\/*access_log.20120314* ;done\r\n<\/pre>\n<p>\n\u304a\u5ba2\u69d8\u306b\u3088\u3063\u3066\u7279\u5b9a\u6642\u9593\u306e\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u304c\u307b\u3057\u3044\u3068\u8981\u671b\u3092\u9802\u304f\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306fwhile\u6587\u3068for\u6587\u306e\u307f\u3067\u7533\u3057\u8a33\u306a\u3044\u3067\u3059\u3002<br \/>\n\u4ed6\u306b\u3082\u3044\u308d\u3044\u308d\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u307e\u305f\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<br \/>\n\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>kobata\u3067\u3059\u3002 \u30b5\u30d0\u30ab\u30f3\u304c\u4f7f\u3046\u7c21\u5358\u306aBash\u306e\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3068\u306f 1\u884c\u3060\u3051\u306e\u30d7\u30ed\u30b0\u30e9\u30e0 \u826f\u304f\u5229\u7528\u3055\u308c\u308b\u8a00\u8a9e\u306fPerl\u3001Ruby\u3001Bash \u30a8\u30c7\u30a3\u30bf\u3092\u8d77\u52d5\u3059\u308b\u307b\u3069\u306e\u624b\u9593\u306f\u304b\u3051\u305f\u304f\u306a\u3044\u6642\u306b\u5229\u7528 &#8230;<\/p>\n","protected":false},"author":6,"featured_media":415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[29],"tags":[],"class_list":{"0":"post-1667","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-linux","8":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1667","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\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=1667"}],"version-history":[{"count":20,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1667\/revisions"}],"predecessor-version":[{"id":1844,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1667\/revisions\/1844"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/415"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=1667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=1667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=1667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}