snipt

Ctrl+h for KB shortcuts

Bash

IP Netstat Count - RHEL5

sudo netstat -tan | perl -lane '$_ = $F[4]; $_ =~ /::ffff:(.+)(\:\d+)/; print $1' | uniq -c | less
https://snipt.net/embed/0eb8ecb61fcc92c6ae8448a2637cce60/
/raw/0eb8ecb61fcc92c6ae8448a2637cce60/
0eb8ecb61fcc92c6ae8448a2637cce60
bash
Bash
1
2019-07-23T00:07:46
True
False
False
/api/public/snipt/59762/
ip-netstat-count
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>sudo netstat -tan <span class="p">|</span> perl -lane <span class="s1">&#39;$_ = $F[4]; $_ =~ /::ffff:(.+)(\:\d+)/; print $1&#39;</span> <span class="p">|</span> uniq -c <span class="p">|</span> less </span></pre></div> </td></tr></table>