So Long...

I have one book, will post here later

导航

diff ss and netstat and lsof

关于如何试用ss,netstat, lsof 命令在日常运维中.
个人看法不需要记住所有用法,记住最常用组合+参数意思
 
ss  -tlnp  
ss | head -n 5
ss -tn -o 
ss -nt dst :443 or dst :80  
 
ss -t4 state established
ss -t4 state listening
 
watch -n 1 "ss -t4 state established”
 
-o show live time 
 
Netstat - tlnp | grep port/pid
Netstat -at      #display all tcp
 
-a all 
 
lsof -i :8909
lsof -p pid  #show pid opened files
 
-t tcp
-l listening
-n show ip only, don’t resolve hostname
-p program 

posted on 2019-02-14 15:21  toska858  阅读(215)  评论(0编辑  收藏  举报