您好,欢迎来到尔游网。
搜索
您的当前位置:首页Netstat to to find number of connections from each IP

Netstat to to find number of connections from each IP

来源:尔游网

Hello,

Below is command to find out number of connections from each ip to server using netstat , sort, uniq, awk.

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

Here is description of Grep used in this command :: Grep is used for sorting lines which are matching for defined pattern but if you want to sort such lines which are matching two or more different pattern then simply define all patterns in single quote and separate them using \| .


if you want to create a hyperlink in command, you have to use only "ln" instead of "in -s" otherwise you will only create a symbol link of the shell.

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- axer.cn 版权所有 湘ICP备2023022495号-12

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务