æ¦è¦ 2017å¹´1æ18æ¥ã«ãªãªã¼ã¹ããã Docker v1.13 以éï¼ä»æ¥ç¾å¨ã® v17.03.0-ce ï¼ã¯ã docker ã³ãã³ãã©ã¤ã³ã®å½ä»¤ä½ç³»ãåç·¨æããã¾ãããæ¬è¨äºã§ã¯å¤æ´ã«è³ã£ãèæ¯ã¨ãæ°æ§ã³ãã³ãä½ç³»ã®æ¯è¼æ å ±ãæ´çãã¾ãã æ°ãããµãã³ãã³ãä½ç³»ã®å°å ¥ã¨èæ¯ æ°ããã³ãã³ãä½ç³»ã®å°å ¥ã«è³ã£ãã®ã¯ãdocker ã®ãããã¬ãã«ã»ã³ãã³ã群ã 40 ãè¶ããç¶æ³ï¼å½æï¼ã¨ãªã£ãããã§ããã³ãã³ãã«ã¯é »ç¹ã«ä½¿ããã®ãããã°ã使ããªããã®ããããåç·¨æããããã¨ã«ãªãã¾ããã v1.13ããè«çãªãã¸ã§ã¯ãåä½ã«ã³ãã³ããåç·¨æããã¾ãããããã¯ããä½ãï¼ã³ã³ãããã¤ã¡ã¼ã¸ããããã¯ã¼ã¯ï¼ãããã©ãããããï¼ä½æãä¸è¦§ãèµ·åãåæ¢ï¼ã§æ±ãã¾ãããã®ãããå¾æ¥ãããã³ãã³ãã®å©ç¨ç®çãåããããããªãã¾ãããã¨ãã°ãã³ã³ããã管çãã docker container ãµã
æéã究ãã! 2ã¤ã®ãµã¼ãéã§ç¹çããã¼ã¿ã30åéã§è»¢éããæ¹æ³ | ãµã¤ãã¼ã¨ã¼ã¸ã§ã³ã å ¬å¼ã¨ã³ã¸ãã¢ããã° ããã«ã¡ã¯. ã¨ã³ã¸ãã¢ã®å¹³éã§ã. ãµã ãã¯ãã©ã¤ãã¼ãã¯ã©ã¦ãã®ãµã¼ããã¼ãã¦ã§ã¢ã¨ã¹ãã¬ã¼ã¸ãæ å½ãã¦ãã¾ã. ãµã¼ãã®ãªãã¬ã¤ã¹ãå¢è¨, ä»®æ³ãµã¼ãã®ç§»æ¤ãªã©ã§ãã©ãã¤ãã¯ã©ã¹ã®ãã¼ã¿ã2ã¤ã®ãµã¼ãéã§è»¢éãããã¨ãããããã¾ã. ãããªã¨ã, 転éçµäºãå¾ ã¡ãªããããã¨ä½æéæããã®ããªã¼ãã¨ãããã£ã¨éã転éçµãããªãããªã¼ããªãã¦èãããã¨ã¯ããã¾ããã? ä»åã¯ä¸è¨ã®ãããªã·ã¼ã³ã§æ´»èºãã, ç¹çããã¼ã¿ã30åé«éã«è»¢éããæ¹æ³ããç´¹ä»ãã¾ã. - ãµã¼ãã®äº¤æã§ãã¼ã¿ã移è¨ããã - MySQLã¹ã¬ã¼ããµã¼ãã®å¢è¨ããã - ä»®æ³ãµã¼ããå¥ã®ãã¹ãã«ç§»æ¤ããã - 大éã®ãã¡ã¤ã«ãå¥ã®ãµã¼ãã«ç§»è¨ããã - 大容éãã¼ã¿ãããã¯ã¢ããããã â ç°å¢ãç¨
ããã¯ã¡ããã¨ãã§ãã¯ãã¦ãããªãã¨ãªãã Deprecated Linux networking commands and their replacements « Doug Vitale Tech Blog ==== ãã®è¨äºã§è©³ãã説æããéæ¨å¥¨ã®Linuxãããã¯ã¼ã¯ã³ãã³ãã¯ï¼arp, ifconfig, iptunnel, iwconfig, nameif, netstat, route ã§ãããiwconfig以å¤ã® ã³ãã³ãã¯ãnet-toolsããã±ã¼ã¸ã¨ãããæ°å¹´éã¡ã³ããã³ã¹ããã¦ããªãããã±ã¼ã¸ã«å«ã¾ãã¦ããããããã®ã¦ã¼ãã£ãªãã£ã«ãã£ã¦æä¾ãããæ©è½ã¯ãæ°ããipã³ãã³ãã主ã«ä½¿ãiproute2 ã¹ã¤ã¼ãã§åæä¾ãããæ¹åããç¶ãã¦ãããiproute2ã½ããã¦ã§ã¢ã®ã³ã¼ãã¨ããã¥ã¡ã³ãã¯ãKernel.orgã¨Linux Foundationã§è¦ããã¨ãã§ã
æè¿ã®ã³ã³ãã¥ã¼ã¿ã ã¨CPUã®ã³ã¢æ°ãã¹ã¬ããæ°ãå¤ãã®ã§/proc/cpuinfoãç´æ¥èªãããã¾ã¨ãã¦åºåãã¦ãããlscpuãhwlocãã¤ãã£ãã»ããããã æè¿ã³ã¢æ°ã¨ãå¤ãã§ããããã¹ã¯ãããã§ãCore i7ã ã¨8ã¹ã¬ããã¨ãããã¾ãããµã¼ãã ã¨4ã½ã±ãã40ã³ã¢80ã¹ã¬ããã¨ãããã¾ãã CPUãã©ãããæ§æãªã®ãç¥ãããæ㯠/proc/cpuinfo ã /sys/devices/system/cpu/* ãèªããã¨ãå¤ãã§ãã表示ãåé·ãªã®ã§ã¤ããã§ããããã§é©å½ã«ã¾ã¨ãã¦è¡¨ç¤ºãã¦ãããã³ãã³ãã便å©ã§ãã lscpuã¯CPUã®ãã£ãã·ã¥æ§æã¨ããã½ã±ãã-ã³ã¢-ã¹ã¬ããã®åæ°ã®é¢ä¿ããããã¾ããå®æ©ã§æ°åå®è¡ããã¨ãããã¾ããCPU MHzã®ã¨ããã¯å®éã®å¨æ³¢æ°ã«ãããã¦ã¡ããã¡ããå¤ããã®ã§ã¢ãã«ãªãã¾ããã åºåã¯ãããªããã: $ lscpu Archite
ããã«ã¡ã¯ãæè¤ã§ãã ITã¤ã³ãã©ã®é害ã¯ãå¤ãã®å ´åãäºæãã¬ãã¿ã¤ãã³ã°ã§çºçãã¾ããç¹ã«ãCPUãªã½ã¼ã¹ãå¤éã«æ¶è²»ããããDisk I/Oã輻輳ãã¦ããå ´åããã®åãåãã¯å°é£ãªç¶æ³ã«é¥ãããããã®ã§ãã ããã§ãæ¬æ¥ã¯ITã¤ã³ãã©ãç¹ã«OSã»ããã«ã¦ã§ã¢ãæ¯ããã«ããã£ã¦ãåé¡è§£æ±ºãå©ãã¦ãããã§ããã12åã®ã³ãã³ããåãä¸ãã¦ã¿ã¾ãããå¿ ãæ¼ããã¦ããããã5ã¤ã®ãã®ã¨ãæ´ã«è¦ããã¨ä¾¿å©ãªã³ãã³ãã7ã¤ã®2ç¯ã«åãã¦ã話ããã¾ãã â»CentOS 6.4 (64bit)ãåæã«åãä¸ãã¾ã å¿ ãæ¼ããã¦ããããã³ãã³ã ããITã¤ã³ãã©ç®¡çè ã«ãªããã¦ãªæ¹ã¯ãã² ãµã¼ããµã¤ãã®ããã°ã©ãããã£ã¦ããã®ã ããã©ãããæ¥çªç¶ãåããµã¼ã管çæ å½ãï¼ãã¨ãããã³ã渡ãããæ¹ã£ã¦ããã£ãããã¨æãã¾ããç§ã以åã¯ãã®ã¯ãã§ãã...ããããªã£ã¦ãã¾ã£ãã¨ããã¾ãã¯è¦ãã¦ãããã5ã¤
GWãå§ã¾ãã¾ããããéåã®GWã¯è¦³å 客å¤ããã¦éã«ä½æ°ã¯ãããªããã¦å¤ã«åºãªããªãæãã§ããã¨ã¯ããè·¯å°ã¾ã§è¦³å 客ãæ»ãè¾¼ãã§ãããã¨ã¯å°ãªãã®ã§ãè·¯å°ãæ£æ©ããåã«ã¯å¤©æ°ãããã¦ããæãã§ãããã¡ãªã¿ã«äººåè»ã®ãã«ã¼ããã¯ããããå³ã®ããè·¯å°ãç¥ãå°½ããã¦ããã®ã§äººåè»ã§ç§»åããã®ã¯ãããããªã¹ã¹ã¡ã§ã(ã¼ãã¯ä¹ã£ããã¨ãªããã©ããããªã¨ãããéããã !ãã£ã¦ã¨ããã§è¦ãããããã¾ã)ã ãã¦ãjqã¨ããã³ãã³ãããåãã§ããããã jq jq is a lightweight and flexible command-line JSON processor. ã¨æ¸ãã¦ããã¨ãããã³ãã³ãã©ã¤ã³ã§JSONãæ±ããã¨ãã§ããã³ãã³ãã§ããã§ãä»ã¾ãã«ä»äºã§å·¨å¤§JSONã¨æ¦ããã¨ãå¤ãããã®ã³ãã³ãã大活èºã§ãã ã¨ã¯ãããã¼ãã®ä½¿ãæ¹ã¨ãã¦ã¯ã巨大JSONããã¬ã¤ã«æ´å½¢ãã¦è¡¨ç¤ºãããã¨ã
ä¸ã®ä¸ã¯Googleãªã¼ãã¼ã§çãä¸ãã£ã¦ãä¸ãLivedoor Readerã«ç§»è¡ãã@HIROCASTERã§ãããã¾ããã ãããªãªããã²ã£ãã㨠git 1.8.2 ããªãªã¼ã¹ããã¾ããã ãªãªã¼ã¹ãã¼ããçºãã¦ãããç¥ããªãæ©è½ããã£ãã®ã§æ¸ãã¦ããã¾ãã git check-ignore * âgit check-ignoreâ command to help debugging .gitignore files has been added. 1.8.2ããã®æ°æ©è½ã§ãã .gitignore ãã¡ã¤ã«ã«è¨è¿°ããã¦ãå 容ã¨å®éã®ãã¡ã¤ã«ã該å½ããããã§ãã¯ã§ãã¾ãã ä¾ãã° .gitignore ãã¡ã¤ã«ã« /tmp ã¨æ¸ããã¨ãã¾ãã $ git check-ignore -v ./tmp .gitignore:1:/tmp ./tmp ã®ããã«1è¡ç®ã®è¨å®ã«è©²å½ãã¦ãexc
jinfoã¨ããJDKã«ä»å±ãã¦ããã³ãã³ãã©ã¤ã³ãã¼ã«ã使ç¨ããã¨ãJavaã®èµ·åãªãã·ã§ã³ãã·ã¹ãã ããããã£ã確èªã§ããããã-XXãã§ã¯ãã¾ãä¸é¨ã®å¤ã«ã¤ãã¦ã¯å®è¡ä¸ã«å¤æ´ã§ããããã§ãã 詳ãã説æã¯ä»¥ä¸ã«æ¸ãã¦ããã¾ãããjstackãjmapãªã©ã¨åæ§ã使ç¨ããã«ã¯å¯¾è±¡ã®JavaVMã®PIDãå¿ è¦ã§ãã http://java.sun.com/javase/ja/6/docs/ja/technotes/tools/share/jinfo.html ä¾ãã°ã以ä¸ã®ãããªã¡ãã£ã¨ããã¨ããããªãã·ã§ã³æå®ã§Javaã¢ããªãèµ·åãã¾ãã $ java -Xmx512M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=2 -XX:+PrintGCTimeStamps -XX:+PrintGC -XX:+Pr
ä½å調ã¹ã¦ãå¿ãã¦ãã¾ãã·ãªã¼ãº ä»åã¯mtraceã®ä½¿ãæ¹ã mtraceã¨ããã®ã¯mallocãfreeãªã©ã®ã¡ã¢ãªç®¡çç³»ã®é¢æ°ãHookãã¦ãã¡ã¢ãªãªã¼ã¯ã追跡ãã¦ããã便å©ãªã©ã¤ãã©ãªé¢æ°ã§ãã glibcä»å±ãªã®ã§ç¹æ®ãªã½ããã®ã¤ã³ã¹ãã¼ã«ãå¿ è¦ãªãã®ãå©ç¹ã 使ãæ¹ã®æ³¨æç¹ã¨æ㯠Electric Fence ãªã©ã®mallocãä¹ã£åãã©ã¤ãã©ãªã¨å ±ç¨ã§ããªããã¨ï¼ã¢ã¿ãªãã¨ã ï¼ malloc/freeã®ãã³ã«ãã¡ã¤ã«ã«æ¸ãã®ã§çµæ§ãªãªã¼ãã¼ããããä¼´ããã¨ã ã¹ã¬ããã»ã¼ããããªããã¨ï¼ããã¯mallocã®hookã®ä»çµã¿ãã¿ã³ããã§ãï¼ mtrace()é¢æ°ãå¼ã³åºãã¨ãã¬ã¼ã¹ãéå§ãããã¨ããã»ãã³ãã£ã¯ã¹ãªã®ã§ã·ã§ã«ãªã©ããã¤ãã¤ã使ãã¥ããæãæ¬ ç¹ã¨è¨ããã ã¾ããå®ä¾ãè¦ã¦ãã ããã ã¾ãããããããã¡ã¤ã«ãç¨æ mtrace_on.c ---- #include
Linuxã§ãããã¯ã¼ã¯ã®å¸¯åå¶éããããæ¹æ³ã§ãã ä¾ãã°ãç´1Mbpsã«å¶éãã¦ã¿ã¾ãã 帯åã1Mbpsã«å¶é # tc qdisc add dev eth0 root tbf limit 15Kb buffer 10Kb/8 rate 120Kbps ç¶æ ãç¢ºèª # tc -s qdisc qdisc tbf 800d: dev eth0 rate 960000bit burst 10Kb lat 42.7ms Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) å¶éãè§£é¤ # tc qdisc del dev eth0 root ã¡ãªã¿ã«1Mbpsã«å¶éãã¦ããã®ã«ãã120Kbpsãã¨ãã¦ããã®ã¯ãè¨å®ããå¤ããããã§ã¯ãªããã¤ãã§è¨å®ããããããªã®ã§ãè¨å®ãããå¤ã8ã§å²ã£ãå¤ã§è¨å®ããã¨ç®çã®å¤ã«è¨å®ã§ããè¦ããã§
ã¯ããã« â gitã®å人çã«ãã使ããããªã³ãã³ããã¾ã¨ãã¦ã¿ã¾ãããèªåç¨ãã¼ãã·ã¼ãã§ãã ãã使ãã³ãã³ã㯠../ã³ãã³ãã®çç¥(alias)è¨å®ãããæ¹æ³ã«ã¦çç¥å½¢ãä½ã£ã¦ããã¨ä¾¿å©ã§ãã åã³ãã³ãã®è©³ç´°ã¯ git (ã³ãã³ãå) --help ããã¨è¨è¼ãããã®ã§ããè¦ã¦ããã£ããæ©ãã¨æããã¾ãã â åæ â å¤æ´ãããã¡ã¤ã«ãã³ãããããã¨ãã¯ã [ãã¼ã«ã«]â(addã³ãã³ããã)â[ã¤ã³ããã¯ã¹ã«å ¥ã]â(commitã³ãã³ã)â[ãªãã¸ããªã«å ¥ã] ã¨ããç¶æ ã®æ¨ç§»ã«æ³¨æãã¦ä¸ããã gitã§ã¯ãã³ãããããããã®ãaddããã¨ä¸æ¦ã¤ã³ããã¯ã¹ã«å ¥ãã®ã§ã次ã«ã¤ã³ããã¯ã¹ã«å ¥ãããã®ãcommitã§ãªãã¸ããªã«ã³ããããããã¨ç§ã¯ç解ããã¾ããããæ¬æ¥ã®ç¨éã¨ã¯å¥ãããããªãã§ãã â»TODO: æ¦å¿µã®èæ¯ãå¾ã§èª¿ã¹ã â»Subversionããã«ãaddã§ãã¡
ã·ã§ã«ããã§ãéãå¦çã¨ããã®ã¯ã¡ããã¡ãããã£ã¦ãä¾ãã°è¶ ãã«ããã°ãã¡ã¤ã«ã移åãã¦å§ç¸®ãããã¨ãããä»äºã¯ä¸çä¸ã®ããããå ´æã§æ¯æ¥è¡ããã¦ããããããã³ãã³ãã©ã¤ã³ããã§ã大éã®å§ç¸®æ¸ã¿ãã°ãã¡ã¤ã«ããã£ãºãã«å±éããããã¨ãã ãããã£ã¬ã¯ããªä»¥ä¸ã«åå¨ããããããã®ãã¡ã¤ã«ã(å§ç¸®æ¸ã¿ã®ãã®ãé¤ãã¦)å ¨é¨ bzip2 å§ç¸®ãããï¼ã¨æã£ãããã¨ããããããã£ã¨æ¬¡ã®ããã«ã³ãã³ãã©ã¤ã³ã§å©ãã°ããã $ find . -not -name '*.bz2' | xargs bzip2 ããã§ãã¾ããããªã«åé¡ãªãå¹ççã«bzip2å§ç¸®ãã§ãããã ããããã æè¿ã¯è¤æ°ã³ã¢ã®CPUãæ®éã«è»¢ãã£ã¦ããããã¾ã¤ããHyperThreadingãæå¹ã«ãªã£ã¦ãããã¦OSããè¦ããè«çCPUæ°ããã³ããªããæ®éã«8ã¨ãããããã®ä¸æ¹ã§è¤æ°ã³ã¢ã使ç¨ãã¦ãããã³ãã³ãã¨ããã®ã¯ããã¾ããªãã¦
çããä»æ¥ãããããã®ãµã¼ããç¸æã«ããã¦ãããã¨ãã¨æãã¾ãããããã¤ãã®ãµã¼ãã«ã¢ã¯ã»ã¹ã㦠1 ç§éã®çµ±è¨æ å ±(ä¾ãã°vmstat 1 2)ãéãã¦ããã¨è¡¨ç¤ºãããæã£ã¦ã©ããã£ã¦ã¾ãããï¼shell script ãå¦ã³ã¯ãããã°ã£ããã®åã¯ãããªæãã§æ¸ãã¦ã¾ããã $ for i in host1 host2 host3; do ssh $i "vmstat 1 2 | tail -1"; done 0 0 0 329004 210836 14275360 0 0 0 2424 1410 1828 0 0 100 0 0 0 0 0 3716112 587704 25921684 0 0 0 488 1643 2026 0 0 100 0 0 1 0 0 555440 265560 14015548 0 0 0 4204 1534 2392 1 0 99 0 0 vmstatã¨
seqã³ãã³ãã¯ãæ°å¤ãè¦åçã«å¢å /æ¸å°ãããã³ãã³ãã $ seq 1 5 1 2 3 4 5åç´ã«å¢å ããããããã $ seq 10 -2 0 10 8 6 4 2 0å¢æ¸å¹ ãæå®ãã¦æ¸å°ããããã ãããªseqã³ãã³ãã«ãªãã·ã§ã³ããããã¨ãç¥ãã¾ããã "-s" åºåãæåãæå®ãã "-s"ãªãã·ã§ã³ã使ãã¨åºåãæåãæå®ã§ããã $ seq -s , 1 5 1,2,3,4,5ä¾ãã°ãã«ã³ãåºåãã«ãããå ´åã¯âã®ãããªæãã ã¡ãªã¿ã«ä½è«ã§ããããã $ seq 1 5 | paste -s -d , 1,2,3,4,5ãã®ãªãã·ã§ã³ã使ããªãã¦ããpasteã³ãã³ããä½µç¨ããã°å®ç¾ã§ããªãããªãã "-w" æ¡æ°ãæãã¦è¡¨ç¤º "-w"ãªãã·ã§ã³ã¯ãæ°åã®æ¡æ°ãæããããã«ãé ãã¼ã(0)ã§åãã¦è¡¨ç¤ºãã¦ãããã $ seq -w 0 10 100 000 010 02
perl ã§è²ã 管çã¹ã¯ãªããæ¸ãã¦ããã§ããããã®ãªãã§ãããªã³ã¼ããæ¸ãã¾ããã system("ssh remote 'rsync ...'"); ã§ãrsyncãèµ°ã£ã¦ãéä¸ã§ãã£ã±ãããã¨æã£ã¦Ctrl+C=SIGINTãéã£ããã§ããããã¡ãã perl ã®ããã»ã¹ã¯æ»ã¬ãã§ããã©ãremoteã§åãã¦ãrsyncã¯ãã®ã¾ã¾ã¾ã³ãã«ãªã£ã¦æ®ã£ã¦ãã¾ãã¾ããã ã¯ã¦ãããããªã¨ããã«åå ãèãããããªãã¨ãããã¨ã§èª¿ã¹ã¦ã¿ã¾ããã host1> ssh host2 'some-command' host2> strace -p 20279 # some-command's pid Process 20279 attached - interrupt to quit read(0, # then "Ctrl+C" on host1 (host2) "", 4096) = 0 wri
ãã¨ãã°ä»¥ä¸ã®ããã« A ã¨ãããµã¼ãã¼ããã°ã¤ã³ããªããã°å°éã§ããªã B ã¨ãããµã¼ãã¼ããã£ãã¨ã local --> hostA --> hostB äºåã«åãã¦å ¥åããã®ãé¢åãããã local$ ssh user@hostA # Aã«ãã°ã¤ã³æå hostA$ ssh user@hostB # ãã£ã¨Bã«å°éãé¢å!! hostB$ ãããªã¨ãã«ã以ä¸ã®æ§æãæãåºããã¨ã ããã ssh user@host ãªã¢ã¼ãã§å®è¡ãããã³ãã³ã ãªã¢ã¼ãã§å®è¡ãããã³ãã³ã㧠"ssh user@hostB" ã£ã¦ãã£ããããããããªãã㨠æãã¤ãã§ãã£ã¦ãã¾ãã¨ã以ä¸ã®ããã«ã¨ã©ã¼ã«ãªãã $ ssh user@hostA "ssh user@hostB" Pseudo-terminal will not be allocated because stdin is not a t
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}