Status Screen - Overview.sh No Info.

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

r0ck
Posts: 9
Joined: Wed Nov 17, 2010 9:57 pm

Status Screen - Overview.sh No Info.

Post by r0ck »

First things first...Thank you for all your hard work on Gargoyle! Excellent Job!

I've encountered a minor problem. Using a fresh-built image from git repo, AR71xx for WZR-HP-G300NH, I have no info populating the status page. Also noticed no graphs on Qos page.

This is a new occurrence since revision 76a57dee. After this rev, changes were made to add conntrack summary statistics to overview.sh. Regarding this addition:

50 concnt=$(grep conntrack /proc/slabinfo | awk '{print $2 }')
51 consize=$(grep conntrack /proc/slabinfo | awk '{print $3 }')
52 conbytes=$(grep conntrack /proc/slabinfo | awk '{print $4 }')

I have nothing called 'slabinfo' in /proc. Could this be causing an issue? Anyone else seeing no information on the overview page?

Thanks!

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Status Screen - Overview.sh No Info.

Post by pbix »

Thanks for this report. Yeah it looks like I introduced this problem.

Unfortunately I do not have a router which can run the v2.6 kernel so its a bear to test all the combinations.

Could you report what you have under /sys/slab/nf_conntrack?

Also might be under /sys/kernel/slab/nf_conntrack. If you could post all the files you find under there is would be helpful. They should be small.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Cezary
Posts: 135
Joined: Thu Sep 11, 2008 12:57 pm
Location: Poland
Contact:

Re: Status Screen - Overview.sh No Info.

Post by Cezary »

This is depends on kernel config. CONFIG_SLAB/CONFIG_SLUB. Some system may have compiled CONFIG_SLUB.

arteq
Posts: 31
Joined: Tue Sep 14, 2010 11:49 am
Location: Poland
Contact:

Re: Status Screen - Overview.sh No Info.

Post by arteq »

Same problem at Routerstation Pro(ar71xx). I use self compiled latest git code. In source view overview page:

Code: Select all

<script> 
<!--
uptime = "58395.80 58093.99";
var qosEnabled = false;
var gargoyleVersion="1.3.X-arteq"
var currentTime = "11/19/10 10:12 CET";
var totalMemory=126976;
var freeMemory=94100;
var loadAvg="0.04 / 0.01 / 0.00";
grep: /proc/slabinfo: No such file or directory
grep: /proc/slabinfo: No such file or directory
grep: /proc/slabinfo: No such file or directory
var concnt="";
var conbytes="";
var consize="";
var wanDns="8.8.8.8";
 
//-->
</script> 

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Status Screen - Overview.sh No Info.

Post by pbix »

Ok,
I loaded my WRT54G with an OpenWRT version compiled for the v2.6 kernel and the file /proc/slabinfo still exists.

I see references to a kernel switch CONFIG_SLABINFO that is supposed to create this file even with SLUB is used instead of SLAB but I am not sure how to determine when/if this switch is used in OpenWRT.

The statics I want to display are the number of connections, the amount of memory conntrack is using and the number of bytes per connections. This is fairly straight forward with slabinfo but I am still researching how this is done without it.

If anyone has ideas now would be a good time.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Cezary
Posts: 135
Joined: Thu Sep 11, 2008 12:57 pm
Location: Poland
Contact:

Re: Status Screen - Overview.sh No Info.

Post by Cezary »

CONFIG_SLAB is default in openwrt/2.6 kernel, but ar71xx target overrides it with CONFIG_SLUB.

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Status Screen - Overview.sh No Info.

Post by Eric »

I'm going to make an executive decision on this -- we're going to get rid of the memory display and just display the number of connections in use relative to the current max allowed.

So we'll have something like:
Current Connections: 635 / 4096

This means we don't need to mess with SLAB/SLUB/SLABINFO. If too much memory is being used that will show in the memory display, and if there are a lot of connections users can make the necessary deduction.

Also, I think the memory display is a bit innacurate. It's currently showing memory used by the conntrack system, but additional memory may be required for overhead in other portions of the system for each connection, so I suspect displaying only the memory from conntrack is somewhat conservative.

arteq
Posts: 31
Joined: Tue Sep 14, 2010 11:49 am
Location: Poland
Contact:

Re: Status Screen - Overview.sh No Info.

Post by arteq »

Good decision in my opinion.
Best Regards, Artur
http://openwrt.pl - Polish Center of OpenWrt
http://digi-led.pl - Electronic Parts

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Status Screen - Overview.sh No Info.

Post by pbix »

Eric,

Here is my beef. The existing memory display is of limited value. I wanted to give people a sense of how much connections cost in terms of memory and indirectly what they can do to reduce the requirement. The existing display does not help you decide what to do if you are running low on memory since the memory is just the total of everything being used.

The two situation I have seen be the most trouble for users.

1) Low memory during booting because all the processes trying to run at the same time. If you run out of memory during booting any number of strange and unexplainable behavior will ensue.

2) Two many connections for whatever reason. The default setting of 4096 connections cannot be supported by a 16M router leading to out of memory issues.

Maybe we should start a separate thread about what were are going to do about 16M routers. Right now it is real easy to get yourself into a world of hurt and think there is something wrong with Gargoyle.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Status Screen - Overview.sh No Info.

Post by Eric »

You're right that connections cost memory, which is especially problematic for 16MB routers. In the future I do propose building separate images with different defaults, which shouldn't be too hard to do given how I've already implemented a profile system to allow some ar71xx router images to be built with USB support and some (those without USB ports) to be built without it.

Another possibility is to add a "Memory" page to the status menu which provides a more detailed breakdown of current memory usage. Alternatively, the conntrack or the connected hosts sections might be better if this is the only memory statistic we want to show. However, doing that would require resolving the SLABINFO/SLUB problem we're seeing on AR71xx routers. In general, details should not be on the overview page -- the overview page is really meant to get a quick feel for how the router is currently configured, not give lots and lots of details.

pbix, can you send me an email with your address? I want to send you (1) An AR71XX router and (2) An older Atheros router (for atheros-2.6 target). That way you'll be able to test on the other architectures more easily.

Post Reply