title: Getting count of open connections
body: <p>I have automated the deployment of my application via fabric and have a new step that I need to add where I take my application out of rotation in the load balancer then, watch inbound connections from the balancer until they go to 0. Problem is, I am not sure how to get the count of inbound connections. </p>
  
  <p>I can use tcpdump to watch my port POSTs. However, this is kind of hard to use in fabric. What I would like is to just run a loop with a timer that keeps getting the number of active inbound connections and exits on 0. Has anybody done anything like this? Or maybe someone would know how I might be able to achieve this from the shell and I can put it in fabric?</p>