Topic: Graph network traffic

Hi, I've "ported" the statistics graph from m0n0wall to openwrt, it only requires haserl installed (ipkg install haserl).

Here yo can see an screenshot:

http://img295.echo.cx/img295/8831/stats0it.jpg

You can download it form:

http://24.232.1.91/wrt54g.stats.tar.gz

Any comment or suggestion it’s welcome.

Re: Graph network traffic

Thanks for that, seems like a really useful function!

I've just installed it and SVG, but unfortunately it comes up with "Cannot get data about interface". It's trying to monitor vlan1.  Any ideas?

Cheers, Paul.

Re: Graph network traffic

Just got it working. You'll need to compile tr, sed and awk in busybox (I didn't have tr compiled in my experimental build).

Works a treat now - thanks!


Paul.

Re: Graph network traffic

Looks great. I'm looking for something like this. For a home network with just the router and couple clients it doesn't make sense to have another box running 24/7 just to draw the graphs when the box is perfectly capable of doing it itself.
The link posted is dead unfortunately - can some1 repost this package?
If not are there similar packages around?
If not I'll probably go to the trouble of porting/writing something like that myself.

Re: Graph network traffic

Mee too. I'd especially like something that embeds itself in the webif-UI, for instance in the router info-tab.

Re: Graph network traffic

download down sad
code:
Not Found
The requested URL /wrt54g.stats.tar.gz was not found on this server.

7 (edited by arantius 2006-03-09 06:26:25)

Re: Graph network traffic

Well, the OP seems to have disappeared.

But here's a new version.  Through my efforts, I even found an easy way to integrate it into webif!  Here's the IPK:

http://www.arantius.com/openwrt/ipk/svg … mipsel.ipk

It relies on "webif-patch" which can be found here:

http://www.hot-spot-zone.de/hsz/ipkg/

I know the links in the interfaces section could really be improved, but it all appears to work for me.

http://img156.imageshack.us/img156/3140/svggraph5kt.th.jpg

Edit: Bumped version for reference.

Re: Graph network traffic

Duh, it hit me.  Prettier links for interfaces (in built in subcategory bar, by overriding the function):

http://www.arantius.com/openwrt/ipk/svg … mipsel.ipk

Re: Graph network traffic

Hi arantius,

I'm using your package. Unfortunately, all graphs don't show any lines for cpu usage, traffic etc. You can see an example here.


Do I need to run/start something in order to get these results?

Thanks

Andreas

Re: Graph network traffic

ALuedtke,
What browser?  Where does its SVG support come from?

Re: Graph network traffic

I have installed webif 0.2-1 and have a problems. i think svggraph-webif_0.2 is not compatible with that webif version. I posted a screen : http://img251.imageshack.us/img251/8854/graph6pt.jpg

Best regards
http://openwrt.pl - Polish OpenWrt Wiki
http://digi-led.pl - Electronic Parts

12 (edited by ALuedtke 2006-02-07 20:45:51)

Re: Graph network traffic

I use Firefox 1.5.0.1. SVG support is internal.

Andreas

[Edit]
Firefox has internal SVG support, but I'm using the Adobe SVG 6 plugin as recommended in the Mozilla plugin docs. Without this plugin, Firefox wants to download an SVG file...

Re: Graph network traffic

Add the following line

.svg:image/svg+xml

to your /etc/httpd.conf and restart httpd,
and Firefox won't try to download the graphs anymore.

Re: Graph network traffic

jutski,

I added the line to httpd.conf and restartet httpd. Now I can use Firefox without the plugin, BUT I still see no cpu/traffic graphs!!!

arantius, what can I do? Please help.

FYI: I have a WRT54GS V4 with wr rc4

Re: Graph network traffic

ALuedtke wrote:

jutski,

I added the line to httpd.conf and restartet httpd. Now I can use Firefox without the plugin, BUT I still see no cpu/traffic graphs!!!

arantius, what can I do? Please help.

FYI: I have a WRT54GS V4 with wr rc4

i have this problem, too. You are not alone smile

Best regards
http://openwrt.pl - Polish OpenWrt Wiki
http://digi-led.pl - Electronic Parts

Re: Graph network traffic

I have an graph at the cpu tab, but the others dont get graphed yet...

Ronny

WRT54G 2.0 / WR RC4

Re: Graph network traffic

Good catch jutski, I forgot that part!  Will need to fix the package.

For those who do not have data showing, the graph makes (more or less) ajax calls to fetch the data, to a url of this form:

http://openwrt/cgi-bin/webif/svggraph/data.php

and

http://openwrt/cgi-bin/webif/svggraph/data.php?if=lo0

Does something show up at those URLs (assuming the proper host name/IP for your set up) if you open them in your browser?

What are the contents of your /proc/stat and /proc/net/dev files?

18 (edited by ALuedtke 2006-02-09 09:50:29)

Re: Graph network traffic

Hi arantius,

first of all I had to change data.php to data.sh! Or do I need PHP on my WRT? smile

When I enter http://openwrt/cgi-bin/webif/svggraph/data.sh I get this result:

Thu Feb  9 08:40:55 CET 2006
cpu  83258520 10028 185133091 8390

For http://openwrt/cgi-bin/webif/svggraph/data.sh?if=lo0 I get:

Thu Feb  9 08:42:22 CET 2006

For http://openwrt/cgi-bin/webif/svggraph/data.sh?if=ppp0 I get:

Thu Feb  9 08:44:04 CET 2006
  ppp0:  197794     721    0    0    0     0          0         0   195547     747    0    0    0     0       0          0

For http://openwrt/cgi-bin/webif/svggraph/data.sh?if=ipsec0 I get:

Thu Feb  9 08:47:35 CET 2006
ipsec0:111945665 1239763    0  361    0     0          0         0 444907534 3113685   22 51168    0     0      22          0

After I collected this info for you,  I tried it this morning again "the normal way" via the admin GUI. I got some data but not really what I thought. You can see the screenshot here. When I do this, a text string "Collecting initial data, please wait..." appears in the window for some seconds.

Do you have other ideas?

Andreas

[Edit]
When I select "Traffic ppp0" on the graphs page, I get a message "cannot get data about interface"

Re: Graph network traffic

I thought I posted that, yes, .php there was a typo it's really .sh !

I'll probably have to wait 'till tonight or this weekend for time to look at this, but I'll work on it for sure.

Re: Graph network traffic

I have installed webif 0.2-1 and have a problems

Oh, yes.  0.1 only.

Re: Graph network traffic

arantius wrote:

I have installed webif 0.2-1 and have a problems

Oh, yes.  0.1 only.

Thanks, The problem is solved. Now I see graph on CPU, but other no ;( I delete completly and install Firefox smile

PS.Sorry for English wink

Best regards
http://openwrt.pl - Polish OpenWrt Wiki
http://digi-led.pl - Electronic Parts

Re: Graph network traffic

I'm pretty sure I see what the issue was.  Give this a shot:

http://www.arantius.com/openwrt/ipk/svg … mipsel.ipk

And thank you ALuedtke for the data that pointed out the problem! smile

Re: Graph network traffic

Hi arantius,

I tried your version 0.3 and it looks phantastic now! cool  Thanks for the module!

There is only one minor thing that I encountered: my CPU load is always at 100% even when there is no traffic. Maybe you can fix this with your next version. If you need more data you should tell me asap, because I'm out of the office next week.

I de-installed version 0.2 before I installed 0.3. Is that necessary?

Andreas

Re: Graph network traffic

I'm getting a message "Cannot get data about interface" on all graphs, any suggestions on what I might be doing wrong? Running data.sh?if=eth0 for instance gives me

Sun Feb 12 11:19:16 WET 2006
  eth0:  162847     340    0    0    0     0          0         0    47344     436    0    0    0     0       0          0

I'm running White Russian RC4 on a WRT54G v2.2..

Great package btw, really looking forward to getting this to work! I've been waiting for something like this for a really long time!

Re: Graph network traffic

Hi va1210,

are you using version 0.3? I had similar problems with the other versions.