#!/usr/bin/perl my $_cmd="netstat -an|grep -v unix"; my @_output=`$_cmd`; my $_estab = 0; my $_listen = 0; my $_timewait = 0; my $_timeclose = 0; my $_finwait1 = 0; my $_finwait2 = 0; my $_synsent = 0; my $_synrecv = 0; my $_closewait = 0; foreach (@_output) { $_estab++ if /ESTABLISHED/; $_listen++ if /LISTEN/; $_timewait++ if /TIME_WAIT/; $_timeclose++ if /TIME_CLOSE/; $_finwait1++ if /FIN_WAIT1/; $_finwait2++ if /FIN_WAIT2/; $_synsent++ if /SYN_SENT/; $_synrecv++ if /SYN_RECV/; $_closewait++ if /CLOSE_WAIT/; } print " established:$_estab\n listen:$_listen\n timewait:$_timewait\n timeclose:$_timeclose\n finwait1:$_finwait1\n finwait2:$_finwait2\n synsent:$_synsent\n synrecv:$_synrecv\n closewait:$_closewait\n";
运行结果如下
以上运行结果等效于
netstat -an|awk '/^tcp/{++A[$NF]}END{for(a in A) print a,A[a]}'
var kevent = 'onabort|onblur|onchange|onclick|ondblclick|onerror|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onresize|onselect|onsubmit|onunload'; var aevent = kevent.split('|'); jQuery('.showContent img').each(function(){ var nimg = this; jQuery.each(aevent, function(i, n){ if (n!='onload') { jQuery(nimg).attr(n, ''); } else { if (jQuery(nimg).attr(n) != 'if(this.width>650) this.width=650;') { jQuery(nimg).attr(n, ''); } } }); });
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索jquery
, if
, listen
, jquery print
, My
, SYN_SENT
onmouse
linux查看tcp连接数、linux tcp连接数、tcp连接数、查看tcp连接数、服务器tcp最大连接数,以便于您获取更多的相关知识。