webã¨ã³ã¸ãã¢ããã©ãã«å¯¾å¿æã«ãµã¼ã管çã§ä½¿ãã³ãã³ã
ä»æ¥id:akio0911ããã¨è©±ãæãuptimeã話ãã¦ãã®ããã£ããã§ä½ã£ã¦ã¿ã¾ããã
ã¨ããããè¦ãã¦ãããããµã¼ã管çã¨ããã©ãã«å¯¾å¿æã«ãã使ãã³ãã³ãã®ãªã¹ãã
ããããã®ã³ãã³ãã®ç´°ããæå³ã¯manåç
§ã
ã³ãã³ãã®åå¨ãç¥ããªãã¨ãã«ãããåç
§ã§ããªãã®ã§ã
ã³ãã³ãã®åå¨ãç¥ã£ã¦ãããã®ãä¸å¿ã®ç®çã§ãã
- ç¶æ³ç¢ºèªç³»
- top
- ã¿ã¹ã¯ã®åãããªã¢ã«ã¿ã¤ã ã§ç¢ºèªããã
- éãããã»ã¹ææ¡
- uptimeã¨ãfreeã¨åãæ å ±ãææ¡ã§ããã®ã§ãææªããã ãè¦ãã¦ãã°
- uptime
- ç¾å¨ã®æå»ãã·ã¹ãã ã稼åãç¶ãã¦ããæéãç¾å¨ãã°ã¤ã³ãã¦ããã¦ã¼ã¶ã¼ã®æ°ãéå» 1, 5, 15 åã®ã·ã¹ãã ã®å¹³åè² è·ã表示ã
- CPU使ç¨çããã§ãã¯ããã®ã«ä½¿ãã
- ãµã¼ããéãã¨ãè¨ãããã¨ã³ã¬ã§cpu使ç¨çãã§ãã¯
- free
- ã¡ã¢ãªã®ä½¿ç¨é åã¨ç©ºãé åããã§ãã¯
- éãæã¯cpuãã¡ã¢ãªã§ãããã
- df
- ãã¦ã³ãããã¦ãããªã¥ã¼ã ã®ãã¡ã¤ã«å®¹éããã§ãã¯
- ä¸ã®æå³ãåãããªã人åãã®è§£èª¬âHDDã®ç©ºã容éãã§ãã¯
- df -h ã§å®¹éãè¦ãããåºãã¦ãããã
- top
- è² è·ã®é«ãããã»ã¹ã®åæ¢/èµ·åæã«ä½¿ãã³ãã³ã
- ps
- ããã»ã¹ãã¿ãã
- ps -ef ã ps auxã§ä½¿ãã
- åãã¦ãããã»ã¹ã®CPU使ç¨çã¨ãã¡ã¢ãªæ¶è²»éã¨ããpidã¨ã確èª
- kill
- ããã»ã¹ã殺ãï¼åæ¢ï¼ã
- kill pid ã§æ®ºã(åæ¢)ã
- kill -signal pid
- æ¢ã¾ããªãæã¯kill -9 pid
- /etc/init.d/XXXX restart
- ããã°ã©ã ãåæ¢/éå§
- /etc/init.d/apache2 stop ã /etc/init.d/apache2 restart ã§ã¢ãããåæ¢/åèµ·åã¨ã*1
- /etc/init.d/mysqldã ã£ããããµã¼ãã¹æ¯ã«ããã¾ãã
- ç¡ãå ´åã¯PGæ¯ã«æ¢ãã
- which command
- ã³ãã³ãã®å ´æã確èªã
- which lsã㧠lsã®é ç½®å ´æãããã£ã¦ãã¾ãã
- ãã¹éã£ã¦ãªãã¨æå³ãç¡ããã©ãç¥ããªãç°å¢ã§æ¢ãã®ã«ä¾¿å©ã§ããã
- ps
- ã¨ã©ã¼ãã°ãã§ãã¯ç¨PGãã§ãã¯ç¨
- tail
- ãã¡ã¤ã«ã®æ«å°¾ã表示ããã
- tail -100 logfaile ã§ããã°ãã¡ã¤ã«ã®æå¾ï¼ï¼ï¼è¡ã表示
- grep
- ãã¡ã¤ã«ã®æ£è¦è¡¨ç¾ã«ããããããã¼ã¿ã表示
- grep error logfile ã§ãlogfileã«åå¨ããerrorã®è¡ã表示ã§ããã
- grep -R link_to app ã¨ãã§ãappãã©ã«ãé ä¸ã®ãã¡ã¤ã«å ¨é¨ã®ä¸ã§ãlink_toã¨æ¸ãã¦ããé¨åãæ¤ç´¢ããã
- tail