Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: snadge on January 02, 2019, 03:51:09 PM

Title: DSLstats with Raspberry Pi
Post by: snadge on January 02, 2019, 03:51:09 PM
I have a Question about RASPBERRY

I fancy getting a Pi and installing DSL-stats on it and connecting it to my router for 24/7 recording

is it easy to access stats remotely from PC, Phone or Online?  Iam wanting to do what I say above but also be able to access the stats FROM the Pi... what is the best way around this?

thanks in advance
Title: Re: DSLstats with Raspberry Pi
Post by: j0hn on January 02, 2019, 04:59:20 PM
RPi comes with RealVNC built in.
Use a monitor and keyboard/mouse for the initial setup of the RPi then run it over VNC for the rest of its life.
Title: Re: DSLstats with Raspberry Pi
Post by: tiffy on January 02, 2019, 07:38:30 PM
I have a Question about RASPBERRY

I fancy getting a Pi and installing DSL-stats on it and connecting it to my router for 24/7 recording

is it easy to access stats remotely from PC, Phone or Online?  Iam wanting to do what I say above but also be able to access the stats FROM the Pi... what is the best way around this?

thanks in advance

Have at look at this post:
https://forum.kitz.co.uk/index.php/topic,20672.msg360177.html#msg360177

Then subsequent posts in this thread, should hopefully answer most of your questions ref. running RPi's headless, getting auto-start of DSLStats working after a RPi re-boot or power outage and accessing RPi's remotely with VNC..

I currently run two RPi Zero W's with DSLStats remotely at my son & daughters locations on their VDSL2 lines and can fully monitor their router stats and also manage all aspects of the RPi's such as program updates etc., works very well and the VNC program is free for up to 5 remote users.

Have just recently started to upload router stats (via DSLStats) to an on line web server and found that the RPI Zero W's were struggling a bit with the CPU loading, had to restrict the data uploads to snapshots only, I run a RPi 3B on my own VDSL2 line with DSLStats and can cumfortably upload all stats using this, something to bear in mind regarding the choice of RPi model to deploy for your application.
Title: Re: DSLstats with Raspberry Pi
Post by: snadge on January 14, 2019, 01:35:02 PM
thanks will take a look

I have a couple of questions:

1) is there any reason why the QLN graph goes into negative values when none are plotted?

2) I have noticed that the graphs are saved at the resolution they are drawn at on the program, so when I set scaling values the image becomes very soft and loses detail, even when I have DSL-stats open full screen and have it shrink the images down, it seems there is a strong compression algorithm on the PNG files, is there anything I can do to stop this? see example below

(https://i.imgur.com/WjKMFgN.jpg)
Title: Re: DSLstats with Raspberry Pi
Post by: ejs on January 14, 2019, 07:32:08 PM
PNG files use lossless compression. Don't set scaling values?
Title: Re: DSLstats with Raspberry Pi
Post by: kitz on January 14, 2019, 08:42:54 PM
I dont use scaling values (don't think I ever have) and it shows fine.

>> is there any reason why the QLN graph goes into negative values when none are plotted?

Bit confused over this as QLN is negative values.

Title: Re: DSLstats with Raspberry Pi
Post by: tiffy on January 15, 2019, 08:53:55 PM
@snadge

Congratulations in getting the RPi 3B up and running with DSLStats.

Don't know if you have bothered to implement the DSLStats auto-start routine as documented on the forum, I have just updated one of my RPi's from Raspbian "Jessie" to "Stretch" and found that there is a change in the latest "Stretch" revision which certainly confused me when trying to re-instate the auto-start routine.

In Raspbian "Jessie" and the earlier versions of "Stretch" the autostart file resides in /home/pi/.config/lxsession/LXDE-pi folder, lxsession folder no longer exists in this location in the latest "Stretch" revision.
Found there was a lot of confusing and incorrect information regarding this change on the web, what proved to be the correct information was found here: (second last entry in the thread)
https://www.raspberrypi.org/forums/viewtopic.php?t=228199

With latest "Stretch" revision the autostart file now resides in the/etc/xdg/lxsession/LXDE-pi folder. *

With an earlier program revision of "Stretch" on another RPi the autostart file exists in both locations and the auto-start entry certainly still works in the original location.

* Edit: Need to change ownership of the autostart file in this location before editing is permitted.

Title: Re: DSLstats with Raspberry Pi
Post by: j0hn on January 15, 2019, 09:18:17 PM
I simply put a DslStats.desktop file in the /home/pi/.config/autostart/ folder

The contents of the DslStats desktop file is below

Code: [Select]
[Desktop Entry]
Version=1.0
Type=Application
Name=DSLstats
Exec=/home/pi/dslstats/dslstats

This auto stats DslStats perfectly every time the Pi boots up.
Title: Re: DSLstats with Raspberry Pi
Post by: tiffy on January 16, 2019, 11:06:57 AM
Quote
I simply put a DslStats.desktop file in the /home/pi/.config/autostart/ folder

In my case, originally using an old RPi 1B and 2 RPI Z W's I found that a delay was required before starting DSLStats so the autostart file entry pointed to a small script file where the delay was implemented, see original thread on this subject:
http://forum.kitz.co.uk/index.php/topic,20672.msg360466.html#msg360466

From observations of the 3 RPi's in my charge I'am currently running "Jessie", "Stretch" latest version & "Stretch" older version respectively, the /home/pi/.config/autostart folder only exists in the older "Stretch" program version.
Where the /home/pi/.config/autostart folder does exist (older Stretch revision) the folder does not contain an autostart file.
Title: Re: DSLstats with Raspberry Pi
Post by: j0hn on January 16, 2019, 12:15:44 PM
Where the /home/pi/.config/autostart folder does exist (older Stretch revision) the folder does not contain an autostart file.

It doesn't need an autostart file.
Any .desktop file placed in the autostart folder will autostart, it's in the name.

simply offering an easier/neater method
Title: Re: DSLstats with Raspberry Pi
Post by: snadge on January 18, 2019, 06:08:25 PM
I have not reached the stage yet where I install Raspbian lol.. its all ready to go on my 16GB SD Card, iam just waiting on a controller for it to arrive as I can not be bummed to move everything to unplug the USB keyboard & mouse from my PC to Pi to get it running lol... also I need a PSU as ones I have are 2amp not 2.5amp, im in no mad rush to get it running and im new to Linux/Raspbian so blurting out command line stuff to me just goes over my head lol

@ KITZ - sorry I meant the SNR-per-Tone not QLN, as you can see in screenshot below...

(https://i.imgur.com/uquYqtP.jpg)
Title: Re: DSLstats with Raspberry Pi
Post by: j0hn on January 18, 2019, 06:37:44 PM
I power my RPi 3B exclusively from my Zyxel USB port. Never had any issues.
I don't even own a PSU for it  :D

I believe the RPi 3B+ has a higher power consumption so no idea if USB would be sufficient.

edit: https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/

2nd edit: my SNR per Tone goes in to negative values in the D3 band so if the graph didn't show this it would cut off.
Title: Re: DSLstats with Raspberry Pi
Post by: snadge on January 18, 2019, 06:42:18 PM
I power my RPi 3B exclusively from my Zyxel USB port. Never had any issues.
I don't even own a PSU for it  :D

I believe the RPi 3B+ has a higher power consumption so no idea if USB would be sufficient.

edit: https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/

thats exactly what I WAS gunna do originally... as the Zyxel has 2 USB 3.0 ports this equates to a max of 900mA/5V per USB port, I was thinking of getting a dual-USB cable, one that has Micro-USB on one end and TWO standard USB fittings on the other end, allowing for all 1.8A to be used, the 3B+ is supposed to have 2.5A but may run on less, i got it lit up and seemingly operational on a 2A/5V mobile charger
Title: Re: DSLstats with Raspberry Pi
Post by: tiffy on January 18, 2019, 07:35:17 PM
Ref. running RPi's from router USB ports:

I previously carried out some very basic, comparative and likely not very accurate tests on power consumption of an RPi 3B and 3B+ results as per post link:

https://forum.kitz.co.uk/index.php/topic,21194.msg368574.html#msg368574

I run my 2 RPI ZW's from their respective Billion routers USB ports but prefer to run my RPi 3B from a PSU which in my case is UPS connected, from J0hn's experience the RPi 3B is happy running on the ZyXEL USB power, I would certainly prefer to power a RPi 3B+ from the recommended PSU as power consumption is definately higher, your choice.

Title: Re: DSLstats with Raspberry Pi
Post by: snadge on January 18, 2019, 10:57:08 PM
aye after looking at your tests results I feel confident I can power it on 1.8A - assuming that Zyxel HAS complied with USB standards and allows 'upto' 900mA draw on each USB 3.0 port, using such a cable I mentioned before means I should be able to get more than enough power to the Pi for the sake of DSL-stats only

what is Raspbian Stretch?

do you have any advice for noobs? - I have setup a Pi before with Raspbian and LibreELEC but I didnt get far after install as the controller was naff
Title: Re: DSLstats with Raspberry Pi
Post by: Westie on January 18, 2019, 11:23:34 PM
"Stretch" is the name of the latest Raspbian version (derived from Debian 9). The previous version was "Jessie".

One of the useful things about Stretch is that RealVNC Server is included, so you can easily monitor and control your Pi headlessly. I am a complete noob with linux, but now have one Pi ZeroW running DSLstats, and another acting as a print server (which also makes the printer available to our iPads).

Title: Re: DSLstats with Raspberry Pi
Post by: Weaver on January 19, 2019, 01:28:03 AM
[apol, mea culpa. I should split this off into an appropriate separate thread, admins.]

This is my problem: I too need to get a Pi set up so that I can access it remotely - ‘headless mode’. But I don’t have the tools and I can’t do it in bed. Also I don’t know how to choose a good card to go with it. I bought a Pi with a rubbish card before which did work but the card was very small and not durable then I broke the o/s by accident. Then I bought a card which was the wrong type, so I was told, h/w-incompatible. Then I was stuck.

Perhaps I could buy another Pi that comes with a good card and a good o/s -reinstalled. Buy the expertise and labour included as part of the package.

Ideally I would get an Aarch64 o/s installed as then I could practise some 64-bit Aarch64 modern asm. (Being an old long-time asm  programmer at work.)
Title: Re: DSLstats with Raspberry Pi
Post by: tiffy on January 19, 2019, 01:03:28 PM
@snadge:

"Stretch" already explained by Westie.

"Noobs" is a packaged Raspbian version aimed at RPi beginners, contains a lot of program options that you won't need or use in DSLStats service, you can certainly use this if you wish opting to load Raspbian at startup.

"Stretch" is available for free download here:
https://www.raspberrypi.org/downloads/raspbian/

As a Windows user I prefer to use the desktop GUI program option, works very well with DSLStats, have run this on RPi 1B, 3B, 3B+ and ZW's without any issues accepting the CPU limitations of the older RPi and the ZW's especially when data & webserver uploading is utilised.

I use a 16 Gb. memory card flashed in a Win. environment with either Win32DiskImager or balenaEtcher utilities, very easy process using the downloaded, extracted file image.
When you finalise your RPi/DSLStats setup, I would advise that you make an image of your memory card as they do have a finite life span, (relative to the quality of card you buy) I have had a few failures, it's then much easier to re-flash a replacement and get going again.

Regarding USB port current supply capability:
I have always thought that 500 ma. was the advised supply limit, certainly with USB-2 standard, has this increased to 900 ma. with USB-3 ? 
Title: Re: DSLstats with Raspberry Pi
Post by: ejs on January 19, 2019, 02:40:40 PM
According to the Zyxel website, the VMG8924-B10A has USB 2.0 ports, not USB 3.0.
Title: Re: DSLstats with Raspberry Pi
Post by: tiffy on January 19, 2019, 03:07:46 PM
Quote
According to the Zyxel website, the VMG8924-B10A has USB 2.0 ports, not USB 3.0.

Yes, had a feeling that was the case, the VMG1312-B10A also has one USB-2 port.
Having googled the USB-2/3 ports specifications, found that USB-3 does indeed support up to 900 ma. current sourcing, USB-2 being only 500 ma., every days a school day !
Title: Re: DSLstats with Raspberry Pi
Post by: Westie on January 19, 2019, 03:38:24 PM
[apol, mea culpa. I should split this off into an appropriate separate thread, admins.]

Ideally I would get an Aarch64 o/s installed as then I could practise some 64-bit Aarch64 modern asm. (Being an old long-time asm  programmer at work.)

AFAIK there is no "official" 64-bit o/s for the Pi, and developing one is not a priority for the Raspberry Pi Foundation. The only working o/s I can find reference to is on GitHub, here (https://github.com/bamarni/pi64), but it's all way over my head.

Unfortunately I think it's unlikely you will find an Aarch64 o/s ready-installed on a card for the Pi anywhere at this time. Sorry.
Title: Re: DSLstats with Raspberry Pi
Post by: ejs on January 19, 2019, 03:58:48 PM
I run Fedora on my Pi 2. There's Aarch64 Fedora for the Pi 3/3+.
Title: Re: DSLstats with Raspberry Pi
Post by: Westie on January 19, 2019, 04:08:07 PM
That shows how much I know!  :paperbag: