Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having problems all over our LAN where Firefox is not closing network connections when using our internal webapp. It closes some but not all of the connections, repeat this often enough and your browser takes minutes to open a page.

I'm looking for a way to monitor the state of TCP connection that is a little more elegant than hitting netstat over and over. Something like tcpview from sysinternals but for bsd would be great.

Any help would be appreciated!

share|improve this question
up vote 4 down vote accepted

Use tcptrack. It will help in tracking open connections. It uses ncurses and can sort connections based on transfer rate.

share|improve this answer
This looks perfect, I'll give it a try. ntop nearly had it but I want to avoid a big application. – Chance Jul 17 '09 at 20:20

In FreeBSD ports there are a lot of utilities to do just that. You might try iftop or darkstat. In the net-mgmt directory in the ports tree, tcptrack, iftop, darkstat, and ntop are all available. There is a lot more there.

There is also vnstat but I didn't see a port in net-mgmt.

share|improve this answer
darkstat looks like a really useful tool, I just need a simple CL tool here but I can definitely think of other places for darkstat. – Chance Jul 17 '09 at 20:22

You might try ntop. You start the process as a daemon, then connect using a web browser and you can watch real time throughput and statistics.

I'm not sure it can get the per-process connection state - but it's a big app with many options. Could be useful.

It does work on *BSD.

share|improve this answer
I had just found ntop, I' actually thinking the interactive state will let me sit at the computer, do an action, see the result. Hopefully I can see whats causing these connections to not close. Thanks! – Chance Jul 17 '09 at 16:15

Use wireshark if you want a GUI tool

share|improve this answer

strange that nobody mentioned pftop, that can be used in pair with your pf firewall:

Pftop is a small, curses-based utility for real-time display of active states and rule statistics for pf, the packet filter (for OpenBSD)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.