day54课堂笔记(shell监控)
2019-05-30 本文已影响0人
五月_w
第一章、监控方法
本地监控方法
netstat -lntup |grep nginx |wc -l
lsof -i :80|wc -l
curl -s 127.0.0.1 2>/dev/null
![](https://img.haomeiwen.com/i16837788/87d171febc42587c.png)
客户端模拟监控
wget -q 127.0.0.1 &>/dev/null
![](https://img.haomeiwen.com/i16837788/6d3a556c1c6f8cf6.png)
![](https://img.haomeiwen.com/i16837788/c4d081d34572a053.png)
远端端口监控方法
nmap 127.0.0.1 -p 80 |grep open |wc -l
nc -z 127.0.0.1 80
![](https://img.haomeiwen.com/i16837788/b41c5bc06d908582.png)
![](https://img.haomeiwen.com/i16837788/8429bb953d2178b4.png)