[ previous ] [ next ] [ threads ]
 
 From:  "ALFREDO GONZALEZ" <got2go at msn dot com>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  RE: [m0n0wall] Status: Inteface question
 Date:  Sun, 31 Oct 2004 08:41:24 +0000
>From: "The Unwanted" <no dot emails dot plz at netvisao dot pt>
>To: <m0n0wall at lists dot m0n0 dot ch>
>Subject: RE: [m0n0wall] Status: Inteface question
>Date: Sun, 31 Oct 2004 02:10:47 -0000
>
>Hi Alfredo,
>
>I was under the impression that ISPs use SNMP to query the Cable Modem for
>byte transfer so than can use in accounting.
>For this purpose they normally use the Cable Modem IP address internal to
>the network (normaly 10.xx.xx.xx).. Or so I heard
>
>But from what you are saying, I understand that you are refering to the NIC
>WAN card (that is itself connected to the Cable Modem) and getting the
>values from there.
>I didn't know (again I know nothing of SNMP) NICs had such counters.
>
>I think I'll proceed in investigating in that direction as if it is so, 
>than
>a doable script is possible.....another idea is to parse the Stats screen
>web page from m0n0 and colect the stats from there on a daily basis (this
>what I do using Samurize, an ActiveX script and the ISP traffic account web
>page).
>
>The link (CableModem<->WAN NIC) is only 10Mbps by the way (some asked about
>that).
>
>Pedro
>
Pedro,

Yes, some ISP's will query the cable modems using SNMP for their accounting.
Others use other methods.
But, it is very common for them to only allow SNMP connections from their 
own equipment.
So, dont be surprised if you cannot access the SNMP counters on your cable 
modem.

But, you do have control of the device connected to the cable modem, in this 
case the mono device. So, you can query that.

As far as the nic cards , they do not have any built in SNMP facillities.
This is done at the OS level.

There are many more counters than just the octet transfers for the NIC.
Most not even related to the NIC.

It doesnt really matter what the interface speed is (10Mbps, 100Mbps, 1Gbps, 
etc.)
The only difference is if the counters are 32bit or 64 bits.
Usually, 1Gbps NICs will use 64bit counters so that you can collect the 
counter readings at reasonable intervals without having the possibility of 
the counters resetting more than once between readings (typically, this is 
done every 5 minutes). But, it will not affect the calculations if the 
interface is 10, 100, or 1000.

You could parse the mono sinterface stats screen, but I think it would be 
more efficient to use SNMP and some existing script/program that will read 
the values and show you the proper information.

Actually, I think this could be done on the mono itself, and have a PHP psge 
that will just show the transfer totals (in, out, in+out) on each interface. 
Im not sure if mono has cron to schedule the script execution though.

I have a Win32 program built in C++ that runs as an NT service, and collects 
SNMP data for many different devices and stores the values in a MySQL 
database.
From there, we can create all kinds of reports on the fly using some web 
pages I built to query the data for each month(95th percentile, total 
transfers, max bursts (in and out),  estimated 95th percentile for current 
month, as well as traffic graphs for daily, weekly, monthly, and yearly.

Get that Paessler program I posted and try it out querying the mono box.

You can also get an SNMP walk program so you can see all the SNMP values 
available on any SNMP enabled device, not just for the NIC's.

Got2Go