Deprecated: Function set_magic_quotes_runtime() is deprecated in /membri/cyberstorm/phpBB3/common.php on line 106
Neptune354 • View topic - Current up/down rate info




Neptune354


SORRY GUYS; DUE TO A BIG AMOUNT OF SPAM I HAVE BLOCKED ALL THE FORUM ACTIVITY :-/
It is currently 17 Oct 2018, 22:12

All times are UTC + 1 hour [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Current up/down rate info
PostPosted: 08 Jul 2007, 21:20 
Offline
 Profile

Joined: 07 Jun 2007, 22:06
Posts: 31
I would love to have such info available somewhere.

Ideally as a js file accessible from web interface (ie. http://router/dumeter.js) that would be a JSON object holding current upload/download rate per second.
One could use this file then to create an Opera widget for example.

Is this up/down rate info available as a variable already or this would require creating some new function (in status.c I believe)?


Top
 

 Post subject: Re: Current up/down rate info
PostPosted: 15 Jul 2007, 00:08 
Offline
 Profile

Joined: 07 Jun 2007, 22:06
Posts: 31
Or if this info is not built in, maybe someone can tell how to check total downloaded/uploaded bytes on specified interface in linux? This and uptime (/proc/uptime) should be enough to calculate current up/down rate.


Top
 

 Post subject: Re: Current up/down rate info
PostPosted: 15 Jul 2007, 09:26 
Offline
Site Admin
 Profile

Joined: 04 Jun 2007, 17:55
Posts: 67
i dont know if it is possible to get the instantaneous bandwith use with standard linux commands, but I know some program and the simplest of them is bwm. The new-generation version, bwm-ng, has more features like output ot css/html: http://linux.die.net/man/1/bwm-ng

About the total bytes transferred, simply use ifconfig, either on "eth0" or "ppp0", or fetch them from /proc/net/dev.


Top
 

 Post subject: Re: Current up/down rate info
PostPosted: 15 Jul 2007, 11:35 
Offline
 WWW  Profile

Joined: 07 Jun 2007, 21:31
Posts: 29
This program is very useful. The author is available to make the modifications in order to support the wag.
http://img.mhilfe.de/DMT.gif


Top
 

 Post subject: Re: Current up/down rate info
PostPosted: 15 Jul 2007, 13:19 
Offline
 Profile

Joined: 07 Jun 2007, 22:06
Posts: 31
DMT does not seem to have current up/down rate displayed anywhere (there is only synchronization bitrate/s).

I'm thinking about running some commands in cron to scrape data from /proc/net/dev and /proc/uptime every second and save this info in nvram or some file. I wonder how cpu intensive it might be. I think I would have to use grep which is not very light.


Top
 

 Post subject: Re: Current up/down rate info
PostPosted: 15 Jul 2007, 19:09 
Offline
Site Admin
 Profile

Joined: 04 Jun 2007, 17:55
Posts: 67
if you run it every second i think is better to write your own c daemon, so you can void use grep


Top
 

Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits