Date: Sat, 18 Dec 1999 20:36:42 -0200 From: "Aldrin Leal" <aldrin@americasnet.com> To: "Ian Smith" <smithi@nimnet.asn.au> Cc: <freebsd-net@freebsd.org> Subject: Re: Math Help for IPFW :) Message-ID: <007101bf49a8$5eeeb9a0$0200a8c0@expert.com.br> References: <Pine.BSF.3.96.991217181552.19958A-100000@gaia.nimnet.asn.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> Sure you can use SNMP also, or instead, but if you want to do it from I really haven't tried to find SMNP agents for Win9x, which are the platform for the computers. > your gathered IPFW data, why not just use the byte counters rather than > or as well as the packet counters, per rule? How to look at the byte counters? :] My source is: ### Cut here #!/usr/bin/suidperl $rule = 2500; if (open(HANDLE, "/sbin/ipfw -q show $rule|")) { if ($line = <HANDLE>) { chomp $line; @values = split(' ', $line); $packets = $values[2]; } close(HANDLE); } system "/sbin/ipfw -q zero $rule"; print "$packets\n$packets\n00:00\nrule $rule\n"; ### Unclip The rule is: 02500 108 11320 allow ip from 200.242.253.6 to any > > The first problem is that packet size varies greatly -- it could be a > > single byte (plus header/address information), or quite large, depending > > on what the interface type/parameters are set for. That's where all my problem starts... and ends. > > The best solution I found for this is SNMP, which is what most of the "big > > boys" (PSI Net, for example) use. I do something similar -- sample the > > "interfaces.ifTable.ifEntry.ifOutOctets" and > > "interfaces.ifTable.ifEntry.ifInOctets" entries for each interface > > periodically, and you can calculate the average bandwidth usage per > > interface pretty easily: Well. I'll try to find an SNMP agent. thanks, anyway. :) done, Aldrin Leal mailto:aldrin@americasnet.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?007101bf49a8$5eeeb9a0$0200a8c0>