[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-users] Getting Traffic up/down from mldonkey
From: |
Roland Arendes |
Subject: |
[Mldonkey-users] Getting Traffic up/down from mldonkey |
Date: |
Fri, 12 Dec 2003 12:45:58 +0100 (CET) |
User-agent: |
SquirrelMail/1.4.2 |
Hi
Is there any fast and proper way to get the current upload and
downloadrate via shell/perlscripts?
I like the output of donitor (
http://www.edu.uni-klu.ac.at/~splattne/donitor/monitor_12h.html ), but it
does it in a way i don't like and which is very, very slow and
unprofessional (creating every 20 seconds ipchains/tables-rules for all
connections it finds via lsof of mldonkey and count the bytes collected by
these chains -> creates a load of 0,82 on my machine).
Well, for upload this could be done with iptables and the user-module with
one single rule (to catch all outgoing traffic from the particuluar
mldonkey-user), but for incoming traffic it is not possible to catch *all*
bytes.
So, I had the idea of creating a perlscript which logs into the telnet
interface, sends a 'vd' and counting all rates. But, this is not a
professional way, too.
I then thought about implementing a gui-connection-class for perl, but the
overhead is not very nice.
Is there a proper way to get the current up+down rate (scriptable values)
from mldonkey? Something like this:
> vd_raw
23536 12343
(For current downstream and upstream in bytes?)
I thought about dumping a file with stats every minute, but this is not
fast enough because in one minute MUCH can happen and the average would be
totally wrong.
Any ideas? Perhaps patches? ;-o)
-Roland
- [Mldonkey-users] Getting Traffic up/down from mldonkey,
Roland Arendes <=