{"id":575,"date":"2014-08-15T21:19:51","date_gmt":"2014-08-15T21:19:51","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=575"},"modified":"2014-08-15T21:19:51","modified_gmt":"2014-08-15T21:19:51","slug":"how-do-i-check-how-many-http-connections-are-open-currently","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/08\/15\/how-do-i-check-how-many-http-connections-are-open-currently\/","title":{"rendered":"How do I check how many HTTP connections are open currently?"},"content":{"rendered":"<p>Keep it mind that http is a stateless protocol. Each line can represent one client opening multiple sockets to grab different files (css, images, etc) that will hang out for awhile in a timewait state.<\/p>\n<p>To display only active Internet connections to the server at port 80 and sort the results, allow to recognize many connections coming from one IP<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -an | grep :80 | sort\n\n<\/pre>\n<p>To display the list of the all IP addresses involved instead of just count.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -n -p | grep SYN_REC | sort -u\n\n<\/pre>\n<p>Slow Server<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -ntu | awk &#039;{print $5}&#039; | cut -d: -f1 | sort | uniq -c | sort -n \n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -nat | grep :80 | grep ESTAB | wc -l\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -nat | grep :80 | gawk &#039;{ print $5; }&#039; | gawk -F: &#039;{ print $1 }&#039; | sort | uniq -c | sort -n\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -an|grep &quot;:80&quot;|awk &#039;\/tcp\/ {print $6}&#039;|sort -nr| uniq -c | sort -n\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -plan|grep :80|awk {&#039;print $5&#039;}|cut -d: -f 1|sort|uniq -c|sort -nk 1\n\n<\/pre>\n<p>For Java?<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# netstat -nat | grep :1935 | gawk &#039;{ print $5; }&#039; | gawk -F: &#039;{ print $1 }&#039; | sort | uniq -c | sort -n\n\n<\/pre>\n<p>Need to optimize?<\/p>\n<p><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/misc\/perf-tuning.html\" target=\"_blank\" rel=\"noopener\">http:\/\/httpd.apache.org\/docs\/2.2\/misc\/perf-tuning.html<\/a><br \/>\n<a href=\"http:\/\/blog.monitis.com\/2011\/07\/05\/25-apache-performance-tuning-tips\/\" target=\"_blank\" rel=\"noopener\">http:\/\/blog.monitis.com\/2011\/07\/05\/25-apache-performance-tuning-tips\/<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/8902103\/is-there-an-apache-tuner-script-like-mysqltuner-pl\" target=\"_blank\" rel=\"noopener\">http:\/\/stackoverflow.com\/questions\/8902103\/is-there-an-apache-tuner-script-like-mysqltuner-pl<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Keep it mind that http is a stateless protocol. Each line can represent one client opening multiple sockets to grab different files (css, images, etc) that will hang out for awhile in a timewait state. To display only active Internet connections to the server at port 80 and sort the results, allow to recognize many &#8230; <a title=\"How do I check how many HTTP connections are open currently?\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/08\/15\/how-do-i-check-how-many-http-connections-are-open-currently\/\" aria-label=\"Read more about How do I check how many HTTP connections are open currently?\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,4],"tags":[],"class_list":["post-575","post","type-post","status-publish","format-standard","hentry","category-administration","category-apache"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=575"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}