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
http://cyberstorm.altervista.org/phpBB3/

Current up/down rate info
http://cyberstorm.altervista.org/phpBB3/viewtopic.php?f=9&t=20
Page 1 of 1

Author:  diz2k [ 08 Jul 2007, 21:20 ]
Post subject:  Current up/down rate info

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)?

Author:  diz2k [ 15 Jul 2007, 00:08 ]
Post subject:  Re: Current up/down rate info

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.

Author:  cyberstorm [ 15 Jul 2007, 09:26 ]
Post subject:  Re: Current up/down rate info

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.

Author:  C@rciofone [ 15 Jul 2007, 11:35 ]
Post subject:  Re: Current up/down rate info

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

Author:  diz2k [ 15 Jul 2007, 13:19 ]
Post subject:  Re: Current up/down rate info

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.

Author:  cyberstorm [ 15 Jul 2007, 19:09 ]
Post subject:  Re: Current up/down rate info

if you run it every second i think is better to write your own c daemon, so you can void use grep

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/