[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FTP Monitoring tool for total bandwidth



Radhika wrote:

Hi,
We are ISP providers and we need to monitor our FTP throughtput.IS there any tolls to monitor FTP throughtput and it should give a graph.Complete FTP activity on my total bandwidth we are providing .I am looking for opensource tools which can do this. Like if i start a 2 MB file for download it should give the starting time,ending time and throughtput Thanks for your help Best Regards


Hello !

I think you should have a look to both proftpd-mysql and webalizer.

Here is what I put in my proftpd.conf:

[/etc/proftpd.conf]
IdentLookups    off
DefaultRoot     ~
SQLAuthenticate on
SQLConnectInfo  username@localhost your_mysql_user your_mysql_passs
SQLAuthTypes    Plaintext
SQLUserInfo     ftp_access login password uid gid homedir shell
SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'c', NULL" ftp_logs

# // Count Logins per User
SQLLog                PASS logincount
SQLNamedQuery logincount UPDATE "count=count+1 WHERE login='%u'" ftp_access

# // Remember the last login time
SQLLog                PASS lastlogin
SQLNamedQuery lastlogin UPDATE "last_login=now() WHERE login='%u'" ftp_access

# // Count the downloaded bytes
SQLLog RETR           dlbytescount
SQLNamedQuery dlbytescount UPDATE "dl_bytes=dl_bytes+%b WHERE login='%u'" ftp_access

# // Count the downloaded files
SQLLog RETR           dlcount
SQLNamedQuery dlcount UPDATE "dl_count=dl_count+1 WHERE login='%u'" ftp_access

# // Count the uploaded bytes
SQLLog STOR           ulbytescount
SQLNamedQuery ulbytescount UPDATE "ul_bytes=ul_bytes+%b WHERE login='%u'" ftp_access

# // Count the uploaded files
SQLLog STOR           ulcount
SQLNamedQuery ulcount UPDATE "ul_count=ul_count+1 WHERE login='%u'" ftp_access
[eof]

This does very nice logging in a centralized database. On top of that if you need usage statistics, you can ask webalizer to parse your transfer log file. If it was not enough, you could write something with rrdtools that would grab the infos from mysql so you could use mrtg.

Regards,

   Thomas Goirand
--
http://www.gplhost.com
GPLHost:>_ Open source hosting worldwide
Webspaces featuring GPL control panel



Reply to: