How to Find and Check Number of Connections to a Server如何查找和數量勾選連接到服務器
Whenever a client connects to a server via network, a connection is established and opened on the system.每當有客戶端連接到一台服務器通過網絡連接,建立和開放的系統。 On a busy high load server, the number of connections connected to the server can be run into large amount till hundreds if not thousands.在繁忙的高負荷服務器,連接數量的連接到服務器可以運行大量進入到數百甚至數千。 Find out and get a list of connections on the server by each node, client or IP address is useful for system scaling planning, and in most cases, detect and determine whether a web server is under DoS or DDoS attack (Distributed Denial of Service), where an IP sends large amount of connections to the server.找出並取得名單的連接在服務器上的每個節點,客戶端或IP地址是有益的系統擴展規劃,而且在多數情況下,偵查和決定是否Web服務器是根據DOS或DDoS攻擊(分佈式拒絕服務)在一個IP發送大量的連接到服務器。 To check connection numbers on the server, administrators and webmasters can make use of netstat command.要查看連接數的服務器上,管理員和網站管理員可以使用netstat命令。
Below is some of the example a typically use command syntax for ‘netstat’ to check and show the number of connections a server has.以下是一些例如通常使用的命令語法為' netstat '檢查並顯示連接數了一台服務器。 Users can also use ‘man netstat’ command to get detailed netstat help and manual where there are lots of configurable options and flags to get meaningful lists and results.用戶還可以使用'男子netstat '命令netstat獲得詳細的幫助和手冊那裡有大量的配置選項和旗幟,以獲得有意義的名單和結果。
netstat -na
Display all active Internet connections to the servers and only established connections are included.顯示所有活動的互聯網連接到服務器,只有建立連接也包括在內。
netstat -an | grep :80 | sort
Show only active Internet connections to the server at port 80 and sort the results.只顯示活躍的互聯網連接的服務器上的端口80和排序結果。 Useful in detecting single flood by allowing users to recognize many connections coming from one IP.實用的檢測由單一的洪水使用戶能夠認識到許多連接來自一個IP 。
netstat -n -p|grep SYN_REC | wc -l
Let users know how many active SYNC_REC are occurring and happening on the server.讓用戶知道有多少積極SYNC_REC正在發生和發生在服務器上。 The number should be pretty low, preferably less than 5.數量應相當低,最好小於5 。 On DoS attack incident or mail bombed, the number can jump to twins.對拒絕服務攻擊事件或郵件轟炸的人數有5000對雙胞胎。 However, the value always depends on system, so a high value may be average in another server.然而,價值總是取決於系統,所以,高附加值平均可在另一台服務器。
netstat -n -p | grep SYN_REC | sort -u
List out the all IP addresses involved instead of just count.列出所有IP地址的參與,而不只是指望。
netstat -n -p | grep SYN_REC | awk '{print $5}' | awk -F: '{print $1}'
List all the unique IP addresses of the node that are sending SYN_REC connection status.列出所有獨特的IP地址的節點發送SYN_REC連接狀態。
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
Use netstat command to calculate and count the number of connections each IP address makes to the server.使用netstat命令來計算和計數連接數量的每個IP地址使服務器。
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
List count of number of connections the IPs are connected to the server using TCP or UDP protocol.伯爵表的數量連接的IP連接到服務器使用TCP或UDP協議。
netstat -ntu | grep ESTAB | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr
Check on ESTABLISHED connections instead of all connections, and displays the connections count for each IP.檢查既定的連接不是所有連接,並顯示連接計數為每個IP 。
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
Show and list IP address and its connection count that connect to port 80 on the server.名單顯示和IP地址和連接數,連接到端口80的服務器上。 Port 80 is used mainly by HTTP web page request. 80端口主要用於通過網頁上的HTTP請求。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明:這是一台機器翻譯網頁這是“原樣”提供,無保修。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原文的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at共享和貢獻或獲得技術支持和幫助 My Digital Life Forums 我的數字生活論壇 . 。
Related Articles相關文章
- Limit Maximum TCP Connections to Web Servers極限最大TCP連接到Web服務器
- How to Check if Telnet Is Running on a Server如何檢查,如果遠程登錄上運行的服務器
- Tweak (Increase or Change) Maximum Simultaneous HTTP and Downloads Connections to Web Server調整(增加或變更)最大同時HTTP和下載連接到Web服務器
- Checking Free Disk Space on FreeBSD Server檢查可用磁盤空間在FreeBSD服務器
- How to Get Actual Build and Revision Number of Windows Vista or Longhorn Server Installed如何獲得實際建立和修訂若干Windows Vista或Longhorn服務器安裝
- Using PHP-MySQL Persistent Connections to Run WordPress Blog用PHP , MySQL的持久連接運行WordPress的博客
- Error Has Occurred While Establishing A Connection To SQL Server 2005 Which Does Not Allow Local and Remote Connections發生錯誤,同時建立一個連接到SQL Server 2005不容許本地和遠程連接
- Connect to Remote Computer using Specific Non Standard Port using Remote Desktop Connection Client連接到遠程計算機使用特定的非標準端口使用遠程桌面連接客戶端
- Workaround to Run VNC Server in Windows Vista解決辦法運行的VNC服務器在Windows Vista
- Shortcut to Open Network Connections Quickly in Vista捷徑打開網絡連接迅速在Vista

































April 24th, 2008 13:38 2008年4月24號13:38
Thank you, really useful for defending attacker謝謝你,真的有用的衛冕攻擊
July 3rd, 2008 19:24 2008年7月三日19:24
Thank you very much, I have been under attack and thanks to list list of such useful info I am now clean!非常感謝你,我一直受到攻擊和感謝名單,名單等有用的信息我現在乾淨!