{"id":1162,"date":"2025-05-21T12:54:33","date_gmt":"2025-05-21T11:54:33","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1162"},"modified":"2025-05-21T12:56:38","modified_gmt":"2025-05-21T11:56:38","slug":"mwni-conncount-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwni-conncount-function\/","title":{"rendered":"Mwnci conncount() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>conncount<strong>([<em>string<\/em>])<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>conncount()<\/i> function returns a hash current counts of connection types. The hash is keyed on connection type.<\/p>\n<h3>Connection Types<\/h3>\n<pre>ESTABLISHED\r\nSYN_SENT\r\nSYN_RECV\r\nFIN_WAIT1\r\nFIN_WAIT2\r\nTIME_WAIT\r\nCLOSE\r\nCLOSE_WAIT\r\nLAST_ACK\r\nLISTEN\r\nCLOSING\r\nNEW_SYN_RECV<\/pre>\n<p><\/p>\n<h2>Example<\/h2>\n<pre>include(\"net\")\r\nprintln(conncount())\r\nCount=conncount()\r\nprintln(\"There are \", Count[\"LISTEN\"], \" ports listening\")\r\n\r\n\r\n{\"LISTEN\": 6, \"ESTABLISHED\": 16}\r\nThere are 6 ports listening<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax conncount([string]) Description The conncount() function returns a hash current counts of connection types. The hash is keyed on connection type. Connection Types ESTABLISHED SYN_SENT SYN_RECV FIN_WAIT1 FIN_WAIT2 TIME_WAIT CLOSE CLOSE_WAIT LAST_ACK LISTEN CLOSING NEW_SYN_RECV Example include(&#8220;net&#8221;) println(conncount()) Count=conncount() println(&#8220;There are &#8220;, Count[&#8220;LISTEN&#8221;], &#8221; ports listening&#8221;) {&#8220;LISTEN&#8221;: 6, &#8220;ESTABLISHED&#8221;: 16} There are 6 ports listening<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1162","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1162"}],"version-history":[{"count":5,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1162\/revisions"}],"predecessor-version":[{"id":1167,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1162\/revisions\/1167"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}