Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
laziness, impatience, and hubris
 
PerlMonks  

Bandwidth Usage

by shadox (Priest)
on Sep 21, 2001 at 16:56 UTC ( [id://113930]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

shadox has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone, the other day i was working in project to monitor the bandwidth usage, the program is in a openBSD server and there are logs of the bandwidth usage so i just need to manipulate the data, that was easy until i tried to do it for any O.S.
I did look for some module or something for it but i didn't find anything useful, and since i am new with network programing, here i am :)
Anyone knows a way to do it, a module or something
Thanx
Dreams they just disapear into the shadows,
then they become true....

Replies are listed 'Best First'.
Re: Bandwidth Usage
by clintp (Curate) on Sep 21, 2001 at 17:08 UTC
    We did something similar here but not for bandwidth usage. It might prove helpful. We took a filehandle and did a tie() on it, and selected it as the default output filehandle.

    Using something like this you could count the bytes that go by unobtrusively and then when the object is destroyed (the program ends), put the data out to a logfile somewhere..

Re: Bandwidth Usage
by lhoward (Vicar) on Sep 21, 2001 at 17:55 UTC
    use SNMP (in particular, for monitoring bandwidth you'll want to use ifInOctets and ifOutOctets). SNMP is cross platform and very standard. Best of all, there are lots of SNMP perl modules...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://113930]
Approved by root
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.