Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2] 3 4

Author Topic: Serving (slightly) better stats directly from Zyxel modems  (Read 14485 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #15 on: July 03, 2018, 11:39:48 PM »

« Last Edit: July 04, 2018, 02:52:33 AM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #16 on: July 04, 2018, 01:34:58 AM »

You're giving me flash backs to a first year web dev course where the exam had a final question along the lines of "now rewrite everything you have done using XHTML and XSL"... nobody was a fan, then I never encountered it again! The lecturer was a fairly old school type, was adamant we all had to sign up to some weird british computing society, made a point of showing him bring up his network interfaces on the CLI after plugging in the projector... I digress.  :D

What benefit does using XML to define webpages really have? Doesn't seem to be in wide use.

All I have at the moment in terms of HTML is a few named canvas elements, all the rest is my nasty excuse for javascript for parsing the output of xdslctl and structuring the data so it works with Chart.js.

Edit: If you mean producing an XML version of the data from the xdslctl output then thats doable I guess.
« Last Edit: July 04, 2018, 01:37:50 AM by johnson »
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #17 on: July 04, 2018, 02:48:08 AM »

« Last Edit: July 04, 2018, 03:07:25 AM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #18 on: October 14, 2018, 12:02:52 PM »

Have made a VMG1312 firmware with the most basic of SNRM monitoring. It logs SNRM, FEC & CRC numbers every 30 seconds, but also has the output of various xdslctl commands available with the most basic form of an API.

At modem-ip:8000 is the SNRM graph. A GET request to modem-ip:8000/getdata will update files that can be accessed from a browser (or Workflow etc) under modem-ip:8000/data/, just browse there to see a directory listing.

The SNRM graph uses the modems current time vs the browsers to give the correct labels, if you change the time manually or by NTP some time after boot things will get screwy.

I have run various versions of this for months on a VMG8324, and this specific firmware overnight with a live line on a VMG1312.

Apart from the stats server this is vanilla 1312 AAJZ16 with the jumbo frame patches.

https://www.dropbox.com/s/y6f6pcgnwyz8dn4/1312-B10A-AAJZ16-SNRM-log.bin?dl=0
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #19 on: October 15, 2018, 12:24:14 AM »

« Last Edit: October 16, 2018, 02:54:51 AM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #20 on: October 15, 2018, 06:50:05 PM »

Oh thats disappointing!

I have tried it with the zyxel firewall set to high from wired and wireless connections from PC/tablet/phone, so was sure it just "worked".  :(

I did indeed mean port 8000 decimal. A little google of "NSPOSIXErrorDomainCode=61 Connection refused" suggests its just a generic response to being unable to find the host.

If you are game for troubleshooting the first this would be to make sure the server is running on the device. Telnet in and gain real shell with "xtm && sh". The search the running processes for "stats":

Code: [Select]
~ # ps | grep stats
  262 supervis  1148 S    stats-server-bin
  263 supervis  2148 S    /bin/bash /var/tmp/stats/./stats-logging.sh

If it the stats server is running then the next thing to check the right files exist in /var/tmp/stats:

Code: [Select]
~ # cd /var/tmp/stats
/var/tmp/stats # ls
Chart.min.js      getdata           jquery.min.js
data              getstats.sh       moment.min.js
getCurTime.sh     index.html        stats-logging.sh
/var/tmp/stats #

Check the log file for data:

Code: [Select]
/var/tmp/stats # tail data/logfile
1514907468 4.3 6.5 8558 0 0 0
1514907498 4.4 6.4 3752 0 0 0
1514907528 4.3 6.4 6155 0 0 0
1514907559 4.3 6.4 5115 0 0 0
1514907589 4.3 6.4 3528 0 0 0
1514907619 4.3 6.4 2893 0 0 0
1514907649 4.2 6.5 3072 0 0 0
1514907680 4.4 6.5 3377 0 0 0
1514907710 4.3 6.5 2842 0 0 0
1514907740 4.3 6.4 2981 0 0 4
/var/tmp/stats #

Have you tried accessing the data folder from a browser, i.e "192.168.2.1:8000/data" ?

Apologies for supplying something that hasn't worked, and no problem if you'd rather not troubleshoot, I know how tedious it can be.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #21 on: October 16, 2018, 12:17:13 AM »

« Last Edit: October 16, 2018, 12:24:38 AM by Weaver »
Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #22 on: October 16, 2018, 12:40:45 AM »

If the stats-server-bin is not even running thats where to start.

You make a good point about altering the version string, I'll have to remember where it is to edit and use for further versions.

To make sure it has definitely been flashed you can search the /etc/profile file for the lines that start the server:

Code: [Select]
~ # grep stats /etc/profile
mkdir /var/tmp/stats
mkdir /var/tmp/stats/data
cp /webs/stats-server/* /var/tmp/stats/
chmod +x /var/tmp/stats/getstats.sh
chmod +x /var/tmp/stats/getCurTime.sh
chmod +x /var/tmp/stats/stats-logging.sh
touch /var/tmp/stats/data/logfile
...

Or simply see if "stats-server-bin" is in the PATH:

Code: [Select]
~ # stats-server-bin

I'm pretty sure I still have your default config from a while ago in a PM if it hasn't changed much since then, but as I say, making sure of a successful flash is first on the list.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #23 on: October 16, 2018, 02:00:07 AM »

Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #24 on: October 16, 2018, 03:47:57 AM »

Ah, well good stuff thats it working now. Version stringed releases from now on!

Wish I could offer some reason that the GUI is such a pain in your setup, but have never experienced it myself. Its not the snappiest by any means, but it never bugs out or hangs on the firmware upload page.

Is the SNRM graph drawing itself ok? Have left it auto ranging as it gives pretty good results with the range my line produces.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #25 on: October 16, 2018, 04:06:46 AM »

Logged

johnson

  • Reg Member
  • ***
  • Posts: 838
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #26 on: October 16, 2018, 04:19:15 AM »

Its the standard default A2pv6F039v adsl_phy. Thats the one you use normally right?

All I can suggest is to wait till you have 24 hours of SNR data and pick an optimum resync time (via an xdslctl configure --snr reduction maybe) and hope for the best. I assume at least the most recent flash and resync was during darkness hours so probably suboptimal.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #27 on: October 16, 2018, 04:28:30 AM »

Logged

dee.jay

  • Helpful
  • Kitizen
  • *
  • Posts: 1073
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #28 on: October 16, 2018, 08:06:30 AM »

I recently installed a VMG1312-B10A on my dad's VDSL line that's connected to an ECI cabinet, hence no G.INP etc.

Would that be of any use to you?
Logged
routed by opnsense on proxmox. Even my WiFi is baller

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Serving (slightly) better stats directly from Zyxel modems
« Reply #29 on: October 16, 2018, 10:40:08 PM »

And you do not need it?
Logged
Pages: 1 [2] 3 4