sko, how'd I enable netflow?
#kldload netgraph
There's an (old but still) good overview on how netflow/netgraph is working in this article in the howto section:
https://forums.freebsd.org/threads/...c-with-netflow-nfdump-nfsen-on-freebsd.49724/
True, this is rather old, but most things are still relevant/true - with the exception that it is no longer necessary to rebuild a custom kernel.
I'm currently only using netflow/nfsen on OpenBSD hosts; but AFAIR there are no special steps involved on FreeBSD.
The only (major) difference that comes to mind is, that OpenBSD uses a pflow pseudo-interface and the statement 'pflow' in pf.conf for data export, whereas FreeBSD IIRC just dumps everything from the configured interface(s). Both variants work, although I find the OpenBSD way more elegant, because only states created by PF rules with the statement 'pflow' are automagically exported, so instead of dumping everyting you can have a very fine-grained selection of flows.
If you want to get a nicely (and entertainingly) written overview of the OpenBSD way, there is this appropriately named blog post by Peter N.M. Hansteen:
https://bsdly.blogspot.com/2014/02/yes-you-too-can-be-evil-network.html
Please read the articles and especially the man pages mentioned in the howto article. Many steps described aren't necessary any more. Also there are some implications when running pflow (e.g. memory usage) you should be aware of. Especially on very weak routers you can drastically hurt throughput performance if you try to gather too much information.
socket stat isn't as useful in my case because I wanted to get the bytes sent/ received stat rather than just checking if the port is actually open. I'll explore tcpdump, nfsen and see how it goes.
if you just want a live view,
sysutils/pftop is exactly what you are looking for.