Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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
Dreams they just disapear into the shadows,
then they become true....

Replies are listed 'Best First'.
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...
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..

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://113930]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2023-05-31 11:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found