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?


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy