Router Stats Logger

Utilities and tools for networking, routers, setup etc
Post Reply
User avatar
Neo
RouterTech Team
RouterTech Team
Posts: 3586
Joined: Thu Jan 26, 2006 1:09 pm
Contact:

Re: Router Stats Logger - edited x2

Post by Neo » Sun Sep 27, 2009 4:48 pm

KevinR wrote:Using 1.0.29 I got the frozen stats file effect after 10 minutes, 10 recorded values. Both countdown clocks were running. The values in the "show log" display matched with the same timestamp. On closing the end of snr_stats.txt file appeared to match the stats.txt entries.

Second Edit:
OK it ran over night fine from 01:16 to 09:57. Then this morning the RSL locked up again.
I think that getting the stats every minute for a day or a maybe a week or more is a bit excessive! :o At that rate, you'd have 1440 readings a day (approx 50kb) and 10080 readings a week (approx 345kb). At each reading, there are many things going on (several router queries, waiting for the router to respond, calculations etc) so it's possible that after a minute the router hasn't had time to settle or router's CPU / file system may get over loaded. Maybe the RSL is still waiting for something or calculating when the timer 'goes off' again. I'd be interested to see memory usage stats from your router while the RSL is monitoring.
KevinR wrote:Using the user interface I used Stop Monitoring & Start Monitoring to try and reestablish logging. It waited, then greyed the router access functions (ie. Get Router Info, Reboot) but appears not to get much further. This implies the internal logic, router or file access is confused, so it cannot restart.
If the RSL encounters a problem obtaining the stats, it would probably require the RSL to be completely closed and then restarted (that would currently be the only way to reset some of the variables).

I've been running the RSL on my PC, with monitoring set to 1 minute intervals, but I haven't been able to reproduce the problem (yet). The only thing I've noticed is that during monitoring, web browsing appears very sluggish.
RouterTech Team and Founding Member
Image
RouterTech Merchandise (UK)
No support via PM, please ask your questions on the forum!
KevinR
Regular
Regular
Posts: 95
Joined: Sat Jul 14, 2007 8:51 pm

Re: Router Stats Logger

Post by KevinR » Sun Sep 27, 2009 8:41 pm

Hey Neo. Yeah well I have kind of been running the RSL + router to death a bit. :shock: Thing was I rediscovered the line noise I was going to fix a couple of years ago (life interrupted - don't ask). So I decided to try and find out whether the noise was continuous or spiky or what. The first thing that happened was I looked at the 2 hourly stats logged by default by the RT firmware. This showed that on Monday and Tuesday something made the SNR Margin adjust to 7-8db at the start of the morning (between 8-10am) when the line had already stabilised from its overnight state and was in the 20s... (It had been low overnight).

So I set the RSL to watch - closely. On a 1 minute interval. Got some interesting graphs. AND caught the margin changing to 8db at 09:06. This seemed like a line management effect due to the precise timing and the lack of any normal fluctuations. Weird. Basically it seemed to change to the lowest steady state (as opposed to spike) that occurred overnight. This made the line look very poor.

I also collected some samples at the Test and Master sockets.

Fix 1: Detached the Bell Wire Pair at the master socket. This removed a lot of overnight noise.
Fix 2: Detached all the Bell Wire Pairs at both extension sockets. This actually removed some more noise. I have graphs to prove it.

I also wanted a big overnight sample at the Test Socket to prove that further improvement (filtered faceplate plus extension or router at filtered faceplate) would be worth the effort.

People often talk about the effects of extensions and location but as I could not rush to do the changes I thought I'd try and collect as much proof as possible.

The RSL has been incredibly useful. What's weird is that the lockup can happen after only 10 samples.
KevinR
Regular
Regular
Posts: 95
Joined: Sat Jul 14, 2007 8:51 pm

Re: Router Stats Logger - edit x1

Post by KevinR » Tue Jan 12, 2010 6:07 pm

Hi Neo.

Just started running the RSL against a router running 2.91.1 instead of an old version. The RSL has been on my system used intermittently since you sent me the version with the "logfile name datestamp option" in September.

What I had said (edited to revise this):
Anyway when I try and start logging I get an Error 6 - Overflow error dialog. The only other factor is that its the first time I've run it in 2010.
Oddly, I'd changed no settings since November I think, but just tried for the umpteenth time and after altering ALL the settings around Pinging and LogFileDate = suddenly its happy! Sorry to have troubled you. I think one of the values may have been too big, but why it worked before is unclear. Another quick test - It appears it was the "Reboot after N failed pings" which was set to "lots" = 50000, just to disable it as my old ISP used to eat pings a lot at times. Sure I didn't alter any of that yesterday, I just wanted to log the first few hours and get an idea of G604T+RT2.91.1+dsp73A stability on C&W LLU. Odd.

As a side note the exchange equipment is displayed as:
Unknown Manufacturer (P), Revision 2.
Can I pull any other useful info out anywhere.
pcourtney
Novice
Novice
Posts: 26
Joined: Mon Jan 18, 2010 4:41 pm

Re: Router Stats Logger

Post by pcourtney » Tue Jan 19, 2010 2:44 am

the reboot feature after x amount of failed pings is magic, do we know how many pings a minute RSL is programmed to ?
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: Router Stats Logger - edit x1

Post by mstombs » Tue Jan 19, 2010 9:54 am

I can answer this one
KevinR wrote:As a side note the exchange equipment is displayed as:
Unknown Manufacturer (P), Revision 2.
Can I pull any other useful info out anywhere.
If you look in the raw output of

Code: Select all

cat /proc/avalanche/avsar_modem_stats
There is a line

Code: Select all

       ATUC Vendor Code:       4946544E        ATUC Revision:  2
The Vendor Code is encoded in ASCII, RSL has a list of known translations in the file vendors.txt, in my case

Code: Select all

IFTN=Infineon
You could help by converting your string to text and finding out what it means.
User avatar
Neo
RouterTech Team
RouterTech Team
Posts: 3586
Joined: Thu Jan 26, 2006 1:09 pm
Contact:

Re: Router Stats Logger - edit x1

Post by Neo » Sun Jan 24, 2010 1:14 pm

KevinR wrote:Anyway when I try and start logging I get an Error 6 - Overflow error dialog. The only other factor is that its the first time I've run it in 2010...Oddly, I'd changed no settings since November I think, but just tried for the umpteenth time and after altering ALL the settings around Pinging and LogFileDate = suddenly its happy! Sorry to have troubled you. I think one of the values may have been too big, but why it worked before is unclear.
Thanks for the feedback, Kevin :). As soon as I saw your message I tried to reproduce the error in the RSL, just in case it was 2010 related, but I didn't see any problems (as a general rule I try not to hard code any date calculations). I have seen some odd/big values throw the RSL occasionally, but not enough for me to trace the problem - mainly because the problem doesn't tend to appear consecutively.

And as for the manufacturer, as mstombs says, if you could get the Vendor Code and perhaps provide a new entry for the vendors.txt file that would be great.
pcourtney wrote:the reboot feature after x amount of failed pings is magic, do we know how many pings a minute RSL is programmed to ?
It's up to the user :) - see "Interval in seconds" on the "Settings" tab, under "Ping details". That sets the time between pings - e.g. "60" would be 1 minute ;)
RouterTech Team and Founding Member
Image
RouterTech Merchandise (UK)
No support via PM, please ask your questions on the forum!
KevinR
Regular
Regular
Posts: 95
Joined: Sat Jul 14, 2007 8:51 pm

Re: Router Stats Logger

Post by KevinR » Sun Jan 24, 2010 10:51 pm

Hi Neo. The ATUC Vendor code is dumped as (0x)50000000, which explains why the RSL displays "P". The other field dumped is "ATUC ghsVid: b5 00 50 00 00 00 00 00", so there is a valid country code but a dodgy vendor code.

According to Xilo most of the C&W exchanges have a DSLAM with a "CTLM - Centillium Communications Inc." chipset. Its not that clear who's DSLAM it is although there have been notes on the web linking Marconi to using Centillium and (perhaps) C&W using Marconi. Its a bit odd that it returns nearly blank though. I looked up Centillium and its at least a bit orphaned as they sold out to TranSwitch Corp.

I found a history of compatibility quirks with the Centillium, many router (chipset) vendors had to push out firmware revisions - even broadcom & thomson. See my summary here.

PS: I think the parameter issue was that I had "reboot after n failed pings" set to 50000 (essentially to turn it off) and thats bigger than a say 32767, the usual max-small-int. It might be it only get parsed if the app tries to use the value from the dialog/form?
.NetRolller 3D
Newbie
Newbie
Posts: 6
Joined: Wed Feb 11, 2009 5:40 pm

Re: Router Stats Logger

Post by .NetRolller 3D » Sat Feb 06, 2010 2:15 am

Dslfeatures.txt doesn't seem to contain any DSP7.5-specific options yet - are there plans to add these?
I know of at least these new options (from the tiatm 7.05 source code):
DSLFC1:
Bit 6: Enable ADSL2+ FastPath stability
Bit 7: Enable TDC fix
Bit 8: Enable US ATTNDR update fix
Bit 9: Enable forced monitored tones

There also appears to be a DSLPC1 field now, though it seems to be unused.

The sources for tiatm 7.05 are available @ http://www.sphairon.com/media/download/ ... 55.tar.bz2 (this is a full GPL source tarball - tiatm is in kernel/drivers/net/atm/sangam_atm AFAIK), or I can make a separate package if needed.

EDIT: The following DSLPC0 bits are also in DSP75:
Bit 0: Enable one-bit mode
Bit 1: Enable S1/4
Bit 2: Enable tone blackout
Bit 3: Disable random tone order
Bit 4: Enable two-tone G.hs detection
Bit 5: Enable capped rate support
Bit 6: Disable monitored tones
Bit 7: Disable extended framing support (NOTE: This bit appears to have changed meaning in DSP73!)
Bit 17: Disable Annex M support (this is not a change, it was always Disable, just it is mislabeled in dslfeatures.txt)
Bit 22: Enable uncancelled echo metric (no idea what this could be)
Bit 23: CPE-initiated DELT
Bit 24: Enable two-tone ADSL1 timing
Bit 25: Disable two-tone ADSL2/2+ timing
Bit 26: Enable PTM preferred
Bit 27: Forcibly enable PTM
Bit 28: PHY Reserved API 3
Bit 29: Disable PHY TI internal 2
Bit 30: Enable PHY TI internal 1

I will post more details as I come across them.

EDIT 2: DSLPC0 bits 0-5 and 29-30 are not actually new to DSP75, they are also present in DSP73. Bit 6 and bits 22-28 are new.
The meaning change for bit 7 is also present in DSP73.
.NetRolller 3D
Newbie
Newbie
Posts: 6
Joined: Wed Feb 11, 2009 5:40 pm

Re: Router Stats Logger

Post by .NetRolller 3D » Sat Feb 06, 2010 4:23 am

And an unrelated comment:
The following fix is needed for RSL to work with OpenWRT on AR7:
You need to send the command login before sending the username. (At least this makes the RSL script work in Telnet Scripter. Note that OpenWRT doesn't asks for any password upon Telnet by default, but running "login" makes the RSL script move forward. Another, perhaps better fix is to leave out the login procedure altogether if OpenWRT is detected, and head right into the shell.)
However, there is no /proc/ticfg/env, so not all features can be made to work this way. (In OpenWRT, the DSL feature control bits are passed to tiatm as module params, so the Advanced tab can be made to work.)

EDIT: All env variables used by the script (and presumably by RSL as well) are implemented as modparams.
The mapping of envvars to modparams are as follows:
enable_margin_retrain -> enable_margin_retrain
margin_threshold -> margin_threshold
DSL_FEATURE_CNTL_0 -> featctl0
DSL_FEATURE_CNTL_1 -> featctl1
DSL_PHY_CNTL_0 -> phyctl0
DSL_PHY_CNTL_1 -> phyctl1

The exact procedure for getting/setting these is the following:

Code: Select all

cat /etc/modules.d/50-sangam-atm-annex-*
This gives a single line, which contains all these parameters.

By default, this line is merely:

Code: Select all

tiatm
However, when e.g. DSL_PHY_CNTL_0 is set, it looks like this:

Code: Select all

tiatm phyctl0="0x00000100"
To enable margin retrain with a threshold of 5, one can do this:

Code: Select all

echo "tiatm enable_margin_retrain=1 margin_threshold=5" > 50-sangam-atm-annex-* 
However, it is important to preserve already present parameters, so when e.g. phyctl0 is already set, this should be done instead:

Code: Select all

echo "tiatm phyctl0="0x00000100" enable_margin_retrain=1 margin_threshold=5" > 50-sangam-atm-annex-*
EDIT 2: System log can be obtained using the command:

Code: Select all

dmesg
rseiler
Regular
Regular
Posts: 77
Joined: Tue Apr 28, 2009 8:54 pm

Re: Router Stats Logger

Post by rseiler » Sun Aug 29, 2010 9:59 pm

KevinR wrote:The first thing that happened was I looked at the 2 hourly statslogged by default by the RT firmware. This showed that on Monday and Tuesday something made the SNR Margin adjust to 7-8db at the start of the morning (between 8-10am) when the line had already stabilised from its overnight state and was in the 20s... (It had been low overnight).
I may be misreading this, but this seems to imply that the firmware itself tracks DS Margin somewhere, perhaps on an hourly basis. If so, where? I'm only familiar with the current view in Modem Status.

Also, regarding #24 and #25 in RSL Advanced, is there any more detail on these (in particular I don't get #24)? Is there a way to set/unset them via telnet directly? Is it a permanent change (until you unset it) or is it something that RSL sets each time it's run?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Router Stats Logger

Post by thechief » Sun Aug 29, 2010 11:09 pm

rseiler wrote:I may be misreading this, but this seems to imply that the firmware itself tracks DS Margin somewhere, perhaps on an hourly basis. If so, where? I'm only familiar with the current view in Modem Status.
Enable "line attenuation logging" in the "RT Configurations" menu.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: Router Stats Logger

Post by mstombs » Sun Aug 29, 2010 11:20 pm

The RSL includes a way to poll the router regularly, in addition to the local router log.

The tweaks are set by setting env vars, they will only be active after saving and rebooting, the env vars are removed to delete. The RSL includes all info we have found.
rseiler
Regular
Regular
Posts: 77
Joined: Tue Apr 28, 2009 8:54 pm

Re: Router Stats Logger

Post by rseiler » Tue Aug 31, 2010 12:38 am

mstombs wrote:The tweaks are set by setting env vars, they will only be active after saving and rebooting, the env vars are removed to delete.
Do you mean that the env vars need to be deleted manually as opposed to with RSL?

I tried enabling #24 and found that it set this:
DSL_FEATURE_CNTL_1 0x00000000

I removed it and tried #25 and found that it added exactly the same thing. Shouldn't it be different? For example, the one in the FAQ is:
DSL_FEATURE_CNTL_0 0x03000000
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: Router Stats Logger

Post by mstombs » Tue Aug 31, 2010 1:06 am

The RSL should set DSL_FEATURE_CNTL_0 and DSL_FEATURE_CNTL_1 and DSL_PHY_CNTL_0

all zeros clears all the tweak bits, you shouldn't have to unset the vars manually, but that's how you can remove all trace
rseiler
Regular
Regular
Posts: 77
Joined: Tue Apr 28, 2009 8:54 pm

Re: Router Stats Logger

Post by rseiler » Tue Aug 31, 2010 2:43 am

Ah yes, I was thinking that new items were only added to the bottom of printenv, but they can sneak in up top, too.

The last part I don't understand is what you mean by "all zeros." Where can that be done? All I'm seeing are check boxes.
Post Reply