常用脚本–tcp
- #!/bin/bash
- #
- #********************************************************************
- #encoding -*-utf8-*-
- #Author: zhangshang
- #Date: 2017-11-25
- #URL: http://blog.vservices.top/myblog
- #Description: The test script
- #Copyright (C): 2017 All rights reserved
- #QQ Numbers: 765030447
- #********************************************************************
- echo -e " 33[31m**************************net_tcp_top_10********************************* 33[0m"
- echo -e "IPADDR count"
- ss -nt | grep 'ESTAB' | awk '{print $5}' | cut -d: -f1 | grep "^[[:digit:]]+.*" | sort | uniq -c | sort -rnk1 | awk '{print $2," ",$1}' | head