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:

Author Topic: Port of modem stats monitoring tools to Raspberry Pi server  (Read 2874 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Port of modem stats monitoring tools to Raspberry Pi server
« on: August 13, 2022, 12:43:33 PM »

I’ve started thinking about a big project which would be the port of my modem monitoring tools from iOS Shortcuts to D (poss mixed with C) running as a service process on the Raspberry Pi. I doubt I’ll have the energy for this, given the current state of my ME/CFS, that’s my worry. I need to find library routines for:
  • http asynch io;
  • asynch timers;
  • event muxing for top loop, so that I can combine asynch timers with asynch io;
  • regexes;
  • some sort of alarm notification mechanism, very much tbs; and, ideally,
  • routines to launch multiple threads or else spawn subprocesses and do IPC.
The last is a nice-to-have, as that way I could query four modems in parallel for a genuine four times speed increase when the tools are run as simple one-off check stats apps, as they are now, as opposed to continuously running service processes that fire off alarms.

Any thoughts about Linux support for the items on my shopping list? Most will be in the standard D runtime libraries already, but I’m not sure about the operating system support (for the ARM64 Linux platform) for some of my wish-list items, should they be found to be lacking in the D libraries. What about asynch io in Linux, also what do events from timers look like?

Any thoughts about alert mechanisms? Either some sort of IPC for reporting alerts to a companion RPi client UI app, or some sort of message from one machine to another over the internet - maybe even standard email alerts or SMS?

If I were to go down the email route, I do not want to have to have config for email service parameters, maybe only an email address with no further service-specific details if I can help it. But all the other details held within something that is external to the application. Is there such a thing in Linux distro <xxx> of a store for high-level preferences for ‘email address for current user’ and ‘email service parameters definition for current user’ ? Or ‘named user’ ? If I were to do the SMS thing, then I’d want to keep secret the parameters relating to the mechanism used to access the service that sends SMS. I am not familiar with the various SMS-to-internet-xxx gateway services, but I think  that AA has just such SMS services associated with its VoIP services and these might be machine-friendly.
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33884
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Port of modem stats monitoring tools to Raspberry Pi server
« Reply #1 on: August 13, 2022, 08:23:50 PM »


DSLstats will run on a Raspberry Pi to collect modem stats from BCM modems such as the Zyxels
http://dslstats.me.uk/index.html

It has the most comprehensive (and best!) suite of line stat monitoring tools.  I think I've mentioned to you several times that I have it set to mail me various alarm states... and other wishlists that youve had when it comes to info about your lines.

What I'm not sure about (as I only have 1 line) is how it would monitor 4 lines in tandem.   I think it can be achieved simply by renaming the .exe file.  As its a stand-alone prog this should be easy to do.   
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Port of modem stats monitoring tools to Raspberry Pi server
« Reply #2 on: August 13, 2022, 10:10:59 PM »

Ah, thank you, my friend, I forgot. :) My memory is completely shot, my friend, all the drugs I’m afraid. It’s a very big problem for me, and a regular source of embarrassment in the forum, :(, although Burrakucat help to keep me straight. The DSLstats alarm feature is excellent then.

My existing main ‘wellness summary’ program gives one three-valued, global single summary result across all modems: all good, minor problem(s) or major problem(s). It integrates the whole of the data for all four modems. It also knows ‘expected value ranges’ too - that is, allowed ranges of values of things such as SNRM down/up per line and min sync rate up/down. The program only shows detailed stats if there’s a problem. I have a different program, stats overview, which combines reasonably detailed stats reports on all four modems, without making any judgements.

So my wellness summary tool’s main purpose is perhaps not the same as that of DSLstats; it’s aim is to make judgements, not to display all the data, and it means that I don’t have to carefully read all the stats for each modem. DSLstats may well be able to do the same, given what you told me about alarms. Mr Johnson’s custom firmware already does approximately what DSLstats does in terms of stats reporting, mind you DSLstats could very well be more comprehensive - I’d need to leave others to judge that.

My wellness summary tool also has HCD detection in it, which of course DSLstats will never have heard of. That’s a valuable test for me as its detection gives a very early warning of impending serious failure, as the HCD severity will build, downstream speed will droop ever lower, eventually to unusable speeds, and then finally the link will start to fail altogether. So with HCD detection, my code is attuned to this particular well-known disease that afflicts me.

So does the rationale make sense ? DSLstats’ ability to run all the time is very important and I need to take a look at it.

However my existing code is very well tuned to what I need and so is Mr Johnson’s custom ZyXEL code. And I need specialist things such as the HCD detection too.

Another point, if I do decide to go for the port, is that writing the code would be a big learning opportunity for me.
Logged

g3uiss

  • Kitizen
  • ****
  • Posts: 1151
  • You never too old to learn but soon I may be
    • Midas Solutions
Re: Port of modem stats monitoring tools to Raspberry Pi server
« Reply #3 on: August 13, 2022, 10:23:02 PM »

I had DSL stats monitoring 2 lines with no issues. The alarms can be configured for every parameter, so in my opinion would solve your monitoring
Logged
Cerebus FTTP 500/70 Draytec 2927 VOXI 4G fallback.

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Port of modem stats monitoring tools to Raspberry Pi server
« Reply #4 on: August 13, 2022, 10:59:10 PM »

Thank you so much, so I need to build a copy or get hold of pre-built binaries for Linux / ARM64.
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33884
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Port of modem stats monitoring tools to Raspberry Pi server
« Reply #5 on: August 26, 2022, 07:20:11 AM »

Instructions are available from the site

http://dslstats.me.uk/installation.html

Quote
Inside the folder, you'll see an executable called dslstats (for Linux and Raspberry Pi) or dslstats.exe (for Windows).........
etc
etc
 


Theres also various discussions about running it on the Pi on the DSLstats forum board
https://forum.kitz.co.uk/index.php/board,46.0.html

and also on the Raspberry Pi board
https://forum.kitz.co.uk/index.php/board,21.0.html


I'm afraid I cant give you Pi specifics as I run mine from a Windows machine, but there are lots of members who do sucessfully run DSLstats on a Pi. 
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker
 

anything