New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Bandwidth calculation
So, I wanna ask some advice/help/guidance on bandwidth calculation. I know that it is possible to get somewhat accurate BW calculation for Apache vhost from access and error logs. But how about FTP bandwidth?
It would be immensely helpful if someone who have serious experience with control panels for shared hosting provide some guidance on this topic.
Comments
I parse the ftp log files. The easiest to do this is if you are using proftpd. The extended/custom log format will make it easy. I haven't check panels yet if they do calculate the transferlog of ftp. You only need ftp? or sftp as well?
Shit. No other ways except manual log parsing? That would be a hell to join Apache + FTP. Any scripts in the wild?
I need Apache and FTP(S).
You can write a simple script for parsing.
An idea, maybe, calculate traffic for the specific ports?
https://superuser.com/questions/604998/monitor-tcp-traffic-on-specific-port
Not an option, I host multiple users per server. Log parsing seems is the only option here. Now the burden to write a script or to find one.
Try awstats
https://awstats.sourceforge.io/docs/awstats_faq.html#FTP
Unverified, but I think Virtualmin does bandwidth monitoring.
take a look around https://github.com/virtualmin/virtualmin-gpl/blob/master/bw.pl
Can confirm they do. It includes ftp traffic as well.