- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Calculating bandwidth
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 05:35 AM
07-29-2004 05:35 AM
I've set up SNMP on linux, which is all fine and dandy. I am trying to write a small app that checks how much bandwidth is going through the interface at any given time. I did it in perl, and it works... but the numbers are wrong!
Basically, I pull ifInOctets from snmp. This is the bytes of data that have come in the interface. But when I take the change in that, over the change in time since the last check, the numbers are not right! Low values seem to be ok, but if I generate A LOT of traffic, then it shoots up to 45 MegaBYTES!!! Obviously impossibly over 100-MBit network.
I also tested it against MRTG. MRTG seems to get the right values. What have I done wrong?
Thanks,
-Jack C
http://www.CREPinc.com
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 08:16 AM
07-29-2004 08:16 AM
Re: Calculating bandwidth
I think to help an snmp guru(not me) might need to see your application source code. Could be a simple division error or something.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 08:56 AM
07-29-2004 08:56 AM
Re: Calculating bandwidth
One thing I do know is that SNMP counters reset after a certain number. I acounted for that in the program.
Perhaps my timeer is not accurate enough?
Thanks,
-Jack C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 05:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2004 06:44 PM
07-29-2004 06:44 PM
Re: Calculating bandwidth
Take random samples across a fixed time period. Can you show me this perl script?
The sampling is not done right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2004 03:43 AM
07-31-2004 03:43 AM
Re: Calculating bandwidth
Thanks guys,
-Jack C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2004 09:23 AM
08-02-2004 09:23 AM
Re: Calculating bandwidth
My perl script is attatched. Sorry it is not very good, as I am not a real perl person.
Thanks again,
-Jack C
http://www.crepinc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2004 05:24 AM
08-06-2004 05:24 AM
Re: Calculating bandwidth
output bytes. I didn't use snmp but the figures are the same.
I have a feeling that if you are only capturing and calculating bandwidth based on outpackets, you are shortchanging the calculation.
Bandwidth of a particular interface is made up of both input and output traffic.
Try including the ifoutOctets as well as see if this brings you any closer the expected result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2004 05:29 AM
08-06-2004 05:29 AM
Re: Calculating bandwidth
I am from the old school of bits/second for throughput numbers so I use the following:
(((ibytes_previous + obytes_previous)*8) - ((ibytes + obytes)*8))/seconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2004 01:25 AM
08-07-2004 01:25 AM
Re: Calculating bandwidth
Here is a thought. After comparing it to a known level of bandwidth, it seems that I get one low value, then one high. Perhaps, if my timing was not acurate enough, that could happen. Ideas?
Thanks
-Jack C
http://www.crepinc.com