<div class="gmail_quote">On Fri, Feb 18, 2011 at 11:21 AM, Root, Paul <span dir="ltr"><<a href="mailto:Paul.Root@qwest.com">Paul.Root@qwest.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
-----Original Message-----<br>
> From: Buchan Milne [mailto:<a href="mailto:bgmilne@staff.telkomsa.net">bgmilne@staff.telkomsa.net</a>]<br>
> Sent: Friday, February 18, 2011 4:07 AM<br>
> To: <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
> Cc: Root, Paul<br>
> Subject: Re: [xymon] Making a custom graph<br>
<br>
</div><div class="im">> On Thursday, 17 February 2011 22:58:41 Root, Paul wrote:<br>
> > Hi,<br>
> >         I have a simple script that counts the number of connects we have<br>
> > for a certain port. Specifically, the ssh proxy port for HP NA.<br>
> ><br>
> > My output looks like this:<br>
> ><br>
> > Concurrent SSH Sessions<br>
> ><br>
> ><br>
> ><br>
> > Sessions : 17<br>
> ><br>
> > Proto Recv-Q Send-Q Local Address Foreign Address State<br>
> > tcp 0 0 :::8022 :::* LISTEN<br>
> > tcp 0 0 ::ffff:<a href="http://199.168.33.8:8022" target="_blank">199.168.33.8:8022</a> ::ffff:<a href="http://10.1.193.70:1810" target="_blank">10.1.193.70:1810</a> ESTABLISHED<br>
> ><br>
</div><div class="im">> > I see that I have issues as there are a bunch of colons. I want to graph<br>
> > just the number of sessions for each interval.<br>
> ><br>
<br>
> Is there any reason you aren't using the built-in PORTS feature, e.g.<br>
<br>
> # hobbit-clients.cfg<br>
> HOST=xxx<br>
>       PORT LOCAL=*:8022 0 STATE=ESTABLISHED TRACK=hpna COL=green<br>
<br>
> That would give you a graph with name hpna of established to the local 8022<br>
> port.<br>
<br>
<br>
<br>
</div>The one problem is that we had a situation where a number of connections was stuck in CLOSE-WAIT. I'm guessing this isn't going to track that. Or is it?<br>
<br>
Can I set STATE to CLOSE-WAIT? The man page suggests not.</blockquote><div><br></div><div><br></div><div>The man page says the state can be anything that netstat reports:</div><div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div class="gmail_quote"><div>STATE=state</div></div></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div class="gmail_quote"><div>Causes only the sockets in the specified state to be included, "state" is usually LISTEN or ESTABLISHED but can be any socket state reported by the clients "netstat" command.</div>
</div></blockquote></blockquote><br><div>As long as netstat gives you CLOSE-WAIT, it should be possible to track it.</div><div><br></div><div>Ralph Mitchell</div>