CPUãã¡ã¢ãªãIOã¨ãã£ããªã½ã¼ã¹ã®å¶éä¸ã§ã¨ããã³ãã³ããå®è¡ããããå ´åã«ãcgroupä¸ã«ä½ãgroupãä½ã£ãããã¦ããcgexecãå®è¡ãã¦ãå®è¡å¾ã¯ãã®groupãæ¶ããã¨ãã£ããããªä¸æéãããæ¹æ³ãã»ã¨ãã©ã§ããã å®è¡å¾ã®groupã綺éºã«ããããã¨ãã£ãæã¾ã§èããã¨ãªããªãæéãããã£ã¦ããã®ã§ãããããå ¨ã¦ã¯ã³ã©ã¤ã³ã§ã§ããrconã¨ããã¯ã³ãã¤ããªã§åããã¼ã«ãä½ãã¾ããã github.com ä¾ãã°ãè² è·ãµã¼ãã§ã®èª¿æ»ãã¼ã«ãæµãéã«ãCPUã¨ãIOã¨ããå¶éãã¤ã¤ããããå®è¡ãããå ´åçã«ä¾¿å©ã§ããLinuxã®cgroup対å¿ããç°å¢ã§ã®ã¿åãã¾ãã 使ãæ¹ ã»ã¼READMEéããªã®ã§ããããªãã·ã§ã³ã¯ä»£æ¿ä»¥ä¸ã®ããã«ãªã£ã¦ãã¾ãã --memã¯å¤ãªã®ã§--memoryã«å¤æ´ãã¾ãã!! ./rcon --help Usage: rcon [options
ãµã¼ãã®åä½ã«ç°å¸¸ãçºçããéã«åå ãæ¢ãããã®Linuxã³ãã³ãã§ãèªåç¨ã®ã¡ã¢ã§ãã å ¨ã¦manã¨ãã°ã°ã£ããåºã¦ããã®ã§èª¬æã¯é©å½ã§ããæãã¤ãããå¾ã§è¿½è¨ãã¦ããããã§ãã 対象ã¯Debian Squeezeã«ãªãã¾ãã å ¨ã¦ããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«ã§ãããã®ã§ãããã±ã¼ã¸å㯠[in packagename] ã¨ãã¦ããã¾ãã åæããã³ã¡ã³ããããã¨ããããã¾ãã è¯ãæ°ãªã³ãã³ãã¯è¿½è¨ãã¦ããã¾ãã ï¼è¿½å ããã³ãã³ãï¼ * telnet (+ã³ã¡ã³ã wget, netcat) * arp (+ã³ã¡ã³ã arpwatch) * pstree * fdisk ã³ã¡ã³ãã« gdisk * host, dig * watch * reboot
ã¨ã³ã¸ãã¢ã¨ããè·æ¥æãã·ã§ã«ã¹ã¯ãªãããæ¸ããã¨ã¯ã¡ããã¡ããããã®ã§ãããèªåãªãã«æ°ãä»ãã¦ãããã¨ãåå¿é²ï¼èªåã¸ã®æããå«ãã¦ãç°¡åã«æ¸ãã¦ã¿ããã¨æãã¾ãã å¤æ°ã¯å¤§æå ã·ã§ã«ã¹ã¯ãªããæ¸ãã¦ããã°å¤æ°ã®åºçªã¯è³ãã¨ããã§ããã§ãããããã®éãå¯èªæ§ãå¢ãããã«ãå¤æ°ã¯å¤§æåã使ã£ã¦ãã¾ãã RET=`cmd1`ã¿ããã«ã好ã¿ã®åé¡ãããã§ãããããåãããããã®ã§ã ã¯ãªãã¼ã·ã§ã³ã¯é¸ã¶ ã¯ãªãã¼ã·ã§ã³ã«ã¯ã·ã³ã°ã«ã ã£ãããããã«ã ã£ããè²ã ããã¾ããã使ãåãã¦ãããã»ããããã§ãããã å¤æ°ã®å±éããªãããã§ããã°ãã·ã³ã°ã«ã¯ãªã¼ãã¼ã·ã§ã³ã®ã»ããã¹ãã¼ãã§ãããããå±éãããã®ãªãããã«ã¯ãªã¼ãã¼ã·ã§ã³ã使ãã°ã¨ã ããã«ã¯ãªã¼ãã¼ã·ã§ã³ã使ãã®ã«ãæå³ããã£ã¦ãå¤æ°ã¯ã$RETãã®ããã«ã¯ãªãã¼ã·ã§ã³ã§å²ã¾ãªãã¦ãåä½ã¯ããã¦ãããã®ã§ããã echo "${RET
shell ã®ã¡ãã£ã¨ãããã¯ãã㯠- odz buffer odzããã®ã¨ããã§åèªã®åºç¾é »åº¦ã調ã¹ãããã®ã¯ã³ã©ã¤ãã¼ãç´¹ä»ããã¦ããã åèªæ½åºã«ã¤ãã¦ã¯ããã¤ãããæ¹ãããã®ã§ç´¹ä»ããã ç¹ã« egrep -o ã¯é常ã«å®ç¨çã ãã¡ããããã®è©±ã¯ãªã³ã¯å ã«ããã¦ä¸»é¡ã§ã¯ãªãã 俺ã®ãã ã®èªå·±æºè¶³ã tr -cs ã§åèªæ½åº $ tr -cs 'a-zA-Z' '\n' < ./.zshrc ä¸è¨ã³ãã³ãã§ãa-zA-Zã®ã¿ã§æ§æãããæååãæ½åºã§ããã -c ãªãã·ã§ã³ã§ã'a-zA-Z' ã®è£éå(以å¤)ã '\n' ã«å¤æãã -s ãªãã·ã§ã³ã§ãæå¾ã®å¼æ°ã§æå®ãããè¦ç´ ã®éè¤ãé¤å»ãã¦ãããããªãã¡ '\n' ã®é£ç¶ãé¤å»ãã¦ããã grep -o ã§åèªæ½åº grepã«ã¯ã( -oã--only-matching ) ãªãã·ã§ã³ã¨ããã®ãããã ããã¯ãæå®ãããæ£
Memè¡ã®freeï¼MemFreeã¨å¼ã¶ãã¨ã«ãã¾ãï¼ã¯ã空ãã¡ã¢ãªéãã§ã¯ãªããä½ã®ç¨éã«ã使ã£ã¦ããªãç©çã¡ã¢ãªéã¨èãã¦ãã ããããMemFreeãå°ãªãâ空ãç©çã¡ã¢ãªéãå°ãªãâå©ç¨å¯è½ãªç©çã¡ã¢ãªéã足ããªããã¨ããçºæ³ãé²ãããã§ãããã®å ´åãåç´ã«ç©çã¡ã¢ãªã追å ãã¦ãããã¤ãã¯MemFreeãå°ãªãç¶æ³ã«è½ã¡ã¦ããããã解決ã«ã¯ãªãã¾ããã ã·ã¹ãã å ¨ä½ã®ã¡ã¢ãªå©ç¨éã®ç£è¦ã¯ãfreeã®ã¿ãå¤æåºæºã¨ããã®ã§ã¯ãªãããã£ã¨ç·åçã«ãå©ç¨å¯è½ãªç©çã¡ã¢ãªéããè¨ç®ããå¿ è¦ãããã¾ãã ã·ã¹ãã ãå©ç¨å¯è½ãªã¡ã¢ãªéãè¨ç®ããã«ã¯ãLinuxã®ãã¼ã¸ãã£ãã·ã¥ã®æ±ããç解ããå¿ è¦ãããã¾ããLinuxã¯HDDãªã©ã®ã¹ãã¬ã¼ã¸ã«ä¿åãã¦ãããã¼ã¿ã®èªã¿åºãï¼æ¸ãåºãæã«ç¢ºä¿ããã¡ã¢ãªããã¼ã¸ãã£ãã·ã¥ã¨ããå½¢ã§ä¿æãã¾ãã CPU ã¯ã¹ãã¬ã¼ã¸ã®ãã¼ã¿ãç´æ¥èªããã¨ã¯ã§ãã¾ããã
ããã£ãã®ã§ã¡ã¢ã Linuxã§ãªã½ã¼ã¹å¶éããããã®ä»çµã¿ã®ulimitãããã¾ããããã®1é ç®ã«ãnprocããããã¾ãã ããã¯ãã®ã¦ã¼ã¶ã§å®è¡ã§ããããã»ã¹ï¼ã¹ã¬ããï¼æ°ã®å¶éã¨ãªãã¾ãã ããããCentOS5ã¾ã§ã¯ã $ ulimit -u unlimitedã®ããã«ç¡å¶éã ã£ãã®ã§ãããCentOS6ã«ãªã£ã¦ä»¥ä¸ã®ããã«1024ã§å¶éããããããã«ãªãã¾ããã $ ulimit -u 1024ãã®ããããã¼ã¢ã³ã¨ãã§é«è² è·ãªå¦çãããã¦ããã»ã¹ï¼ã¹ã¬ããï¼ãå¢ããã¨å¦çãè½ã¡ã¦ãã¾ãã®ã§ãã æ²ãããã©ããã£ã¦ããã©ã«ãå¤ãªã®ããã è¨å®ç®æã¯ï¼ å®éã®è¨å®ã¯ã[/etc/security/limits.d/90-nproc.conf]ã§ããã¦ãã¾ãã # cat /etc/security/limits.d/90-nproc.conf # Default limit for
ãªã¯ã«ã¼ãã®ä¸å¤è»æ å ±ãµã¤ããã«ã¼ã»ã³ãµã¼netããå ¨é¢ãªãã¥ã¼ã¢ã«ããä½é¨ãåºã«ã大è¦æ¨¡ãµã¤ãã®æ§è½æ¹åä½æ¥ã®å®æ ãã¬ãã¼ãããã第1åã第2åã§è¡ã£ãNFSã¨Apacheã®è¨å®å¤æ´ãPHPã¢ããªã±ã¼ã·ã§ã³ã®è¦ç´ãã«ãã£ã¦ãæ§è½ã¯åçã«åä¸ãããããããã®å¾ãã©ããã¦ãæ§è½ã伸ã³ãªãã第3åã§ã®èª¿æ»ã§ãLinuxã«ã¼ãã«ã«åå ãããããããã¨ãããã£ã¦ããã ã«ã¼ãã«ã½ã¼ã¹ããããã£ã¬ã¯ããªã¼ã«ç§»åãã¦ãå¤æ°åï¼kernel_semï¼ãå«ããã¡ã¤ã«ã調ã¹ããããã¨ãlib/kernel_lock.cãã¨ãããã¡ã¤ã«ã®ä¸ã§ãkernel_semããå®ç¾©ããã¦ãããåé ãèªãã¨ããThis is the traditional BKL - big kernel lockãã¨ãããç´è¨³ããã°ã巨大ãªã«ã¼ãã«ããã¯ããããã¯ä½ãªã®ã ããããã³ã¡ã³ãã追ã£ã¦ããã¨ããå¤ãæ¹å¼ãã§ãããæ°ããã³ã¼ã
1. 2011/07/10 Version 1.2 ãªã¼ãã³ã¯ã©ã¦ãã»ãã£ã³ãã¹ LXCã§å§ããã±ãã±ãä»®æ³åçæ´»ï¼ï¼ ï½Hadoop on LXCã«ãã£ã¬ã³ã¸ï¼ ä¸äºæ¦å¸ Twitter @enakai00 2. LXCã§å§ããã±ãã±ãä»®æ³åçæ´»ï¼ï¼ èªå·±ç´¹ä» ï§ ä¸äºæ¦å¸ï¼ãªãããã¤ãï¼ â Twitter @enakai00 ï§ æ¥ã ã®ä»äº â Senior Solution Architect and Cloud Evangelist at Red Hat K.K. ä¼æ¥ã·ã¹ãã ã§ãªã¼ãã³ã½ã¼ã¹ã®æ´»ç¨ãå¸æããã ã客æ§ãå ¨åã§ãæ¯æ´ããã¦ããã ãã¾ãã 好è©çºå£²ä¸ ï§ æã¨ã£ãæµæ â ç´ ç²åè«ã®ç 究ï¼è¶ 弦çè«ã¨ãï¼ â äºåæ ¡è¬å¸«ï¼ç©çæ å½ï¼ â ã¤ã³ãã©ã¨ã³ã¸ãã¢ï¼Unix/Linuxå°éï¼ 2 Open Cloud Campus
Landscape ããããã¼ã¸ | < åã®æ¥ 2004-05-07 2004-05-08 次ã®æ¥ 2004-05-09 > Landscape - ã¨ã³ã¸ãã¢ã®ã¡ã¢Â 2004-05-08 lftp ã使ã£ã ftp ãã©ã¼ãªã³ã°ã¨ä¾¿å©æ©è½ å½ãµã¤ãå ã Google æ¤ç´¢ã§ãã¾ã * lftp ã使ã£ã ftp ãã©ã¼ãªã³ã°ã¨ä¾¿å©æ©è½ãã®è¨äºã®ç´ãªã³ã¯URL: Permlink | ãã®è¨äºãå±ããã«ãã´ãª: [ftp] [unix] lftp ã¯é«æ©è½ãª ftp ã¯ã©ã¤ã¢ã³ãã - lftp ãªãã£ã·ã£ã«ãµã¤ãLFTP - reliable ftp client http://lftp.yar.ru/ ãªãã£ã·ã£ã«ãµã¤ãã® Feature list 㨠Man page ãèªãã°ãftp é¢é£ã§ããããã¨æããã¨ã¯ lftp ã§ããã¦ãå®ç¾ã§ãããã¨ããããã Feature lis
cles::blog 平常å¿æ¯é blogs: cles::blog NP_cles() « ã³ããã ãã§ã¬ãã¼ããä½ããã :: AWS ã Memcached äºæã® Amazon ElastiCache ããª... » 2011/08/24 ãã¤ãã§ã¤ãªãã ã³ãã³ãã®çµäºã¹ãã¼ã¿ã¹ãã¨ã sh 483 1ã¸ã ãã¤ãã§ã¤ãªãã ã³ãã³ãã®çµäºã¹ãã¼ã¿ã¹ãã¨ãæ¹æ³ãåãã£ãã®ã§ã¡ã¢ã æ®éã¯ãã¾ã使ããªããã¯ããã¯ã§ãããã·ã§ã«ã¹ã¯ãªãããçµãã¨ãã«ãã¤ãã®ååé¨åã®çµäºã³ã¼ããå¿ è¦ã«ãªããã¨ãããã¾ãã $ hogecmd | tee -a hoge.txt ä¾ãã°ä¸è¨ã®ãããªã³ãã³ãã®ç´å¾ã«$?ã§çµäºã¹ãã¼ã¿ã¹ãåå¾ããã¨ãhogecmd ã§ã¯ãªããtee -a hoge.txt ã®é¨åã®çµäºã¹ãã¼ã¿ã¹ã«ãªã£ã¦ãã¾ã£ã¦ãã·ã§ã«ã¹ã¯ãªããã§æ¡ä»¶åå²ãæ¸ãã¨ãã«å°ãã®ã§ãããã®å¶ç´ãçª
éåä¹ ã ã® Linux ãã¿ã§ãã以åã«ãã¼ãã¢ãã¬ã¼ã¸ã«é¢ããèå¯ãªã©ã®è¨äºãæ¸ãã¾ããããå¤ãã®ãµã¼ãã¼ãµã¤ãã¨ã³ã¸ãã¢ã¯ãµã¼ãè² è·ã¨æ¥ã æ¦ã£ã¦ãããã¨ãã¨æãã¾ããéå»å¤ãã®å ´åãè² è·ã®åå ç¹å®ã¯ããããä¸è¨ã®ãããªæé ã§åæããã¦ãããã¨ãã¨æãã¾ããâ»è©³ããæé ã¯å¥ã¨ã³ããªã¨ãã¦è¨è¼äºå®ã top ãã¿ã¦ä¸ä½ã«å¼µãä»ãã¦ããããã»ã¹ã確èªãã¤ã¤ CPU or I/O ã®ã©ã¡ããåå ãå¤å¥ ps ã使ã£ã¦ããã»ã¹ã®ç¶æ ã確èªãã¦(T),(D)ã®ç¶æ ãã CPU or I/O ã®ã©ã¡ããåå ãå¤å¥ vmstat 㧠procs ã® r, b ã®æ°ãswap ã® si, so ã®ç¶æ ãI/O ã® bi, bo ã®ç¶æ ãç¢ºèª iostat ã使ã£ã¦ disk ã® read/write ã®ç¶æ ãããã«è©³ããç¢ºèª sar ã使ã£ã¦ os ã®ç¶æ ãããã«è©³ããç¢ºèª ããããã®åå ç¹å®ããè¨å®ã
çããä»æ¥ãããããã®ãµã¼ããç¸æã«ããã¦ãããã¨ãã¨æãã¾ãããããã¤ãã®ãµã¼ãã«ã¢ã¯ã»ã¹ã㦠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ã¨
Amazon EC2 ã¯VMã好ããªã¿ã¤ãã³ã°ã§å¥½ããªã ã使ããã¨ãã§ããã®ã§ãè¤æ°ã®ãµã¼ãã使ãåæ£ã·ã¹ãã ã®æ¤è¨¼ç°å¢ã¨ãã¦é常ã«ä½¿ãããã*1ãè²»ç¨ãè¨ç®ãã¦ã¿ã¦ããèªå® ã§ã¯ã©ã¹ã¿ãåãããã¨ãèããã°ãååå®ãä¸ããããã§ããã ããããVMãèµ·åãããã³ã«ç°å¢ãè¨å®ããããæ°ãããã¹ããå®è¡ãããã³ã«ãã¡ã¤ã«ãé ã£ããããã®ã¯é¢åãªã®ã§ããã¡ã¤ã«ãå ±æããããªãã éä¿¡ã®é 延ãããªã大ããã®ã§ãEC2ä¸ã§sshè¶ãã«ãã¡ã¤ã«ãç·¨éããã®ãå°ã ã¤ããã ããã§ãæå ã®ãã¹ãã¨ãã¼ã ãã£ã¬ã¯ããªãå ±æãããããã«ãä¸åº¦è»¢éãããã¼ã¿ã¯ãã£ãã·ã¥ãããã å ±æãã¼ã ãã£ã¬ã¯ããªç°å¢ã®ç®¡çæ¹æ³ã¨çµã¿åãããã°ã便å©ã«ä½¿ããã«éããªãã æ¦ç¥ ãã¡ã¤ã«å ±æã«ã¯ NFSv4 over ssh ã使ããNFSv4ã¯ãã¼ãçªå·ãï¼ã¤ãã使ããªãï¼portmapperãè¦ããªãï¼ã®ã§ãsshè¶ãã§ä½¿
Linuxçã§ããã¡ã¤ã«ã®ç¹å®ã®è¡ã«ãããæååãæ¿å ¥(追å )ãããæã®ã³ãã³ã(sed)ãµã³ãã«ãåå¿é²çã«ã åæ ãããªãã¡ã¤ã«ãããã¾ãã $ cat test.txt line1 line2 line3 2è¡ç®ã«æ¿å ¥ $ sed -e "2i hoge" test.txt line1 hoge line2 line3 2è¡ç®ç´ä¸ã«æ¿å ¥ $ sed -e "2a hoge" test.txt line1 line2 hoge line3 "line2"ã®è¡åã«æ¿å ¥ â»ãã®è¾ºã®æ£è¦è¡¨ç¾ã¯ãè¦ä»¶ã«å¿ãã¦é©å½ã«å¤ãã¦ã¼ã $ sed -e "/^line2$/i hoge" test.txt line1 hoge line2 line3 "line2"ã®è¡å¾ã«æ¿å ¥ $ sed -e "/^line2$/a hoge" test.txt line1 line2 hoge line3 sed
移転ãã¾ãã http://please-sleep.cou929.nu/20101230.html
ãã¼ã¢ã³å´ããããªæãã§æ¸ãã¾ãã use Errno qw(EEXIST); use Fcntl qw(S_IFIFO); use POSIX qw(mkfifo); my $FIFO_NAME = "/tmp/my_messenger.fifo"; if (mkfifo($FIFO_NAME, 0666)) { # ok } elsif ($! == EEXIST) { die "$FIFO_NAME is not a fifo!" unless +(stat($FIFO_NAME) & !S_IFIFO) != 0; } else { die "failed to create fifo:$FIFO_NAME, $!"; } while (1) { open my $fh, '<', $FIFO_NAME or die "failed to open fifo:$FIFO_NAME,
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}