Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Bandwidth Usage

by shadox (Priest)
on Sep 21, 2001 at 20:56 UTC ( #113930=perlquestion: print w/ replies, xml ) Need Help??
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....

Comment on Bandwidth Usage
Re: Bandwidth Usage
by clintp (Curate) on Sep 21, 2001 at 21: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 21: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
Node Status?
node history
Node Type: perlquestion [id://113930]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2014-12-25 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls