Linux??????????????
???????????? ???????[ 2017/2/15 10:25:06 ] ????????Linux ?????? ???
????1?????10.86.0.0/16???ε????????????
????????????????????traffic-lan.sh?????к???????10???????
????tcpdump -nqt src net 10.86.0.0/16 and dst net ! 10.86.0.0/16
????> /tmp/tcpdump_temp 2>&1 &
????sleep 10
????kill `ps aux | grep tcpdump | grep -v grep | awk '{print $2}'`
????#awk '{s[$2] += $6}END{ for(i in s){ print i?? s[i] } }' /tmp/tcpdump_temp
????cat /tmp/tcpdump_temp|grep 'IP '
????|awk -F'[. ]' '{s[$2"."$3"."$4"."$5]+=$14}END{for(i in s){print i" "s[i]}}'
????|sort -n -r -k 2
????2??????????IP?????????
????????????????????traffic-wan.sh?????к???????10???????
????tcpdump -nqt src net 10.86.0.0/16 and dst net ! 10.86.0.0/16
????> /tmp/tcpdump_temp 2>&1 &
????sleep 10
????kill `ps aux | grep tcpdump | grep -v grep | awk '{print $2}'`
????#awk '{s[$2] += $6}END{ for(i in s){ print i?? s[i] } }' /tmp/tcpdump_temp
????cat /tmp/tcpdump_temp|grep 'IP '
????|awk -F'[. ]' '{s[$8"."$9"."$10"."$11]+=$14}END{for(i in s){if(s[i]>0)print i" "s[i] fi}}'
????|sort -n -r -k 2
????3?????????UDP?????汾
????tcpdump -i ens3 -nqt src net 10.86.0.0/16 and dst net ! 10.86.0.0/16
????|sed 's/.[0-9]+s>//g'|sed 's/.[0-9]+://g'
????|sed 's/?? length//g'
????> /tmp/tcpdump_temp 2>&1 &
????sleep 5
????kill `ps aux | grep tcpdump | grep -v grep | awk '{print $2}'`
????cat /tmp/tcpdump_temp
????|awk '{s[$3]+=$5}END{for(i in s){if(s[i]>0)print i" "s[i] fi}}'
????|sort -n -r -k 2
????echo "finish."
????4??????????iftop???????????????
????iftop -o destination -t -s 1 -L 10
????5????????????????
????iftop -nNP -o destination -t -s 3 -L 1
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11