以åhttp://tech.naver.jp/blog/?p=1369ã®è¨äºãèªãã ã®ã ããã©ãããã¾ã§ã«processã®ç¥èãç¡ãã£ãããã¦ãã¾ã£ããç解ã§ãã¾ããã§ãããããã§Working with UNIX ProcessesãServer::Starterã®ä¸èº«ãå¼ãã§ããããhot deployã®ä»çµã¿ãç解ã§ãã(æ°ã«ãªã£ã¦ãã)ã®ã§ãServer::Starterã®å®è£ ã追ããªããããããã¾ã¨ãã¦ã¿ã¾ãã hot deployã¨ã¯ hot deployã¨ã¯ãåèµ·åã®æã«ãªã¯ã¨ã¹ãã®å¦çãç¶ããªãããå¤æ´ã®å 容ãåæ ããããã®æ段ãã§ãã é常serverãrestartãããã¨ãã¯ãstop -> startã®æµãã«ãªãã¨æãã¾ããããã®å ´åstopãã¦ãããstartåºæ¥ãã¾ã§ã®æéã«ãªã¯ã¨ã¹ããå¦çã§ããªãæéãçºçãã¾ãããã®æéãªãã«deployããä»çµã¿ãhot
#ãã£ãã ãã®è¨äºãæ稿ãããã¨æã£ããã£ããã§ãããnginx+gnicorn+Djangoã§éçºãããæ©ä¼ãããã¾ãã¦ãéçºãçµç¤ã«ãããããããã©ã¼ãã³ã¹ãã§ãã¯ããã¦ããéã«åé¡ãèµ·ãã¾ããã abã³ãã³ãã§ãã³ããã¼ã¯ãåã£ã¦ãããã§ãããåè¨å®ã¯ #nginx worker_processes 2; events { worker_connections 1024; } #gunicorn bind = 'unix:/tmp/gunicorn.sock' backlog = 2048 workers = 2 worker_class = 'sync'
ãµâãçã«ä½¿ã£ã¦ããPC ã®ã¡ã¢ãªãååãã©ããæ°ã«ãªãäºã¯å¤ãã¨æã. 調ã¹åºã㨠ããªã¼ã¡ã¢ãªã¼ã®ä¸è¶³ã SWAP ã«ã¡ã¢ãªã¼ãã¯ã¿ã ãã¦ããæ§åãªã© å¿é ãªäºãããããã§ã¦æ¥ã. PC ã®åä½ãé ããªãåå ã¯æ§ã ãªè¦å ã絡ã¿åã£ã¦ããã®ã§, 表é¢ã«ç¾ããçç¶ã ãã§ã¯å¹æçãªå¯¾çãåãããªãäºããã. 以ä¸ã§ã¯, ã¡ã¢ãªâé¢é£ã«ãã¼ã£ã¦è§£èª¬ãã. ã¡ã¢ãªã®ç¶æ³ã調ã¹ã ã¡ã¢ãªâã¯ååãªã¯ããªã®ã« ä½è£ãç¡ãï¼ ã©ã®ããã»ã¹ãã¡ã¢ãªãæ¶è²»ãã¦ããã®ãï¼ ã¡ã¢ãªã¼ã®ãªã¼ã¯ãæ¤åºããæ¹æ³ï¼ é²æ¢ããæ¹æ³ï¼ ã¡ã¢ãªâã¯ååãªã¯ããªã®ã« SWAP ã使ã£ã¦ãï¼ ãã, æ¬å½ã®ã¡ã¢ãªâä¸è¶³ã¯ã©ããããåããã®ï¼ ã¡ã¢ãªã¼ã¨ SWAP é åã¯ã©ã®ããã確ä¿ããã¨è¯ãã®ã ã¡ã¢ãªã®ç¶æ³ã調ã¹ã ã¡ã¢ãªã®å©ç¨ç¶æ³ã調ã¹ãæ¹æ³ã¯, free, top, ps, vmstat, /proc/meminfo
åæ ã¿ã¼ããã«ãã«ããã¬ã¯ãµã¨ã¯ã GNU screen tmux ãªã©ã®ä»®æ³ç«¯æ«ããã¼ã¸ã£ã®ãã¨ã§ãã ã¡ãªãã ãã¦ã¹ã使ãã端æ«å ã§ã³ããã§ããï¼ã¹ã¯ãã¼ã«ããã¯ã§ç«¯æ«ç»é¢å¤ã«æµãã¦ãã¾ã£ãæ å ±ã«ã¢ã¯ã»ã¹ã§ããï¼ ã¢ã¿ããã»ãã¿ããæ©è½ã§ä¸æåæ¢ãã§ãã ç»é¢åå²ã«ãããä¸ç»é¢ã§ã³ãã³ãã©ã¤ã³ã¨ã¨ãã£ã¿ã表示ã§ãã ç»é¢ç®¡çãã§ããã®ã§ããã¹ã¦ã®ã¦ã£ã³ãã¦ãã¿ãã®ããã«ç®¡çã§ãã ãã¹ã¦è¨å®ãã¡ã¤ã«ã§ã«ã¹ã¿ãã¤ãºã§ãã ãã¨ãæãããã¾ãããã¡ãªããã¨ãã¦ã¯ãVim ã Emacs ã®ããã«åæã®å°å ¥ã³ã¹ããé«ããã¨ã§ããããããããã®é¡ã¯ã¨ã£ã¤ãã«ããã¤ã¡ã¼ã¸ãæãã¾ãããã¨ãã£ã¿ã®ããããã¯ç°¡åã§ãã åè tmuxåºæ¬ã®ã³ãã³ã tmuxã使ãå§ããã®ã§åºæ¬çãªæ©è½ã®ä½¿ãæ¹ã¨ããæ´çãã¦ã¿ã ãããªæã ãããæ®æ®µä½¿ãã®ç°å¢ã§ããç§ã®å ´åã§ãããOS X 10.10 ã§å©ç¨ã
PCã«ã·ãªã¢ã«ã³ã³ã½ã¼ã«ã§ãã°ã¤ã³ã§ããããã«è¨å®ãããã·ãªã¢ã«ã³ã³ã½ã¼ã«ã使ãã°NICã®è¨å®ãªã©ã§ãããã¦ãã«å©ç¨ã§ããã便å©ãã·ãªã¢ã«ã³ã³ã½ã¼ã«ã§ã¤ããmgetty mingettyã®ttyã£ã¦ãªãã ãã ttyã¨ã¯ã ã©ããããæ¨æºåºåã®æ¥ç¶å ããã¤ã¹äºã®ããããä¸è¬çã«ã¯ptsãRS232Cçµç±ãªã©ã¯ttyS0ãæ¨æºåºåã®æ¥ç¶å ã«ãªã£ã¦ãã¦ãä¸ç¶ãã¦ããããã°ã©ã ãmgettyã å³ã§è¡¨ã㨠PC----ssh------/dev/pts/1--sshd----bash #ssh ãæ¥ç¶ããã¦ãã PC----rs232c---/dev/ttyS0--mgetty--bash #rs232c ãæ¥ç¶ããã¦ãã ã¨ttyãªã©ä»®æ³ç«¯æ«çµç±ã«ãªã£ã¦ãããã³ã¬ä»ã¯ãã解ã£ããã©ããã£ã¨ãã解ããªãã£ãã ç§ãç解ã§ããããã«ãªãã¾ã§ã次ã®ããã»ã¹ãããã¾ããã ï¼ã¶æåãå 輩ã«è¨ãã¦ã¿ã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}