ÔõôÉó²énginxÊÇ·ñÆô¶¯
ÔõÑùÉó²é nginx ÊÇ·ñÆô¶¯
È·ÈÏ Nginx ÊÇ·ñÆô¶¯ÓжàÖÖÒªÁ죺
1. ʹÓÃÏÂÁîÐÐ
Linux/Unix£º
systemctl status nginx
µÇ¼ºó¸´ÖÆ
Windows£º
netstat -ano | findstr 80
µÇ¼ºó¸´ÖÆ
2. ¼ì²é¶Ë¿Ú
Nginx ĬÈϼàÌýÔÚ¶Ë¿Ú 80¡£Ê¹ÓÃÒÔÏÂÏÂÁî¼ì²é´Ë¶Ë¿Ú£º
Linux/Unix£º
lsof -i:80
µÇ¼ºó¸´ÖÆ
Windows£º
netstat -nao | find "ESTABLISHED" | findstr 80
µÇ¼ºó¸´ÖÆ
3. Éó²éϵͳÈÕÖ¾
Nginx Æô¶¯Ê±»áÔÚϵͳÈÕÖ¾ÖÐдÈëÐÂÎÅ¡£Ê¹ÓÃÒÔÏÂÏÂÁîÉó²éÈÕÖ¾£º
Linux/Unix£º
grep nginx /var/log/syslog
µÇ¼ºó¸´ÖÆ
Windows£º
eventvwr.msc
µÇ¼ºó¸´ÖÆ
4. ʹÓõÚÈý·½¹¤¾ß
ÓÐÐí¶àµÚÈý·½¹¤¾ß¿ÉÒÔ×ÊÖúÄú¼à¿Ø Nginx µÄ״̬£¬ÀýÈ磺
Nagios
Zabbix
Icinga
ÒÔÉϾÍÊÇÔõôÉó²énginxÊÇ·ñÆô¶¯µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡
ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£