Re: Bandwidth monitoring
Lars Eggert wrote: > Adam wrote: > > My ISP is placing strict restrictions on how much I can transfer each > > month, with high penalties for exceeding their limits. However, they > > don't provide any way for their customer's to check to see how much > > they've transferred, so we end up transferring far less than what we are > > allowed, just to make sure we avoid paying the fines for going over the > > limit. > > > > So, what I need to do is find a way to monitor my total bandwidth > > through my external NIC. My gateway is running FreeBSD 4.8 with > > ipf+ipnat. > > > > I *don't* need anything fancy. All I need is to be able to check at any > > time how much I've transferred since the first of the month. What's the > > easiest way to set up something like this? I know there are fancy > > solutions with graphs with usage stats and such, but that's not what I'm > > after. > > What's wrong with netstat? Won't that count all the ethernet frames and local ethernet broadcasts which probably won't be billed for? We had this problem using router (ethernet) interface counters to measure traffic in our hosting center. The trouble is that any traffic between servers on the same physical network is counted even though it isn't routed and shouldn't be billed for. It's pretty unfair of your ISP to charge you for useage without providing any mechanism for you to keep tabs on what they're measuring throughout the month. I would suggest that you find out exacly how they measure your traffic useage. ie do they measure only packets that were switched by their router or just any and every single byte that their router's ethernet interface sees. The first is IMHO much more fair than the second because trafic local to your IP network won't be charged. I can give you a hand setting up a graph like: http://www.digs.iafrica.com/20030520_00h00-20030620_00h00.gif This is _really_ simple to do and if you have managers, they will really like the green changes to red when you go over the limit. Ian ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Bandwidth monitoring
Adam, i recommend using ipa, its part of the ports directory, latest is 1.3.4 in short you add an ipf rule to 'count' traffic on your given interface (setup individual rules for the main ports such as 80/tcp and 25/tcp). The ipa config file then references those count rules to keep a database of the stats, via a cron job. Cheers, Jon Newson - Systems Administrator SDR Technologies [EMAIL PROTECTED] -Original Message- From: Ian Freislich [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 5:54 PM To: Lars Eggert Cc: Adam; [EMAIL PROTECTED] Subject: Re: Bandwidth monitoring Lars Eggert wrote: > Adam wrote: > > My ISP is placing strict restrictions on how much I can transfer each > > month, with high penalties for exceeding their limits. However, they > > don't provide any way for their customer's to check to see how much > > they've transferred, so we end up transferring far less than what we are > > allowed, just to make sure we avoid paying the fines for going over the > > limit. > > > > So, what I need to do is find a way to monitor my total bandwidth > > through my external NIC. My gateway is running FreeBSD 4.8 with > > ipf+ipnat. > > > > I *don't* need anything fancy. All I need is to be able to check at any > > time how much I've transferred since the first of the month. What's the > > easiest way to set up something like this? I know there are fancy > > solutions with graphs with usage stats and such, but that's not what I'm > > after. > > What's wrong with netstat? Won't that count all the ethernet frames and local ethernet broadcasts which probably won't be billed for? We had this problem using router (ethernet) interface counters to measure traffic in our hosting center. The trouble is that any traffic between servers on the same physical network is counted even though it isn't routed and shouldn't be billed for. It's pretty unfair of your ISP to charge you for useage without providing any mechanism for you to keep tabs on what they're measuring throughout the month. I would suggest that you find out exacly how they measure your traffic useage. ie do they measure only packets that were switched by their router or just any and every single byte that their router's ethernet interface sees. The first is IMHO much more fair than the second because trafic local to your IP network won't be charged. I can give you a hand setting up a graph like: http://www.digs.iafrica.com/20030520_00h00-20030620_00h00.gif This is _really_ simple to do and if you have managers, they will really like the green changes to red when you go over the limit. Ian ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
On Thu, Jun 26, 2003 at 09:53:31AM +0200, Ian Freislich wrote: > > Won't that count all the ethernet frames and local ethernet broadcasts > which probably won't be billed for? We had this problem using > router (ethernet) interface counters to measure traffic in our > hosting center. The trouble is that any traffic between servers > on the same physical network is counted even though it isn't routed > and shouldn't be billed for. > > It's pretty unfair of your ISP to charge you for useage without > providing any mechanism for you to keep tabs on what they're measuring > throughout the month. The SNMP if[In|Out]Octet counters for ethernet include frame overhead, local broadcasts, etc. Odds are 99.999% you're getting billed for the ethernet overhead anyways. > I would suggest that you find out exacly how they measure your > traffic useage. ie do they measure only packets that were switched > by their router or just any and every single byte that their router's > ethernet interface sees. The first is IMHO much more fair than the > second because trafic local to your IP network won't be charged. It isn't really unfair, as long as everyone does it the same way consistantly. Maybe it's unfair for your provider to charge you the same price for traffic to your next-door-neighbor customer off the same switch that they would charge you for transit they haul to the other side of the world... Or maybe it's unfair that you pay so little for that longhaul traffic, and they're just giving you a lower price becaue they assume you'll do some local traffic and it will all average out. -- Richard A Steenbergen <[EMAIL PROTECTED]> http://www.e-gerbil.net/ras GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
Richard A Steenbergen wrote: > > I would suggest that you find out exacly how they measure your > > traffic useage. ie do they measure only packets that were switched > > by their router or just any and every single byte that their > > router's ethernet interface sees. The first is IMHO much more fair > > than the second because trafic local to your IP network won't be > > charged. > > It isn't really unfair, as long as everyone does it the same way > consistantly. Maybe it's unfair for your provider to charge you the > same price for traffic to your next-door-neighbor customer off the > same switch that they would charge you for transit they haul to the > other side of the world... Or maybe it's unfair that you pay so > little for that longhaul traffic, and they're just giving you a lower > price becaue they assume you'll do some local traffic and it will all > average out. Maybe I should qualify 'fair' and 'local ip network'. We, that is UUNET South Africa, found using the SNMP if[In|Out]Octet counters on the ethernet interface would count traffic between your hosts on the same piece of 'local ip network' - the /28 or /29 assigned to your VLAN in the co-location facility. I don't think that this is fair since the ISP network never really has to think too hard about those packets and it certainly doesn't have to route them. However, if a packet leaves your little piece of the internet and is routed to another piece, even if it is in a cabinet next door to yours, then I really don't think there is a problem billing for that traffic. My suggestion that Adam checks out what his ISP is doing still stands because they may not be aware of the implications and side-effects of their particular way of measuring the traffic. They might land up saying 'Gosh, we didn't realise that we were billing $BIGNUM for your online backups to another server in your cabinet, sorry about that. Try this new invoice for size.' Ian * These opinions are my own and not my company's of course. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
On 24 Jun 2003, Adam wrote: > My ISP is placing strict restrictions on how much I can transfer each > month, with high penalties for exceeding their limits. However, they > don't provide any way for their customer's to check to see how much > they've transferred, so we end up transferring far less than what we are > allowed, just to make sure we avoid paying the fines for going over the > limit. > > So, what I need to do is find a way to monitor my total bandwidth > through my external NIC. My gateway is running FreeBSD 4.8 with > ipf+ipnat. > > I *don't* need anything fancy. All I need is to be able to check at any > time how much I've transferred since the first of the month. What's the > easiest way to set up something like this? I know there are fancy > solutions with graphs with usage stats and such, but that's not what I'm > after. > > Thanks for your advice, I use the following home-grown tool to measure bandwidth consumed by the hosts on my ethernet segment: http://www.watson.org/~robert/freebsd/bpfmon.tgz It uses BPF to monitor traffic on the segment, and drops bandwidth samples into a data directory every five minutes. there's a post-processing script that generates a CSV of samples, by local host, for easy consumption in a spreadsheet. It's not a great program, but it is cute and works. Make sure to read the README if you use it; you have to set a few things at compile-time, since I wrote it for local use and never really attempted to generalize. I use it to monitor inbound and outbound IP traffic for around 400 hosts here for precisely the same reason you are interested :-). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Network Associates Laboratories ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
I'm not sure I understand why not just tell ipfw to count all packets that an ISP is likely to charge for and have the tables 'reaped every now and then by a daemon to give a time dimension to the data.. On Thu, 26 Jun 2003, Robert Watson wrote: > On 24 Jun 2003, Adam wrote: > > > My ISP is placing strict restrictions on how much I can transfer each > > month, with high penalties for exceeding their limits. However, they > > don't provide any way for their customer's to check to see how much > > they've transferred, so we end up transferring far less than what we are > > allowed, just to make sure we avoid paying the fines for going over the > > limit. > > > > So, what I need to do is find a way to monitor my total bandwidth > > through my external NIC. My gateway is running FreeBSD 4.8 with > > ipf+ipnat. > > > > I *don't* need anything fancy. All I need is to be able to check at any > > time how much I've transferred since the first of the month. What's the > > easiest way to set up something like this? I know there are fancy > > solutions with graphs with usage stats and such, but that's not what I'm > > after. > > > > Thanks for your advice, > > I use the following home-grown tool to measure bandwidth consumed by > the hosts on my ethernet segment: > >http://www.watson.org/~robert/freebsd/bpfmon.tgz > > It uses BPF to monitor traffic on the segment, and drops bandwidth samples > into a data directory every five minutes. there's a post-processing > script that generates a CSV of samples, by local host, for easy > consumption in a spreadsheet. It's not a great program, but it is cute > and works. Make sure to read the README if you use it; you have to set a > few things at compile-time, since I wrote it for local use and never > really attempted to generalize. I use it to monitor inbound and outbound > IP traffic for around 400 hosts here for precisely the same reason you are > interested :-). > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > [EMAIL PROTECTED] Network Associates Laboratories > > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
On Thu, 26 Jun 2003, Julian Elischer wrote: > I'm not sure I understand why not just tell ipfw to count all packets > that an ISP is likely to charge for and have the tables 'reaped every > now and then by a daemon to give a time dimension to the data.. Well, the case that this code was designed for was passive monitoring of many IPs over many systems (some of which have a large number of IP addresses, each to be separately billed). I also wanted to specifically disqualify local traffic between the hosts, since that wasn't part of the billing structure. You could certainly implement this using ipfw accounting, but only if you wanted to add one firewall rule for each matching case of interest (since we needed to separately measure), and you were willing to tweak and sample the firewall rules on each of the hosts. For the single host/single IP, or even the constrained number of hosts/IPs case, ipfw would be a more than adequate solution, since the expression of "just the traffic I mean" would be simple. > On Thu, 26 Jun 2003, Robert Watson wrote: > > > On 24 Jun 2003, Adam wrote: > > > > > My ISP is placing strict restrictions on how much I can transfer each > > > month, with high penalties for exceeding their limits. However, they > > > don't provide any way for their customer's to check to see how much > > > they've transferred, so we end up transferring far less than what we are > > > allowed, just to make sure we avoid paying the fines for going over the > > > limit. > > > > > > So, what I need to do is find a way to monitor my total bandwidth > > > through my external NIC. My gateway is running FreeBSD 4.8 with > > > ipf+ipnat. > > > > > > I *don't* need anything fancy. All I need is to be able to check at any > > > time how much I've transferred since the first of the month. What's the > > > easiest way to set up something like this? I know there are fancy > > > solutions with graphs with usage stats and such, but that's not what I'm > > > after. > > > > > > Thanks for your advice, > > > > I use the following home-grown tool to measure bandwidth consumed by > > the hosts on my ethernet segment: > > > >http://www.watson.org/~robert/freebsd/bpfmon.tgz > > > > It uses BPF to monitor traffic on the segment, and drops bandwidth samples > > into a data directory every five minutes. there's a post-processing > > script that generates a CSV of samples, by local host, for easy > > consumption in a spreadsheet. It's not a great program, but it is cute > > and works. Make sure to read the README if you use it; you have to set a > > few things at compile-time, since I wrote it for local use and never > > really attempted to generalize. I use it to monitor inbound and outbound > > IP traffic for around 400 hosts here for precisely the same reason you are > > interested :-). > > > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > > [EMAIL PROTECTED] Network Associates Laboratories > > > > > > ___ > > [EMAIL PROTECTED] mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
Julian Elischer wrote: I'm not sure I understand why not just tell ipfw to count all packets that an ISP is likely to charge for and have the tables 'reaped every now and then by a daemon to give a time dimension to the data.. That was my thought, though the OP isn't using ipfw, and I'm woefully ignorant (and mostly uninterested) in ipfilter. You could just as your ISP for access to the SNMP MIB that they're using to bill you. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bandwidth monitoring
On Thu, Jun 26, 2003 at 07:05:57PM -0400, Robert Watson wrote: ... > > that an ISP is likely to charge for and have the tables 'reaped every > > now and then by a daemon to give a time dimension to the data.. > > Well, the case that this code was designed for was passive monitoring of > many IPs over many systems (some of which have a large number of IP > addresses, each to be separately billed). I also wanted to specifically > disqualify local traffic between the hosts, since that wasn't part of the > billing structure. You could certainly implement this using ipfw > accounting, but only if you wanted to add one firewall rule for each > matching case of interest (since we needed to separately measure), and you just for the records, you can do counting on a per-host basis with a single ipfw rule, using dummynet pipes: ... rules to remove undesired traffic... ipfw add pipe 1 ip from ${my_subnet} to not ${my_subnet} in ipfw pipe 1 config mask src-ip 0x sysctl net.inet.ip.dummynet.expire=0 This of course requires that the traffic you are interested in flows through the box where you are running the above ipfw config. cheers luigi ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: something wrong with fxp driver ?
On Fri, Jun 27, 2003 at 07:36:51 +0200, Kirill Ponomarew wrote: > On Fri, Jun 27, 2003 at 01:27:28PM +0800, Ying-Chieh Liao wrote: > > my previous kernel is about May 10, and the fxp works fine for me > > but I cvsuped and make world/kernel yesterday (6/26), and then terrible thing > > happens... the connection becomes v...e...r...y... s...l...o...w... > > my ping time to the gateway is about 8000ms (but sometimes 20ms) > > > > I've browse the mail archive of -current and -net, and I've noticed some > > similar problems with fxp (device timeout), and I also get this message > > (fxp0 device timeout) in my dmesg output, but I cant find out any solution :< > > Is there any workaround, or patches ? > [just my stupid: me too] > I have the same problem. It seems that ATA is b0rken somewhere. > [/just my stupid: me too] something related to ATA ? I'm not sure ... but when I make buildkernel, it complains that it didnt recognize ATA_ENABLE_ATAPI_DMA ... -- char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} -- Anonymous pgp0.pgp Description: PGP signature
Re: something wrong with fxp driver ?
On Fri, Jun 27, 2003 at 01:27:28PM +0800, Ying-Chieh Liao wrote: > my previous kernel is about May 10, and the fxp works fine for me > but I cvsuped and make world/kernel yesterday (6/26), and then terrible thing > happens... the connection becomes v...e...r...y... s...l...o...w... > my ping time to the gateway is about 8000ms (but sometimes 20ms) > > I've browse the mail archive of -current and -net, and I've noticed some > similar problems with fxp (device timeout), and I also get this message > (fxp0 device timeout) in my dmesg output, but I cant find out any solution :< > Is there any workaround, or patches ? Check that it's negotiating the media type and options correctly. On the gohan machines it has been failing to negotiate full-duplex mode for the past few months, leading to LAN transfer speeds on the order of 20kps unless I set the media options explicitly. Kris pgp0.pgp Description: PGP signature
something wrong with fxp driver ?
my previous kernel is about May 10, and the fxp works fine for me but I cvsuped and make world/kernel yesterday (6/26), and then terrible thing happens... the connection becomes v...e...r...y... s...l...o...w... my ping time to the gateway is about 8000ms (but sometimes 20ms) I've browse the mail archive of -current and -net, and I've noticed some similar problems with fxp (device timeout), and I also get this message (fxp0 device timeout) in my dmesg output, but I cant find out any solution :< Is there any workaround, or patches ? -- char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} -- Anonymous pgp0.pgp Description: PGP signature