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

Is there a way to get per-ip traffic stats from PF on OpenBSD 4.9? pfctl can give me the total traffic (bytes) for a given label, and pfstats for a given interface, and pftop can give me a "live" view of traffic, but I'm looking for a historical view- i.e. something I can look at and say "yesterday this IP used x bytes"

share|improve this question
up vote 2 down vote accepted

You can do this through a slightly convoluted (but very easy to manage long-term, and pretty well-understood) adaptation of Netflow traffic monitoring (using OpenBSD's pflow support).

Basically export netflow data for all your traffic, grab it with Flow-Tools, and feed it to something like JKFlow to parse (and graph/report on). There are also many other NetFlow crunching/graphing programs, and a number of real-time monitoring systems available.
The upside is that exporting in NetFlow format opens up a huge array of tools for you to use -- The downside is the overhead and complexity of running all that extra code.

You may also be able to magic something up using MRTG, but I'm not as familiar with that.

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.