simon275
01-30-2010, 02:07 AM
Hi
Does anyone know of a way to monitor the bandwidth usage of either a group or indvidiual subversion repositories running on the same OS. As they only way I can think to do this is by having seperate VM's.
Cheers
-Simon
Adam-AEC
02-02-2010, 10:06 AM
What method are you using to serve the repos?
simon275
02-02-2010, 09:09 PM
What method are you using to serve the repos?
Hi I intend to use WebDAV.
Adam-AEC
02-03-2010, 10:37 AM
WebDAV served through Apache?
I could see you approaching this two ways. I haven't tested either (since I'm a git user) so ymmv.
1) Isolate the repos using subdomains, different /location, etc. Parse the Apache request log, calculate the bandwidth used (webalizer (http://www.mrunix.net/webalizer/)?). This is of course dependent on the requests are logged. The way deltas are calculated/transferred could affect your counters as well.
2) Provide each repo / group of repos it's own IP. If you have lots of repos, this could burn up IPs quite fast. Setup a libpcap (http://netacct-mysql.gabrovo.com/) tool to record traffic by source/destination IP.
Qgyen
02-03-2010, 01:53 PM
If using mod_dav_svn with Apache, you could likely use the Apache logs. Apache normally just logs bytes sent, so you'd want to change it to a custom log format that also logged bytes received. Then you'd just need some simple script to parse the log files, trim the URLs down to just the repo (some of them are like /repo/!svn/vcc/default and such) and add up the usage.
simon275
02-03-2010, 10:02 PM
If using mod_dav_svn with Apache, you could likely use the Apache logs. Apache normally just logs bytes sent, so you'd want to change it to a custom log format that also logged bytes received. Then you'd just need some simple script to parse the log files, trim the URLs down to just the repo (some of them are like /repo/!svn/vcc/default and such) and add up the usage.
Hi
Thank you all for the above replies. Yes I am using apache. I will have a look around on the webs for more information but if you have any guides on this especially setting up a custom log format to log bytes received that would be great.
Cheers