Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to measure traffic(upload) made by each user on a linux system. Each users runs a rTorrent instance on a specified port. Also users could make traffic through the ftp server (vsftpd).

Is there a tool that can monitor traffic for a specified port and for ftp users ?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Yes, you could do something like that with Ntop. It is a little cumbersome, and last time i used it, it reset all stats on restart, but you should be able to feed ntop data into Cacti for permanent safe-keeping.

This will require some hackery, but the result will be amazing. You could also feed the data straight into rrdtool. There are some really cool graph examples on rrdtool site.

UPDATE: Here is a graph that shows pretty much exact thing you are aiming for.

alt text

share|improve this answer
1  
as far as attaching ports to ftp accounts... you will have to do it manually, but again, that can be achieved with some scripting perhaps? –  solefald Apr 20 '10 at 2:00
    
Good to know that its possible to assign ports. Scripting is not so big problem. –  Claudiu Apr 20 '10 at 2:05
    
nice graphs, I can't wait to try your solution. Thanks. –  Claudiu Apr 20 '10 at 2:18

Upload is outgoing traffic.

I suggest you to investigate the --uid-owner setting of iptables match module.

share|improve this answer

I use nTop or iftop but they don't discriminate between user

share|improve this answer
    
I guess nTop or ifTop can measure port traffic; my question is, can I assign ports to ftp accounts ? –  Claudiu Apr 20 '10 at 1:56
    
i use n0rp.chemlab.org/vlogger for HTTP, I don't know something like this for FTP –  virtualroot Apr 20 '10 at 2:11

Your Answer

 
discard

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.