Nginx 巡检命令(示例)
export nginxbin=/usr/local/nginx
export nginxcfg=/etc/nginx/ngins.conf
export nginxip=127.0.0.1
export ret=~/nginx_${nginxip}.txt
export nginxerrlotg=xxxx

echo -e '\n[1] Nginx Version' | tee -a ${ret}
${nginxbin} -V 2>&1 | tee -a ${ret}

echo -e '\n[2] Nginx Config Syntax' | tee -a ${ret}
${nginxbin} -t -c ${nginxcfg} &> /tmp/nginx_conf_check.log
cat /tmp/nginx_conf_check.log | tee -a ${ret}

echo -e '\n[3] Nginx Status' | tee -a ${ret}
ps -eo pid,%cpu,%mem,lstart,etime,cmd |grep "nginx.*${binpath}" |grep -v grep >> ${ret}


echo -e '\n[4] Nginx Config' | tee -a ${ret}
cat ${nginxcfg}  >> ${ret}


echo -e '\n[5] System limit' |tee -a ${ret}
ulimit -a |tee -a ${ret}

echo -e '\n[6] 日志tail100' |tee -a ${ret}

tail -n 100 ${nginxerrlotg} |tee -a ${ret}
原创不易,转载时请标明作者及出处。
作者:打个小肥鸡
转自:https://www.sretalk.com/?p=163
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇