Super User is a question and answer site for computer enthusiasts and power users. 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 have "chrooted" my users in my Ubuntu Server and I need to monitor their bandwidth usage. Since they can access to a FTP, a SSH and a website runned by a chrooted PHP-FPM, I need to monitor all these usages too.

I've took a look at ntop, vnStat, bmon and some others, but they all seems to monitor bandwidth by their interfaces. Is there any way to measure those informations on a user based?

share|improve this question

migrated from May 26 '13 at 0:43

This question came from our site for professional and enthusiast programmers.

The iptables owner module can mark packets based on UID. Then you could use some backend like ulogd to log their size and then process the log and compute totals. However, it can handle only locally generated packets, which means you'll be able to count just outgoing data, not incoming one as well.

share|improve this answer

I know commercial programs in windows can do that: wfilter or websense.

You can use iptables TEE target to forward packets to a remote windows computer and deploy internet monitoring in the windows computer.

share|improve this answer

You must log in to answer this question.