Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: kitz on March 15, 2018, 08:21:14 PM

Title: DSLstats webserver - Custom Interface
Post by: kitz on March 15, 2018, 08:21:14 PM
A couple of days ago I mentioned in this thread (http://forum.kitz.co.uk/index.php/topic,21193.msg367603.html#msg367603), that I'd been playing with a custom html interface for the dslstats inbuilt webserver display.
The custom interface displays all graphs but just outputs them in to more logical groups, that can be tabbed through.
I've had a request if I could make these files publicly available for use, so I've quickly packaged them together in a zip file attached below.

(https://kitz.co.uk/temp/linestat_interface.jpg)

All the live stats work and update every minute.  Working example can be viewed here (https://kitz.co.uk/linestats/index.htm).
I'm using WinSCP (https://winscp.net/eng/index.php) to automatically FTP graphs from DSLstats (http://dslstats.me.uk/) to a remote website.

Output is as follows:

Please note:  The history section requires PHP to run and the output graphs work perfectly well by synchronising with local machine folders, but in time it would require a more robust FTP script to handle file management of older files.
As there has been little interest and zilch feedback in this section I stopped development after I got it to do what I needed (historic SNRM & errors).  My original aim was that it would only upload latest graphs in the relevant local folders and delete older files on the remote server to keep hosting bandwidth to a minimum.

The relevant files are included in the attached zip file if you want to make use of them yourself.

More info about History Section

By default history section expects files to be stored in categories eg SNRM/CRC etc .  This is because it's the way I have my system set up to store on my local machine and it was more logical (for me) to replicate this method on the remote server.

If you prefer to have snapshots in daily folders, then Jelv has written a cron script which creates symlinks to files in daily folders.   His script can be found in this post here (https://forum.kitz.co.uk/index.php/topic,21237.msg388420.html#msg388420).


+++++++++++++++++++++++++++++++
Update 08/06/2018 v2 released

Cosmetic changes to slightly improve layout.   
Added a container in the CSS to segment various sections to make it easier to drop more code into the body <div> 


CONTENTS OF FOLDER
++++++++++++++++++

css.css
connection.htm
errors.htm
fullstats.htm
index.htm
line.htm
snrm.htm
history.php
README.txt


---

+++++++++++++++++++++++++++++++
12/06/2018 - .asp version of the history page for Windows servers

g3uiss (https://forum.kitz.co.uk/index.php?action=profile;u=7826) has developed an asp version of the history page for anyone running a windows server and is kindly making his aspnet scripts available for download.
These files are attached below as g3uiss_asp_version.   

You will still need the contents of DSLstats adv_web_interface, just replace the php file with the asp ones.

Downloads v1 = 58.  v1.1 = 24
Title: Re: DSLstats webserver - Custom Interface
Post by: hacktrix2006 on March 15, 2018, 08:49:24 PM
Thanks kitz for the package very greatful
Title: Re: DSLstats webserver - Custom Interface
Post by: pooclah on March 16, 2018, 03:00:16 PM
Thank you – looks great and far better than anything I could have done.

Kevn
Title: Re: DSLstats webserver - Custom Interface
Post by: g3uiss on March 16, 2018, 05:02:16 PM
Great work. Thanks Kitz

Tony
Title: Re: DSLstats webserver - Custom Interface
Post by: vic0239 on March 16, 2018, 06:28:46 PM
Many thanks Kitz, a vast improvement on my efforts.

Andy.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on March 16, 2018, 08:15:41 PM
Many thanks to kitz for the development work on this project.

For someone not familiar with the Webserver capabilities of DSLStats can I possibly enquire:

1) Will this work in a RPi program environment.

2) What do I need to select in the DSLStats Webserver window to correctly activate the process.

3) Extract from README file.
++++++++++++++++++
INSTALLATION
++++++++++++++++++

Drop files into existing DSLstats webstats folder located at  dslstats>webserver

Q.) I don't have a webserver folder even after enabling Webserver, assuming I have done this correctly !

While these questions probably appear very basic to the more informed forum members I would suspect that many of the less informed members, myself included may be potentially confused.

Edit:
Have now discovered (from the DSLStats Event Log) that the "webserver" folder is created in /home/pi/.dslstats in a RPi program environment, in my case /home/pi/.dslstats/snapshots/webserver as I added a "snapshots" path, was looking in the /home/pi/dslstats (not .dslstats) folder where the program files reside.
With the kitz files now copied to there still none the wiser how to proceed further ?
Title: Re: DSLstats webserver - Custom Interface
Post by: vic0239 on March 16, 2018, 09:24:00 PM
Just point your browser at http://ip.of.pi/dslstats/stats.htm (insert your
Pi’s ip address). That works fine for both of mine.
Title: Re: DSLstats webserver - Custom Interface
Post by: hacktrix2006 on March 17, 2018, 05:15:05 AM
Its running great on my Raspberry Pi 1 B

http://solidus1983.mynetgear.com:65508/index.html

Loving it although I think I need a new Pi to sick my fingers in DSLStats murders my CPU right now.

Sent from my SHIELD Tablet K1 using Tapatalk
Title: Re: DSLstats webserver - Custom Interface
Post by: roseway on March 17, 2018, 10:33:46 AM
I've tried this out on my Linux system, and it works perfectly. It's a very nice enhancement.

Just so you know, I'm currently working on the webserver, but what I'm doing won't conflict with this. I'm adding the options for the user to choose where to save the webserver files, and to save them even when the webserver itself isn't running.
Title: Re: DSLstats webserver - Custom Interface
Post by: krypton on March 17, 2018, 10:40:18 AM
I think I need a new Pi to sick my fingers in DSLStats murders my CPU right now.

To reduce the CPU usage you can disable monitoring "SNR per tone" and "Bitloading". With this options disabled dslstats cpu time gets reduced to a quarter on my Rpi 1 B+.
Title: Re: DSLstats webserver - Custom Interface
Post by: hacktrix2006 on March 17, 2018, 12:30:10 PM
To reduce the CPU usage you can disable monitoring "SNR per tone" and "Bitloading". With this options disabled dslstats cpu time gets reduced to a quarter on my Rpi 1 B+.
Thanks for the info will have a fiddle but SNRM graph I need as well as bitloading however its working great now.

Best of all if anything breaks I scripted the whole install setup for xrdp custom with fuse and xfce4. Then all I have to do is unzip some files for dslstats, set it up config wise then change raspi-config to auto boot GUI + login, boom dslstats runs automatically and rdp is blocked from use.

Sent from my SHIELD Tablet K1 using Tapatalk

edit: @morphium thanks for the tip its working great @roseway can't wait for that addon to dslstats

Also i thought with @kitz sharing his stuff i thought i'd share my script for setup DSL stats with RDP via xrdp.

Just remember that upon first boot and login run
Code: [Select]
sudo raspi-config

Then change password from raspberry to whatever with option (1), followed by going to Advance Options (7) and expanding the volume (A1), the reboot.

Re-log back in then use

Code: [Select]
pico setup.sh

then Copy and paste in

Code: [Select]
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get clean
sudo apt-get -y install --no-install-recommends xserver-xorg
sudo apt-get -y install --no-install-recommends xinit
sudo apt-get -y install xfce4 xfce4-terminal
sudo apt-get -y install rc-gui
sudo apt-get -y install libgl1-mesa-dri
sudo apt-get -y install xserver-xorg-legacy xserver-xorg-core xfonts-base x11-xserver-utils
sudo apt-get -y install libx11-dev libxfixes-dev libssl-dev libpam0g-dev libtool libjpeg-dev flex bison gettext autoconf libxml-parser-perl libfuse-dev xsltproc libxrandr-dev python-libxml2 nasm xserver-xorg-dev fuse git
sudo apt-get -y install git pkg-config gcc g++ make libxrandr-dev libxml2-dev intltool xsltproc xutils-dev python-libxml2 g++ xutils libmp3lame-dev libpixman-1-dev
BD=`pwd`
mkdir -p "${BD}"/git/neutrinolabs
cd "${BD}"/git/neutrinolabs
wget https://github.com/neutrinolabs/xrdp/releases/download/v0.9.5/xrdp-0.9.5.tar.gz
wget https://github.com/neutrinolabs/xorgxrdp/releases/download/v0.2.4/xorgxrdp-0.2.4.tar.gz
cd "${BD}"/git/neutrinolabs
tar xvfz xrdp-0.9.5.tar.gz
cd "${BD}"/git/neutrinolabs/xrdp-0.9.5
./bootstrap
./configure --enable-fuse --enable-mp3lame --enable-pixman
make
sudo make install
sudo ln -s /usr/local/sbin/xrdp{,-sesman} /usr/sbin
cd "${BD}"/git/neutrinolabs
tar xvfz xorgxrdp-0.2.4.tar.gz
cd "${BD}"/git/neutrinolabs/xorgxrdp-0.2.4
./bootstrap
./configure
make
sudo make install
sudo systemctl enable xrdp
sudo sed -i \
    's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
sudo systemctl restart xrdp.service
sudo sysctl -w vm.swappiness=15
sudo sysctl -w vm.vfs_cache_pressure=50
sudo sysctl -w vm.dirty_background_ratio=15
sudo sysctl -w vm.dirty_ratio=20
sudo reboot

Press CTRL+O (this is to write the file), followed by CTRL+X to close it then issue the following commands
Code: [Select]
chmod +x setup.sh
./setup.sh

This will then setup up your raspi with everything needed to use Microsoft RDP into the Desktop, once its done its reboot simply go back into ssh log back in and then type

Code: [Select]
sudo raspi-config

Then select Boot Options (3) , then Desktop / CLI (B1) , then select Desktop (B3). then exit it the raspi-config and reboot again. You can then dial into RDP and copy and paste files via clip board from your host computer.

Once you have finished you can then block rdp but simply going back into raspi-config and changing the Boot option for Desktop to Desktop Auto Login (B4). This will then kick the RDP out when you try to RDP in.

If you need to RDP back in just change the Boot option back to Desktop option B3 and reboot once more.

Hope this helps.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on March 17, 2018, 09:06:07 PM
Just point your browser at http://ip.of.pi/dslstats/stats.htm (insert your
Pi’s ip address). That works fine for both of mine.

Apologies in advance for my lack of knowledge on this subject, I still can't produce the "kitz" interface on my RPi 1B setup running DSLStats, I think the issue is to do with file locations on my RPi ?

The current DSLStats program files are situated in /home/pi/DSLStats/dslstats32RPi-6.3
The program has created the webserver folder in /home/pi/.dslstats/snapshots/webserver
Note: I previously added the "snapshots" folder path in the "snapshots directory" option of DSLStats configuration just for clarity.
As per the instructions in the kitz "readme.txt" file I have copied the 8 new files to the "webserver" folder.

Quote
Just point your browser at http://ip.of.pi/dslstats/stats.htm

In my case the "stats.htm" file resides in the /home/pi/.dslstats folder.
Opening this with the RPi, Raspbian Jessie default browser, Chromium, produces the new kitz interface but with no data.
(no requirement for provision of RPi's IP address)

Opening the *.html files resident in the /home/pi/.dslstats/snapshots/webserver folder with RPi's Chromium browser just produce graph snapshots, no kitz interface.

As I said, I believe the issue is with file locations, any suggestions welcome.

Title: Re: DSLstats webserver - Custom Interface
Post by: Westie on March 17, 2018, 09:22:54 PM
What happens if you move the stats.htm file into the /home/Pi/.dlstats/snapshots/webserver directory?
Title: Re: DSLstats webserver - Custom Interface
Post by: pooclah on March 17, 2018, 09:34:52 PM
I have it running by copying the files to /home/pi/.dslstats/webserver


Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on March 18, 2018, 01:20:57 PM
@pooclah and Westie:
Thanks to both for your interest.
Yes, as suspected, the issue was with file locations, deleted the "snapshots" folder and changed the snapshots storage path back to default /home/pi/.dslstats.
The kitz webserver interface now opens in Chromium browser and displays the relevent data.

My RPi Mk.1B really struggles with the webserver interface as would be expected, CPU running at 100% usage most of the time, have not tried running on my RPi Zero W's as yet, would likely cope slightly better.
Have changed to running DSLStats on a RPi 3B with Wi-Fi link which is a much faster experience, have ordered a just released RPi 3B+ just to compare the performance and for future project reference.

Many thanks to kitz for the hard work on the project and providing public release also roseway for his continuing development of DSLStats.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on March 18, 2018, 05:51:51 PM
Anyone any ideas on creating a desktop shortcut on RPi 3B running Raspbian Jessie to fire up the kitz webserver interface ?

I can double click the /home/pi/.dslstats/webserver/stats.htm file, or indeed any of the *.htm files which will start the webserver application within Chromium browser but can't get the correct syntax to achieve this from a desktop shortcut, with any of the *.htm files nominated as "exec" within the desktop shortcut nothing happens !

I'am sure there must be a way of nominating a browser for file execution from within a DT shortcut ?   
Title: Re: DSLstats webserver - Custom Interface
Post by: marjohn56 on March 19, 2018, 05:42:09 PM
A quick addition to Kitz work, add your TBB image like so. I've added mine in connection.htm, Open it in a text editor or whatever you prefer.... leave for the moment.

Now web browse to your TBB monitor page on the TBB site. Under your monitor image, click on 'Share Live Graph', Copy the link under Large Graph.

Now back to the editor,

Below <div class="graphs"> add the link. It should end up like this.

Code: [Select]
<div class="graphs">
   <h2>TBB Latency Monitor</h2>
   <a title="Broadband Ping" href="https://www.thinkbroadband.com/broadband/monitoring/quality/share/6e567f1077924e50f24ca309ba78976a"><img alt="My Broadband Ping - QP IPv6" src="https://www.thinkbroadband.com/broadband/monitoring/quality/share/6e567f1077924e50f24ca309ba78976a.png" hspace="20" /></a>

  <h2>Connection Speed</h2>
  <img alt="Connection Speed" src="connspeed.png" hspace="20"><br><br>
 
  <h2>Bit Loading</h2>
  <img alt="Bitloading" src="bitloading.png" hspace="20"><br><br> 
</div>

Note that in the example above there is a hspace="20" towards the end of the TBB line, this is to bring it into line with the other images.

Save, open the connection page in your browser and you should have your TBB image, if you've got mine you've copied the example!  :cool:

Title: Re: DSLstats webserver - Custom Interface
Post by: jaydub on March 20, 2018, 12:25:26 AM
Tweaked mine slightly to reduce it to just the <img alt= part, but great addition.  Thanks, marjohn56.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on April 18, 2018, 07:36:58 PM
A couple of days ago I mentioned in this thread (http://forum.kitz.co.uk/index.php/topic,21193.msg367603.html#msg367603), that I'd been playing with a custom html interface for the dslstats inbuilt webserver display.
The custom interface displays all graphs but just outputs them in to more logical groups, that can be tabbed through.

I've had a request if I could make these files publicly available for use, so I've quickly packaged them together in a zip file.
Please note, it's nothing particularly fancy and the history section isn't yet complete as I'd need to install PHP on my local machine and this section isnt yet working.

The relevant files are all included in the attached rar file if you want to make use of them yourself. 


CONTENTS OF FOLDER
++++++++++++++++++

css.css
connection.htm
errors.htm
fullstats.htm
snrm.htm
stats.htm
history.htm
README.txt


@kitz:

Noted in one of your later links that you have made some further progress in the "history" tab but the original files posted on 15/03/18 have not yet been updated, would it be possible to update, I have very limited knowledge of the system but presume that only an updated "history.htm" file would be required.

Fully understand if you prefer to complete the project, time permitting, before re-posting or indeed just don't have the time at present to carry out further development.

Your efforts on this project to produce some form of local MDWS substitute are very much appreciated certainly by the less knowledgable forum members like myself who don't have the necessary technical ability. 
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on April 18, 2018, 07:44:00 PM
I've tried this out on my Linux system, and it works perfectly. It's a very nice enhancement.

Just so you know, I'm currently working on the webserver, but what I'm doing won't conflict with this. I'm adding the options for the user to choose where to save the webserver files, and to save them even when the webserver itself isn't running.


right now me martin and skyeci are using these files to upload to my webserver once a minute, I had planned to request a couple of things from you related to this such as using the built in ftp uploader to upload these web files, and to be able to set the interval so e.g. every 5 mins for the upload.

The graph generation server side for a proper MDWS replacement is probably a while off so these graphs will work well in the mean time.

When I have fully integrated kitz code to my graphs and settled on it, I will add the link to my graphs in my signature so they public.

If Martin is ok with it on the domain I can probably actually host anyone's graphs just making an ftp account, providing in PM and they upload, then the graphs are public not just just for private use.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on April 19, 2018, 11:33:56 AM
@Chrysalis:

Many thanks for the update, I eagerly await further developments.

I currently use "broadstairs" web, php based system which he has kindly made available on request to forum members, running on my Win. 8.1 desktop PC via Apache server, manually uploading my 3 RPi's (different lines) historic graph and data files on a 2 day basis, works very well but will still be keen to review any future alternative systems.
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on April 19, 2018, 03:45:00 PM
yes he provided to me as well and I have yet to have a look at it, so there is 2 different system right now available which is great, the bit I am trying to bring together is the public access again for shared knowledge, php is not a problem on my server.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on April 28, 2018, 12:01:13 AM
@kitz:

Noted in one of your later links that you have made some further progress in the "history" tab but the original files posted on 15/03/18 have not yet been updated, would it be possible to update, I have very limited knowledge of the system but presume that only an updated "history.htm" file would be required.

Fully understand if you prefer to complete the project, time permitting, before re-posting or indeed just don't have the time at present to carry out further development.

Your efforts on this project to produce some form of local MDWS substitute are very much appreciated certainly by the less knowledgable forum members like myself who don't have the necessary technical ability.

Sorry didn't see this earlier - my hands have been too bad to type.  Yes I mentioned in another thread that I'd been doing more work on it, but as no-one else seemed interested in running from a remote site I stopped any further development and this was about as far as I got.
https://kitz.co.uk/linestats/

Title: Re: DSLstats webserver - Custom Interface
Post by: roseway on April 28, 2018, 06:53:09 AM
I'm just about to release a test version of DSLstats which adds the capability to upload all the webserver files (including this extension if it's there) to a remote location of the user's choice.

At present it uploads after every sample, but if different timing is needed that can certainly be arranged.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on April 28, 2018, 08:30:50 AM
@kitz:
Thanks for the update, fully appreciate you situation with typing difficulty at present, hope this improves soon.
As you can see earlier in the thread, Chrysalis did provide an update on his, Martin and skyeci's project progress.

@roseway:
Thanks to you also for the DSLStats update and for your continuing work on the program.
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on April 28, 2018, 08:53:44 AM
I have merged stuart's code onto kitz's code to get a solution that takes advantage of both, but its not my work to distribute, but I will post a link to my stats after I or stuart enhance the security of the code, e.g. viewing historical eventlog reveals the broadband ip so I need to remove that facility before I post the link.

Then people can see where we at, but its basically the same as what kitz posted since its using her templates with the addition of a more functional history page.

On my setup the graphs are been automatically synced every minute using winscp cli via a batch script on task scheduler and also a second batch script to upload the snapshots just after midnight.  Eric after my request kindly added native support to dslstats tho so winscp or any other ftp client wont be needed in future.

I have also almost completed a linux script to mass rename files to support the history code, so e.g. if you have snapshots in date order, it will rename them en mase to name order so they work on the history page.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on April 28, 2018, 09:14:48 AM
works great I might add. :). Mine is doing the same with uploads and snapshots
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on April 28, 2018, 09:31:43 AM
Mass rename is done, check your history page skyeci, I moved the graphs there.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on April 28, 2018, 09:33:07 AM
sweet. got all my old stats back up on line. happy days.

Thanks a bundle  :)
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on April 28, 2018, 09:55:46 AM
Just to pick up in the security bit and IP addresses. I originally created my scripts to be run locally where there would be no security issue however if people want a version which does not display the IP address when viewing the event log then I'll take a look to see how I can achieve this easily. Currently the script simply loads the file contents and displays it, so in order to achieve this it will need some re-writing and expansion of the code to check the data.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on April 28, 2018, 10:14:09 AM
yeah, I planned to simply just remove the eventlog option so it doesnt appear in the file list, I dont know why that would be needed for viewing remote stats.

I was going to add a debug flag at start of the script, so if its set to 1, it effectively runs as is now, and if 0, it hides eventlog, and also hides the displayed path to files.

If you ok with that then I will leave it to you. :)
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on April 28, 2018, 10:27:55 AM
Yes I'll make some changes later over the weekend.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on April 29, 2018, 11:23:37 AM
I have today sent chrysalis the updated code for displaying the archived images and text files from DSLStats for him to test, this has an option to remove the event log from display as it can contain your external IP address.

I have also sent him another script which displays data selected from the stats.log file created by DSLStats (note that for valid SES display you need DSLStats 6.5.2 or above). This will display a graph on the web browser using javascript. The js program used is very powerful and allows the user to zoom in to the graph and then pan through it rather like MDWS used to do. Note that this second script is still being expanded to add data to display.

If anyone else would like a copy of either script to test please PM me.

Stuart

Edit: Should have mentioned - please supply an email if you want the scripts.
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on May 01, 2018, 10:13:42 AM
I have been working on my scripts some more and now have a version of the script which display graphs built from the stats.log file created by DSLStats which is customised in a similar fashion to Kitz' original. Only the Historical statistics are available right now. This is in part thanks to skyECI who started the idea. If you want to run this script locally you will need a web server running which has PHP available (the cut down server built into DSLStats does not support this understandably). PM me if you would like a copy. Also if you would like to see more data options please tell me your suggestions.

I have a version with very limited data available on my web sit at https://www.stella-maris.org.uk/Stats.php (https://www.stella-maris.org.uk/Stats.php) but should give some idea of its functionality. The graph will resize automatically if you resize the window. Also if you mouseover the graph some small icons appear top right which allow you to manipulate the graph by zooming and panning etc.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on May 01, 2018, 11:13:18 AM
If anyone wants to have a look at snapshots, dsl stats.log  and live data  I am uploading then please do. All a bit of team effort, thanks to those who have helped along the way...:)

https://www.team-rebellion.net/Ned/connection.htm

I also have my old snapshots converted over and Stuarts new zooming chart tool is there too.

I am using windows 10 pc and winscp with 3 scripts to upload all the data on to Chris's server

Title: Re: DSLstats webserver - Custom Interface
Post by: jaydub on May 02, 2018, 08:27:56 PM
Sorry didn't see this earlier - my hands have been too bad to type.  Yes I mentioned in another thread that I'd been doing more work on it, but as no-one else seemed interested in running from a remote site I stopped any further development and this was about as far as I got.
https://kitz.co.uk/linestats/
Hi Kitz,

Any chance of a zip file of your linestats pages, please.  I am using your original version with a minor tweak and would like to upgrade to this version.

Thanks.
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on May 02, 2018, 08:54:56 PM
I have made some more changes, mainly cosmetic, to my version of the DSLgraphs and Stats script. they can be view at https://www.stella-maris.org.uk/DSLgraphs.php (https://www.stella-maris.org.uk/DSLgraphs.php) and https://www.stella-maris.org.uk/Stats.php (https://www.stella-maris.org.uk/Stats.php). I would really appreciate some feedback on them, both positive and negative. BTW they do link to each other from the top menu. Currently they do not display the live graphs from DSLStats but that could possibly be added if needed but these are available from the DSLStats built in web server anyway.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: g3uiss on May 02, 2018, 10:41:57 PM
Stuart

These are great. Are you likely to put the scrips in the public domain ? I able to update the files to my web server and have PHP

Tony
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on May 02, 2018, 11:05:19 PM
Certainly I will make them available. Right now I'd like a few folks to test them out to make sure I have no major bugs in them, I think they are OK but no software is usually totally bug free. If anyone right now would like a copy please PM me with an email address I can send them to. The Stats script needs a javascript program to be downloaded and placed on the server. I used javascript to offload the actual graphing to the web browser, plus the graphs can be zoomed and scrolled without needing to use the server. I'll give the detailed information to anyone as to what's needed when I send the scripts.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on May 05, 2018, 01:18:53 AM
Looks very good Stuart, sorry I havent responded the past few days.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on May 05, 2018, 11:55:39 PM
Hi Kitz,

Any chance of a zip file of your linestats pages, please.  I am using your original version with a minor tweak and would like to upgrade to this version.

Thanks.

Updated the attached file in first post.   There's several changes which are mostly cosmetic to layout. 
All files have been updated with the newer menu which is IMHO more logical than the previous one.

I've been using the new layout for quite a while so some of you will have already seen it, but if not it can be viewed here (https://kitz.co.uk/linestats/index.htm).

Re history - I've not included that file as although the php is working on my version, I still need to develop a script which will only upload selected history files to the remote server automatically.  If anyone's DSLstats folder is like mine you'll have years worth of files and I'd hate anyone to upload a zillion image files and use up a ton of bandwidth.
I've been running a WinSCP script to FTP the current files and that is working well..   what I haven't had time to do is a script that will FTP the history files correctly. (which is why mine only shows some history for SNRM, Err/Sec & CRC)
Title: Re: DSLstats webserver - Custom Interface
Post by: burakkucat on May 06, 2018, 12:15:24 AM
I've been using the new layout for quite a while so some of you will have already seen it, but if not it can be viewed here (https://kitz.co.uk/linestats/index.htm).

That is looking really good.  :thumbs:

(A brief parenthesised comment: Both your Hlog and QLN plots ("Line Health" tab) are displaying sub-carriers > 4095 . . . which is meaningless for G.993.2 Profile 17a.)
Title: Re: DSLstats webserver - Custom Interface
Post by: Browni on May 06, 2018, 12:43:23 AM
Thanks Kitz!

My live graphs are here (http://stats.browni.co.uk) including your latest update.

For reference I'm running the latest docker version of DSLstats pointing the output to a share that is within the scope of the Apache server running on on my QNAP NAS  :graduate:
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on May 06, 2018, 12:51:05 AM
I have made some more changes, mainly cosmetic, to my version of the DSLgraphs and Stats script. they can be view at https://www.stella-maris.org.uk/DSLgraphs.php (https://www.stella-maris.org.uk/DSLgraphs.php) and https://www.stella-maris.org.uk/Stats.php (https://www.stella-maris.org.uk/Stats.php). I would really appreciate some feedback on them, both positive and negative. BTW they do link to each other from the top menu.
Stuart

Well done :)   Just noticed though that you appear to be at the stage where I got to for DSLstat graphs in that you haven't yet managed to auto FTP update for history.  That was the point at which I stopped as I really thought no-one else was interested in running from a remote website and had no feedback at all.
Slight difference between ours is that mine runs on graph folders rather than date only because that's the way I stored them locally. 

Good job on the javascript graphs  :)

Quote
Currently they do not display the live graphs from DSLStats but that could possibly be added if needed but these are available from the DSLStats built in web server anyway.

I've already done that and FTPing current stats for running remotely.  Hate to sound like I'm doing the sour grape thing (and yeah I admit it is), but I have had absolutely zero interest in what I had done.   Not a single comment in any of the various threads where I said I'd got something working for running on a remote website since March.  Which is why I thought I was wasting my time developing an FTP version of historic and stopped as soon as I'd done only what I wanted (historic CRC, Err/Secs and SNRM) for my own line.   
I can only assume that no-one had actually looked at what I had done and what I had got working several weeks ago (https://forum.kitz.co.uk/index.php/topic,21305.msg369052.html#msg369052).    I think about the only comment I did get is saying they werent interested in running off a hosted site.      :'(

 
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on May 06, 2018, 12:53:23 AM
Thanks Kitz!

My live graphs are here (http://stats.browni.co.uk) including your latest update.

For reference I'm running the latest docker version of DSLstats pointing the output to a share that is within the scope of the Apache server running on on my QNAP NAS  :graduate:

Excellent.   Thanks for the feedback :)

PS - you may want to edit the files for the header and put your name in :)
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on May 06, 2018, 01:00:16 AM
That is looking really good.  :thumbs:

(A brief parenthesised comment: Both your Hlog and QLN plots ("Line Health" tab) are displaying sub-carriers > 4095 . . . which is meaningless for G.993.2 Profile 17a.)

DSLstats was running in default mode for VDSL2 :/   
I've had to change it to custom to get rid of the surplus tones, so thanks for pointing it out. 
Title: Re: DSLstats webserver - Custom Interface
Post by: Browni on May 06, 2018, 01:23:17 AM
PS - you may want to edit the files for the header and put your name in :)
Nah, leave your name for now, my name is in the web address!
Title: Re: DSLstats webserver - Custom Interface
Post by: burakkucat on May 06, 2018, 01:29:06 AM
DSLstats was running in default mode for VDSL2 :/   
I've had to change it to custom to get rid of the surplus tones, so thanks for pointing it out.

I have to do likewise for G.992.3 (ADSL2).  :)
Title: Re: DSLstats webserver - Custom Interface
Post by: roseway on May 06, 2018, 06:44:51 AM
The preset tone ranges are only approximations for practical reasons (programming convenience really). They actually define a number of pixels horizontally, so the optimum settings will depend on the size of the DSLstats window.
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on May 06, 2018, 10:48:00 AM
I have started my own thread for my scripts. It can be viewed at https://forum.kitz.co.uk/index.php/topic,21488.0.html (https://forum.kitz.co.uk/index.php/topic,21488.0.html). I've done this for two reasons, first to separate them from here and stop distracting folks from Kitz' script and second to make life easier for me to track stuff going on with them. So please from now on post in my thread when discussing my scripts.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on May 13, 2018, 02:46:11 PM
I been real busy but disabled the IP leak part of the history page, page is now in my sig.

My stats show dslstats graphs, history graphs, and tbb graphs.  This is using kitz's code except for the history page which is Stuart's code.

They do not include Stuart's newer stuff yet, although I think Ned is using his new scripts now.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on May 13, 2018, 02:51:04 PM
nice.. :)

I have snapshots including historical stuff thanks to Chris. tbb, Stuart's new zoom tool/script  and live data .

https://www.team-rebellion.net/Ned/stats.htm


Title: Re: DSLstats webserver - Custom Interface
Post by: pooclah on May 13, 2018, 06:22:07 PM
Interesting stuff – thanks for showing it.

Time has been against me lately so I’ve only managed to get the webserver files uploading from my pi3 to a VPS using rsync.  When I get some time I will look into the history part.

Here are my efforts so far https://www.pooclah.net/dslstats/ (https://www.pooclah.net/dslstats/)

Thanks to Kitz for the original files.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on May 13, 2018, 06:44:25 PM
nice. One of my other lines is on a pi3. Can you share how you have done it from the pi3.

cheers
Title: Re: DSLstats webserver - Custom Interface
Post by: pooclah on May 13, 2018, 07:22:23 PM
I did it the lazy way which will be frowned upon by some, but I’m the only one with access to the pi and then only from my home network.

I installed sshpass (https://www.cyberciti.biz/faq/noninteractive-shell-script-ssh-password-provider/)

From the terminal ran sshpass -p ssh_password rsync -aP/home/pi/.dslstats/Webserver/ user@domain.net:/path/to/dslstatsfolder just to be able to accept the certificate on first use.

Then set up a task to run the command every minute using this (https://www.raspberrypi.org/documentation/linux/usage/cron.md).

The information I used started from reading here (https://unix.stackexchange.com/questions/111526/rsync-without-prompt-for-password?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa), there are other ways.

Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on May 18, 2018, 12:39:16 AM
when the new dslstats is released Ned, you can just add sftp account to it and upload to the server as is now.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on June 02, 2018, 05:33:29 PM
Here's my pi3 setup with fully automated DSL stats uploads to our TR server and it uses Stuart's new scripts for viewing data,see dsl stats files & historical tabs.

automated Pi3 (https://www.team-rebellion.net/bmax)
Title: Re: DSLstats webserver - Custom Interface
Post by: sotonsam on June 04, 2018, 09:09:30 PM
Really good bit of software, with the associated web interface it makes it really easy to monitor both at home and away. Thanks for spending your time on developing it as it has really opened my eyes up to my connection(s) and I've learnt a lot!
 
My stats are:

http://dslstats.ddns.net:55555/index.htm - BT Infinity Line
http://dslstats.ddns.net:55552/index.htm - AAISP Line
Title: Re: DSLstats webserver - Custom Interface
Post by: Weaver on June 05, 2018, 06:15:05 AM
Why is there no G.INP ? And no G.Vector either? That is not good.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on June 05, 2018, 06:46:29 AM
looks like both are on eci cab. not going to happen any time soon..
Title: Re: DSLstats webserver - Custom Interface
Post by: sotonsam on June 05, 2018, 08:59:21 AM
Why is there no G.INP ? And no G.Vector either? That is not good.

ECI Cab. that's not happening this side of 2030.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 06, 2018, 09:54:34 PM
I been real busy but disabled the IP leak part of the history page, page is now in my sig.

Just to clarify - the IP leak was not in my history page.

Quote
My stats show dslstats graphs, history graphs, and tbb graphs.  This is using kitz's code except for the history page which is Stuart's code.

Again for clarification.  I have history graphs which automatically upload every 2hrs.   My code is different to Stuarts and works using the graph type rather than dates for those who have DSLstats to save folders in that way.

Quote
They do not include Stuart's newer stuff yet, although I think Ned is using his new scripts now.

The reason the thread got split up & Stuart started his own is that I don't think people realised that I have had both live and history graphs working for several months now.   

The only thing that requires more work on mine is further development of the FTP script to ensure that the remote files on the webserver don't get too large and will automatically delete files after 'x' time.   Currently my ftp scripts automatically mirror and synchronises to the local machine.    I've used synchronize as that requires very little bandwidth and ensures that only the newest files are uploaded.   

I didn't bother developing this script further as absolutely no-one showed any interest in what I'd done with the history files and since I only wanted to view history for SNR and Errors on my line then I saw no point putting more time into it.   It should however be really easy for me to add other folders if I wanted.



Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 06, 2018, 10:01:10 PM
nice.. :)

I have snapshots including historical stuff thanks to Chris. tbb, Stuart's new zoom tool/script  and live data .

https://www.team-rebellion.net/Ned/stats.htm

Nice job.
Just noticed though that it's using v1 of the web interface.  I updated the headers to a more logical layout a while ago and made the page layout a bit better looking by amending the CSS & html.   
I shall see if I can do anything with my CSS to make it more compartmentalised for those who may wish to add on what Stuart is doing with the zoom tool graph etc. 
Title: Re: DSLstats webserver - Custom Interface
Post by: g3uiss on June 06, 2018, 10:01:46 PM
I would really be interested in you history graphs even if just ES. I can’t run PHP. On my hosted server being a Windows 2016 which for some reason has PHP disabled.

Tony
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 06, 2018, 10:02:52 PM
Why is there no G.INP ? And no G.Vector either? That is not good.

No g.inp and vectoring on mine either.   Also on ECI  :'( :'(
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 06, 2018, 10:13:53 PM
I would really be interested in you history graphs even if just ES. I can’t run PHP. On my hosted server being a Windows 2016 which for some reason has PHP disabled.

Tony

Unfortunately the history stuff will not work without PHP.  As you can see it's a .php page  https://kitz.co.uk/linestats/history.php

You need a server-side language to be able to select server-side files.  Client side scripting languages such as javascript can't query the files stored on the remote server.   If your web host has disabled PHP then about the only thing I could perhaps suggest is running a full webserver on a local machine using something like WAMP/LAMP :(

I have however emailed you :)
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 06, 2018, 10:18:06 PM
If anyone is interested I will update the CSS to try made it more modularised so it can fit with what Stuart is doing and I'll also upload my php code.

Not sure when it will be though as I'm at the hospital tomorrow, but I shall see how much I can get done tonight with the .css


----
ETA
Currently playing with the CSS so if my stat pages start looking a bit weird dont worry

---
ETAA
oh..  that worked.  No broken pages :)
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on June 07, 2018, 04:15:06 AM
kitz are the files you shared up to date? the ones I had access to the history page was non functional and marked as something like coming soon hence stuart developing a solution.  Also interesting you commented about a v1 layout as well.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 07, 2018, 08:55:02 AM
The history page on the very first files I uploaded on March 15th didn't work.  At that point I was trying to use javascript and ajax to see if I could get something working that didnt require a server side language.

By 31st of March I had a working version which was outputting history graphs fine but it was a bit messy, but had not developed a robust FTP script to automatically update the history files.  -   See here (https://forum.kitz.co.uk/index.php/topic,21305.msg369052.html#msg369052).

My post on 1st April explained the difficulty with the FTP script I was having in that I had masses of history files on my local PC which could be problematic for web storage.     At that I asked Stuart what he was doing re the uploads, but then realised that he didn't have a working ftp script for history either.    Live stats have never been a problem and the ftp script for that has been working fine.  - See here (https://forum.kitz.co.uk/index.php/topic,21305.msg369153.html#msg369153).


On 12th April (https://forum.kitz.co.uk/index.php/topic,21305.15.html) - I mentioned I had a working version which was outputting history to a remote website rather than installing WAMP.   Again I mentioned history file size problem for the FTP script.

See also post here which specifically states that my version was outputting just SNRM and errors because that was all I needed

Atm I've only got historic data for SNRM & Err Secs purely because that's what I would look at first when it came to any historic data.


On May 6th I even had a bit of a rant because I had had zero feedback on what I'd done for the history pages.   I think the problem was that perhaps posts between mine and stuarts had got muddled in the same thread and it appeared to me that no-one had even looked at mine despite me frequently posting the link

I've already done that and FTPing current stats for running remotely.  Hate to sound like I'm doing the sour grape thing (and yeah I admit it is), but I have had absolutely zero interest in what I had done.   Not a single comment in any of the various threads where I said I'd got something working for running on a remote website since March.  Which is why I thought I was wasting my time developing an FTP version of historic and stopped as soon as I'd done only what I wanted (historic CRC, Err/Secs and SNRM) for my own line.   
I can only assume that no-one had actually looked at what I had done and what I had got working several weeks ago (https://forum.kitz.co.uk/index.php/topic,21305.msg369052.html#msg369052).    I think about the only comment I did get is saying they werent interested in running off a hosted site.      :'(

I've mentioned time and time again that the problem was not with the php code but rather a WinSCP script that was needed that would perhaps only upload the last months historic data because I had several years of DSLstat data.   
In the end I took the easy option and just cleared out my local files of old data... and since then am using the FTP script to sync to local folders.

My edited post on 5th May says

Quote
Please note:  The history section requires PHP to run and the output graphs work perfectly well by synchronising with local machine folders, but in time it would require a more robust FTP script to handle file management of older files.
As there has been little interest and zilch feedback in this section I stopped development after I got it to do what I needed (historic SNRM & errors).  My original aim was that it would only upload latest graphs in the relevant local folders and delete older files on the remote server to keep hosting bandwidth to a minimum.


I'm not quite sure how I could have made it any clearer that my problems were developing a robust FTP script and NOT the php side of things.   
I believe Stuart is also having problems in this area and he has to manually manage the history folders so we both got stuck at the same point.

Can you perhaps see now why I was getting frustrated to the point whereby I stopped mentioning that I had a working version and doing any further development, because as far as I'm concerned mine is currently doing all that it needs for me personally.  I have passed the link out enough.    I think b*cat will be able to confirm he saw it was working ages ago, but his comment was about the DSLstats graph size and nothing to do with my side of things.

There's no point in me updating or doing any further work if I had absolutely zero interest.  :(
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 07, 2018, 09:07:55 AM
Also interesting you commented about a v1 layout as well.

I changed the layout to make the headers more logical and there were also a few cosmetic changes in layout so that things just looked a bit nicer.  They were purely CSS type changes and have been freely available for download since 5th May.

I edited the CSS again last night so there is another version that I will package and re-upload when I get chance. The only changes I have made recently are CSS type things to tidy up html layout.   

The reason I mentioned it is I noticed ned was using the very first version and not the 5th may version.

Updated the attached file in first post.   There's several changes which are mostly cosmetic to layout. 
All files have been updated with the newer menu which is IMHO more logical than the previous one.

I've been using the new layout for quite a while so some of you will have already seen it, but if not it can be viewed here (https://kitz.co.uk/linestats/index.htm).

-----

PS.   If some of the pages on my linestats page look weird you may need to refresh cache.  (Ctrl & F5).    I uploaded a new .css file last night and chrome in particular tends to cache old css files. 
Title: Re: DSLstats webserver - Custom Interface
Post by: burakkucat on June 07, 2018, 05:19:48 PM
. . . I think b*cat will be able to confirm he saw it was working ages ago, but his comment was about the DSLstats graph size and nothing to do with my side of things.

Yes, that I can confirm. It was working nicely and provided all that I would have expected.
Title: Re: DSLstats webserver - Custom Interface
Post by: burakkucat on June 07, 2018, 05:37:22 PM
I would like to state that since the demise of MDWS the current web interface, created by Kitz and accessible here (https://kitz.co.uk/linestats/index.htm), is the most straightforward and logical interface for me to use to see Our Leader's circuit statistics . . . whenever I feel the urge or daily (whichever event occurs first).  :)

I would also like to say that I have also looked at other Members' offerings and can see that each has its own plus points & mode of use cases.  :drink:

Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on June 07, 2018, 08:43:56 PM
yep, just the files I downloaded was an older set of the files, different layout and incomplete history, I was never aware of this updated layout before. :)

Its all good :)  We have different options on the table.
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on June 07, 2018, 08:47:27 PM
v1  files from Kitz and Stuart's new scripts work a treat. With a windows and pi3 solution working off the server being automated I think it's provides more than enough stats than I can handle. Having my history there too is a bonus. ;D
Title: Re: DSLstats webserver - Custom Interface
Post by: chenks on June 07, 2018, 09:04:14 PM
I would like to state that since the demise of MDWS the current web interface, created by Kitz and accessible here (https://kitz.co.uk/linestats/index.htm), is the most straightforward and logical interface for me to use to see Our Leader's circuit statistics . . . whenever I feel the urge or daily (whichever event occurs first).  :)

I would also like to say that I have also looked at other Members' offerings and can see that each has its own plus points & mode of use cases.  :drink:

i think i must be running a slightly older version of the web interface, as mine doesn't have the footer.
i downloaded the files in post 1 only a few days ago.... are those the most recent version?
Title: Re: DSLstats webserver - Custom Interface
Post by: g3uiss on June 07, 2018, 10:45:12 PM
Unfortunately the history stuff will not work without PHP.  As you can see it's a .php page  https://kitz.co.uk/linestats/history.php

You need a server-side language to be able to select server-side files.  Client side scripting languages such as javascript can't query the files stored on the remote server.   If your web host has disabled PHP then about the only thing I could perhaps suggest is running a full webserver on a local machine using something like WAMP/LAMP :(

I have however emailed you :)

Thanks. I think I’ve got the hosting company to allow the PHP to be implemented. It looks to be working fine, on both my VDSL and ADSL. Lines, but I will let it run and post a link over weekend.

Thanks Tony
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 08, 2018, 07:38:32 PM
i downloaded the files in post 1 only a few days ago.... are those the most recent version?

I changed the .css early hours 7th June which is why you won't have that yet and why it's only on my own version atm.   

If anyone is interested I will update the CSS to try made it more modularised so it can fit with what Stuart is doing

Not sure when it will be though as I'm at the hospital tomorrow, but I shall see how much I can get done tonight with the .css

I haven't yet had chance to update the files available for download but will do so asap. :)
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 08, 2018, 08:03:36 PM
Thanks. I think I’ve got the hosting company to allow the PHP to be implemented. It looks to be working fine, on both my VDSL and ADSL. Lines, but I will let it run and post a link over weekend.

Good stuff, glad its working for you.  :)

I'm using WinSCP and some scripts to automatically FTP the live stats every min and synchronise the history graphs every 2 hours. 
I think the latest edition of DSLstats now may contain ftp info for the live stats, but admittedly I haven't tried that yet as my ftp script for livestats works fine and uses very little bandwidth.

A bit harder was trying to get history files to synchronise and only update the latest files.    I'm very conscious that my script is designed to run on a remote web-server and therefore was aware that some sites will have bandwidth restrictions.   This has always been what caused my own scripts to come to standstill as ideally I would have liked it to automatically remove old remote files after 'x' period.   It was also a bit more complicated as my DSLstat graphs are stored using the graph type name rather than date which would have been easier.

Anyhow I do have a working synchronise ftp script for history -  I cheated and cleared out the old files on my local machine which went back a few years.
Until someone can devise a more robust FTP script to deal with automatically clearing out the remote webfiles every so often you may have to just keep an eye on remote storage.

I really need to do a help file which explains WinSCP & the ftp scripts I've written so they can be adapted for various scenarios which is something I saw no point in doing as no-one else appeared to be interested.    However, it is worth pointing out  that you would likely need to use similar scripts if you want to use Stuarts history pages on a remote server too.... or else you are going to run the webpages locally or do it all manually... as this is something beyond what DSLstats inbuilt ftp server does. 

I'm afraid I can't just pass out the ftp scripts in their current form as they contain my server info.
 
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 08, 2018, 09:28:43 PM
Uploaded new files to original post and packaged as v2
Title: Re: DSLstats webserver - Custom Interface
Post by: skyeci on June 08, 2018, 10:12:37 PM
Hi Kitz

The latest version of dsl stats does indeed upload automatically. I was originally using WinSCP for datastore,webserver and snap shot files but now all 3 are being done via dsl stats real time.
Title: Re: DSLstats webserver - Custom Interface
Post by: g3uiss on June 08, 2018, 10:13:48 PM
Thanks. I can synchronise the files I have as I seem to have mixture of versions.

Thanks. Tony
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 08, 2018, 11:02:14 PM
Quote
i've applied the v2 GUI, but i seem to have broken something in the process. stats on index and telnet pages are now missing


Seems ok here in FF.  It may be your browser caching the old css file rather than the new one?  Chrome has a habit of doing that.

Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 08, 2018, 11:05:17 PM
Hi Kitz

The latest version of dsl stats does indeed upload automatically. I was originally using WinSCP for datastore,webserver and snap shot files but now all 3 are being done via dsl stats real time.

Thanks for that confirmation. :)    I'd used WinSCP as it was the only way of doing so when I first wrote my code which was prior to the latest DSLstats release.

I think you will need WinSCP though for any of the history files and folders, so I will continue using it for now and attempt how to explain for those who want to use it with the history folders.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 08, 2018, 11:13:04 PM
Thanks. I can synchronise the files I have as I seem to have mixture of versions.

You should in practice just be able to drop the new version straight in over the top.   Not sure about anything to do with Stuarts though as I don't have those.

In the long term it would be an idea mrege Stuarts files and mine, which is why I rewrote my CSS the other night.   
By sectioning it off like I have done, we can adjust the menu.   Stuarts code can go in the body div and he can also put his own credit in the footer on the pages which he coded.   Well that's the theory anyhow. :)
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 12, 2018, 11:23:48 PM
G3uiss has developed an asp version of the history page for anyone running a windows server and is kindly making his aspnet scripts available for download.  :)

I will attach the files to the first post in the thread.
Title: Re: DSLstats webserver - Custom Interface
Post by: Deathstar on June 27, 2018, 05:35:54 PM
Might be a silly question, but I get the following on the history page.

EDIT - I think it's a PHP issue with my PN webspace.

Code: [Select]
"> Graph Type
 
">   

"; echo "Filename = $fileName

"; echo '$filename'."

";} # Else check if a folder has been selected elseif (isset ($_REQUEST['graph'])) { $graph_type = validate_input($_REQUEST['graph']); echo "You selected $graph_type
Please select which graph to view

"; ListGraphs($graph_type);// Call the ListGraphs Function } else { echo "Please select graph type"; } ?>/code]
Title: Re: DSLstats webserver - Custom Interface
Post by: Deathstar on June 29, 2018, 07:50:48 PM
Well, good news and bad news.

Good news its working, even with SSL.

Bad I could not get @Kitz history working, and I could not get @Broadstairs live data working so I ended up cobbling them both together.

https://www.cddsystems.co.uk/

Have a shufty and let me know if it works :)
Title: Re: DSLstats webserver - Custom Interface
Post by: burakkucat on June 29, 2018, 09:16:04 PM
https://cddsystems.co.uk/index.htm

Have a shufty and let me know if it works :)

Looks good, to me.

However the is a small problem . . . the one I seem to be regularly pointing out to Kitizens . . . your Bit Loading, Hlog and QLN plots need to be adjusted to show the entire 4096 sub-carriers of a profile 17a, G.993.2, service. You should go to the Bit Loading, Hlog & QLN screens and left-click on the "Change tone range" button. In the Pop-Up that then appears, left-click on "Custom" and then adjust the slider so that the plot is just sufficiently wide to show the 4096 sub-carriers.
Title: Re: DSLstats webserver - Custom Interface
Post by: ktz392837 on June 29, 2018, 10:09:01 PM


You should go to the Bit Loading, Hlog & QLN screens .... then adjust the slider so that the plot is just sufficiently wide to show the 4096 sub-carriers.

I wonder why it doesn't default to better values?  4096 must be the correct figure for the majority of users.

I am scared of requesting this as I think the suggestion list is already reaching the moon :)
Title: Re: DSLstats webserver - Custom Interface
Post by: roseway on June 29, 2018, 10:50:59 PM
I don't mind your suggesting it, because I've already noted the number of times this comes up. Unfortunately it's not a simple as just setting a default number of tones, because of the way the per-tone graphs are constructed. What I really need to do is dimension the graphs automatically according to the highest used tone, and I'll try to do that for the next release.
Title: Re: DSLstats webserver - Custom Interface
Post by: Deathstar on July 01, 2018, 10:14:16 AM
Thanks B*cat, I've made those suggested changes.

The history graphs do show the full range though.
Title: Re: DSLstats webserver - Custom Interface
Post by: chenks on July 01, 2018, 03:59:50 PM
Looks good, to me.

However the is a small problem . . . the one I seem to be regularly pointing out to Kitizens . . . your Bit Loading, Hlog and QLN plots need to be adjusted to show the entire 4096 sub-carriers of a profile 17a, G.993.2, service. You should go to the Bit Loading, Hlog & QLN screens and left-click on the "Change tone range" button. In the Pop-Up that then appears, left-click on "Custom" and then adjust the slider so that the plot is just sufficiently wide to show the 4096 sub-carriers.

unfortunately you need to do this every time you start DSLstats, as it doesn't seem to remember your settings when closing the app.
well i do anyway, not sure if others have the same.
Title: Re: DSLstats webserver - Custom Interface
Post by: j0hn on July 01, 2018, 05:46:13 PM
It should remember it.
If I change the tone range on the hlog it also changes bitloading and QLN and saves this change permanently.

Try changing the tone range, exiting DslStats via the red x in the top right and selecting yes when asked if you want to close the program.

Launch DslStats and check if the tone range saved.
I find sometimes a setting won't save if the program is closed incorrectly
Title: Re: DSLstats webserver - Custom Interface
Post by: burakkucat on July 01, 2018, 06:49:46 PM
unfortunately you need to do this every time you start DSLstats,

That is not my experience, it behaves like any other configurable option.
Title: Re: DSLstats webserver - Custom Interface
Post by: chenks on July 01, 2018, 08:08:02 PM
take a look at what mine looks like at the moment.
http://chenks.ddns.net/dslstats/connection.htm

this is what happens when dslstats closes and re-opens.
before it closed it was displaying correctly.

this happens every time for me, not just a 1 time occurance.

dslstats 5.6 running on windows 10 pro 64-bit
Title: Re: DSLstats webserver - Custom Interface
Post by: j0hn on July 01, 2018, 10:20:28 PM
Quote
dslstats 5.6 64-bit running on windows 10 pro 64-bit

just to note there's only a 32 bit Windows version.

Strange that your tone range doesn't stick. I've ran the Windows, Linux and Pi versions and they all behaved as they should, the tone range only needing set once on 1 graph.
Title: Re: DSLstats webserver - Custom Interface
Post by: chenks on July 02, 2018, 08:03:06 AM
just to note there's only a 32 bit Windows version.

Strange that your tone range doesn't stick. I've ran the Windows, Linux and Pi versions and they all behaved as they should, the tone range only needing set once on 1 graph.

ah yes, indeed.
when i looked at the downloads page i saw 64-bit and didn't check if it was windows or not.

but yes, every time dslstats starts i have to go to that graph settings and set it again otherwise it does what you can see currently.
Title: Re: DSLstats webserver - Custom Interface
Post by: adslmax on August 20, 2018, 12:12:16 AM
How to do this? Please explain step by step instruction, sorry as I am thick, haven't got any clue how to do this?

Do I need to install WinSCP set up first and copy all files from this folder DSLstats adv_web_interface_v2 to this folder Dslstats snaphot and how to setup WinSCP as picture show below:



[attachment deleted by admin]
Title: Re: DSLstats webserver - Custom Interface
Post by: pooclah on August 20, 2018, 04:40:59 AM
Max

Start here http://dslstats.me.uk/webserver.html (http://dslstats.me.uk/webserver.html)

Kevin
Title: Re: DSLstats webserver - Custom Interface
Post by: adslmax on August 20, 2018, 01:20:38 PM
What is the host name, username and password? Does host name mean I have to built my own website? username and password where I can find it from? Sorry for being numb.

Getting error

The server rejected SFTP connection, but it listens for FTP connections.

Did you want to use FTP protocol instead of SFTP? Prefer using encryption.
Title: Re: DSLstats webserver - Custom Interface
Post by: Deathstar on August 20, 2018, 03:44:30 PM
Yes, you need webspace to be able to host the files for the webserver.

You may get free webspace from your ISP, if you do you can SFTP the files to there both from DSLStats and the Custom Interface files.
I would start by finding out if you have webspace.


Title: Re: DSLstats webserver - Custom Interface
Post by: adslmax on August 20, 2018, 03:46:28 PM
Thanks but don't think Plusnet don't have free webspace?
Title: Re: DSLstats webserver - Custom Interface
Post by: adslmax on August 20, 2018, 06:30:50 PM
I got my webspace but nothing is loading dslstats?

https://adslmax.wixsite.com/dslstats
Title: Re: DSLstats webserver - Custom Interface
Post by: Deathstar on August 21, 2018, 08:07:18 AM
Have you put the interface in the webspace, and uploading the files to there?

If you are not doing that it will not work.
Title: Re: DSLstats webserver - Custom Interface
Post by: j0hn on August 21, 2018, 08:24:49 AM
I got my webspace but nothing is loading dslstats?

https://adslmax.wixsite.com/dslstats

Pretty sure wiz don't allow PHP.
Max how would you get your files on the site?

You really should stick to the DslStats webserver max.
The DslStats webserver should allow you to view your live stats.

Setup snapshots and then you can view your history when you get home.
You will not be able to get the history part working on kitz script it's obviously way too technical for you.

All you have managed so far is a blank hosting page saying welcome, with a Google maps image probably with your home address.
You shouldn't have been advised to get webspace if it's something you have never used before.
It is not in the same category of "technical knowledge needed" as entering your mdws username/key.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on November 27, 2018, 02:44:43 PM
Running the v2 release of kitz custom interface on my on line web server, all working fine with the exception of history, the "history" tab just produces a blank browser page.
The web server does support php, I am already running broadstairs, php based custom interface there without any issues.

All the kitz utility program files are in the server "webserver" folder which is also the destination for the stats webserver files as uploaded via DSLStats from my RPI 3B via inbuilt routine.
Noted that the kitz interface stats image & text files must be stored in name as opposed to date format, have renamed to conform and tried storage in name based folders or directly in the webserver folder, no joy, the history browser page does not even get to the stage of reporting "file not found" or indeed produce any form of header or dialogue, just a blank page !

I am obviously doing something wrong as quite a few forum members have the kitz interface or a combination of kitz & broadstairs interface running and available on their profiles, any suggestions as to what appreciated.
Title: Re: DSLstats webserver - Custom Interface
Post by: hacktrix2006 on November 27, 2018, 02:54:56 PM
@tiffy history.php requires you have PHP installed as well as Apache and an FTP server. From what I have read.

Sent from my LLD-L31 using Tapatalk

Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on November 27, 2018, 03:51:17 PM
Thanks for the response.

Yes, appreciate that the history program file is php based, however, as stated, my webserver does support this and broadstairs, php based interface is already running there without any issues.

Have also tried running locally on Windows using xampp (with Apache) which again runs broadstairs interface without any problems, same issue there with the kitz history page.
Title: Re: DSLstats webserver - Custom Interface
Post by: d2d4j on November 27, 2018, 04:21:44 PM
Hi tiffy

Apologies I did say I would look into this for you

It is now working if you check

Many thanks and sorry for late reply, I had to go out and mobile died.

Many thanks

John
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on November 28, 2018, 02:36:39 PM
Many thanks to John (d2d4j) for a very prompt solution to my issue which I believed involved a slight tweek of the history.php file which he edited on the server, having access to this as his company provide my web hosting.

Strangley, there was a re-occurance of the issue a few hours after John's fix was applied, he very quickly diagnosed and attributed this to the history.php file being overwritten by an old revision from my RPi 3B source which I certainly had not manually applied.
Had been aware at an earlier stage that name changes (Kitz to my ID) edited in the *.htm or history.php files on the server only would at some stage change back to original, carrying out the edit's to the files in the RPi webserver folder gave a permanent result, concluded that all these files must be overwritten on the server during the DSLStats auto upload sequence.

With no other connection other than becoming a recent customer with John's web hosting company I can only repeat that his service and support with any of my issues has been exceptional and with his patronage of this forum/knowledge of *DSL related matters it makes it so much easier explaining any issues that arise, would thoroughly recommend.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on November 28, 2018, 08:59:29 PM
Very quick comment from me. 

I think the problem may be that I used php short tags in some of  my code...  which won't work unless the server has specifically got php short tags enabled.    I'd used short tags where I quickly swap out from php to use html forms.

atm I'm not able to repackage and re-upload...  but in the meantime if anyone else is having difficulties then changing
Code: [Select]
<? to
Code: [Select]
<?phpshould do the trick.




   
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on November 29, 2018, 09:43:22 AM
@kitz

Thanks for the explanation of "short tags", John (d2d4j) had mentioned this was causing the issue on his system with respect to running the history.php file, I did not really understand the logistics which I'am sure John would have explained had I asked.

Your custom interface is now working very well on my system, many thanks for the development and free supply of this utility, much appreciated.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on November 29, 2018, 09:13:23 PM
nps.   My bad -  I'd used full tags for the main part of the code, but old habits die hard when it came to quickly dropping back into html for the form, and then back again to php.   With my server supporting short tags and originally having coded it for myself I hadn't realised it would become a problem for others until you brought the topic up.   Fortunately John realised what it was :)
Title: Re: DSLstats webserver - Custom Interface
Post by: jelv on December 13, 2018, 12:08:20 AM
Kitz's history.php code relies on "Save snapshots in categories" being set. I had "Save snapshots in daily folders" set - it seems more logical to me and allows easier housekeeping to delete older data no longer required. I know at least one other person was running a script to copy the image files from the daily snapshot folders to the category folders so that history.php worked.

I am now using a script which rather than copying the files creates symlinks in the category folders which link to the files in the daily folders. Also if daily snapshot folders or files within them are deleted the symlinks pointing to them are automatically removed. This script can be run by cron (either at regular intervals or set to run a short time after the auto snapshots timing) or run manually after ad-hoc snapshots. It creates links for all possible snapshot graphs depending on what it finds.

Here is the script:
Code: [Select]
#!/bin/sh
# This script creates links in the correct folders to all the DSLstats png images which are in daily snapshot folders
# This is to mimic the structure when "Save snapshots in categories" is selected
# It is required for Kitz's history display

DSLstatspath=/chroot/home/myusername/mydomain/html/DSLstats/

find ${DSLstatspath}snapshots/. -type f -name "Bitloading-*.png" -exec ln -sf -t ${DSLstatspath}Bitloading "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "Bitswap-*.png" -exec ln -sf -t ${DSLstatspath}Bitswaps "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "Speed-*.png" -exec ln -sf -t ${DSLstatspath}ConnSpeed "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "CRC-*.png" -exec ln -sf -t ${DSLstatspath}CRC "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "ES-*.png" -exec ln -sf -t ${DSLstatspath}ErroredSeconds "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "FEC-*.png" -exec ln -sf -t ${DSLstatspath}FEC "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "HLog-*.png" -exec ln -sf -t ${DSLstatspath}HLog "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "QLN-*.png" -exec ln -sf -t ${DSLstatspath}QLN "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "SES-*.png" -exec ln -sf -t ${DSLstatspath}SES "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "SNRM-*.png" -exec ln -sf -t ${DSLstatspath}SNRM "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "SNRMperband*.png" -exec ln -sf -t ${DSLstatspath}SNRMperband "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "SNRpertone-*.png" -exec ln -sf -t ${DSLstatspath}SNRpertone "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "Swapspermin-*.png" -exec ln -sf -t ${DSLstatspath}SwapsPerMinute "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "DailyTraffic-*.png" -exec ln -sf -t ${DSLstatspath}Traffic "{}" \;

# Now delete any dead links where the original file has been removed
find -L ${DSLstatspath} -type l -exec rm -- {} +

The only thing that needs amending is to set DSLstatspath - note the trailing / is required.

I've also amended my copy of history.php as suggest in the comments to add all the possible graph types to the first drop down:

Code: [Select]
<form name="form1" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  Graph Type<br>
    <select name="graph">
     <option value="SNRM">SNR Margin</option>
      <option value="ErroredSeconds">Errored Seconds</option>
      <option value="CRC">CRCs</option>
      <option value="Bitloading">Bit loading</option>
      <option value="Bitswaps">Bitswaps</option>
      <option value="ConnSpeed">Connection speed</option>
      <option value="FEC">FEC Errors</option>
      <option value="HLog">HLog</option>
      <option value="QLN">QLN</option>
      <option value="SES">SES</option>
      <option value="SNRMperband">SNR Margin per Band</option>
      <option value="SNRpertone">SNR Margin per Tone</option>
      <option value="SwapsPerMinute">Bitswaps per Minute</option>
      <option value="Traffic">Daily Traffic</option>
    </select>
    <input type="submit" value="Select">
  </form>
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on December 13, 2018, 10:11:59 AM
Thanks jelv.    :thumbs:
I've added a note to the first post in the thread linking people to your post should they wish to use your script to store in daily folders.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on December 13, 2018, 10:36:17 AM
@jelv

Many thanks for making your code publically available, as someone running a very similar setup to yours, ie. kitz & broadstairs stats display interfaces running together on a web hosting site and to date running very simple but effective cron job routines engineered by the site manager, John (d2d4j) to enable the kitz interface history function to work, your further development is very much appreciated.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on December 14, 2018, 12:54:12 PM
@jelv

Your "cron symlink" script has worked perfectly on my web based, kitz history interface, beyond expectation even converted the existing png & txt files in the associated history folders from full size to symlinks, considerable saving of space on the disk with the avoidance of file duplication, again, many thanks for sharing.

Two quick questions:
Quote
find ${DSLstatspath}snapshots/. -type f -name "SNRM-*.png" -exec ln -sf -t ${DSLstatspath}SNRM "{}" \;
find ${DSLstatspath}snapshots/. -type f -name "SNRM-*.png" -exec ln -sf -t ${DSLstatspath}SNRM "{}" \;
Is there any significance in the two identical SNRM lines in your code ?

Quote
# Now delete any dead links where the original file has been removed
find -L ${DSLstatspath} -type l -exec rm -- {} +
Struggling to understand the format of the last line of code, can you elaborate further or point to reference ?

For anyone like myself who is not familiar the Linux "ln" command concept found a good reference source here that even I can understand:
https://www.computerhope.com/unix/uln.htm
 
Title: Re: DSLstats webserver - Custom Interface
Post by: d2d4j on December 14, 2018, 01:01:23 PM
Hi tiffy

Sorry the duplication maybe my fault. I think I initially tried deleting lines you did not use so may have deleted argin from SNRMargin but I cannot remember exactly now sorry.

I then just uploaded the original cron and vi edited, simply hashing our the lines not used

The last line simply looks for zombie symlinks and deletes them if no matching file found in snapshot folder

Many thanks

John
Title: Re: DSLstats webserver - Custom Interface
Post by: jelv on December 14, 2018, 01:21:08 PM
-L follows symbolic links so you get information on the target files unless the link is broken when it gives you the information on the symlink.
-type l then filters the result set to only give you files which are links (i.e. where the link is broken)

For all that are found by this execute rm
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on December 14, 2018, 02:20:46 PM
@d2d4j & jelv

John, thanks for the clarification, I was aware that the cron code lines had been edited to suit my particular history preferences but as the duplicate line was also in jelv's published code thought it may be deliberate or significant, will remove or comment out one of the lines in my script.

Thanks to both for the detailed explanation of the code final command line.

Title: Re: DSLstats webserver - Custom Interface
Post by: jelv on December 14, 2018, 03:16:55 PM
Whoops - it's a duplicate that should be removed (not that is doing any harm).

It stems from the SNRMperbanddownstream and SNRperbandupstream which I combined.
Title: Re: DSLstats webserver - Custom Interface
Post by: m48t02 on March 01, 2019, 06:59:14 PM
Hi guys,

Firstly many thanks @kitz for providing these pages for the DSLStats data. I am new on the forum and have been playing for the last day or so on getting it working with my data.

I just wanted to share a change I made to the history.php page, so that the drop-down choices do not revert back to the default choices, and stay on the currently viewed folder and graph file. It makes it a little more intuitive when reviewing the graph for me.

Hope it's useful. (N.B. The array() defines my folders, just add/remove your elements as necessary):

I hope this is the correct place to share.

Code: [Select]
<div class="graphs">
  <form name="form1" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  Graph Type<br>
    <select name="graph">
      <option value="SNRM">SNR Margin</option>
      <option value="ErroredSeconds">Errored Seconds</option>
      <option value="CRC">CRCs</option>
    </select>
    <input type="submit" value="Select">
  </form>

Becomes:

Code: [Select]
<div class="graphs">
  <form name="form1" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  Graph Type<br>
    <select name="graph">

<?php
$graphs 
= array("Bitloading","Bitswaps","ConnSpeed","CRC","ErroredSeconds","FEC","HLog","QLN","SES","SNRM","SNRMperband","SwapsPerMinute");

foreach (
$graphs as $graph) {
        if (
$_REQUEST['graph'] == $graph || $_REQUEST['folder'] == $graph){
                
$selected ' selected';
        } else {
                
$selected '';
        }
        print 
"<option value='".$graph."'".$selected.">".$graph."</option>\n";
}
?>

    </select>
    <input type="submit" value="Select">
  </form>


And in fuction(ListGraphs) this:

Code: [Select]
         #Output to Drop Down Select Box
         if (in_array($ext, $supported_file)) {
             echo "<option value=\"" . $image . "\">" . basename($image) . "</option> \"";                                      // Strip file path from img url

Becomes:

Code: [Select]
           #Output to Drop Down Select Box
            if (in_array($ext, $supported_file)) {

                   if ($_REQUEST['fileName'] == $image) {
                            $imageselected = " selected";
                   } else {
                            $imageselected = "";
                   }

              echo "<option value=\"" . $image . "\"".$imageselected.">" . basename($image) . "</option>\n";


Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on March 01, 2019, 09:46:12 PM
Thanks m48t02 for sharing your code.   Appreciated :)
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on March 02, 2019, 05:13:46 PM
@m48t02

Script updated and tested on my system, working perfectly and certainly worth the effort, many thanks for sharing.

From previous experience on my system, RPi 3B running DSLStats and uploading webserver files to web server, if edits are made to web site, server *.php files only they can be overwriten back to original by the corresponding file on the RPi at the next scheduled DSLStats upload, not sure if this would apply to the history.php file but has certainly happened to other *.php files I have edited on the web server in the past.

Probably best to edit at source and then copy / replace the file on the web server.
Title: Re: DSLstats webserver - Custom Interface
Post by: m48t02 on March 03, 2019, 09:48:57 AM
@m48t02

Script updated and tested on my system, working perfectly and certainly worth the effort, many thanks for sharing.

My pleasure.

From previous experience on my system, RPi 3B running DSLStats and uploading webserver files to web server, if edits are made to web site, server *.php files only they can be overwriten back to original by the corresponding file on the RPi at the next scheduled DSLStats upload, not sure if this would apply to the history.php file but has certainly happened to other *.php files I have edited on the web server in the past.

Probably best to edit at source and then copy / replace the file on the web server.

Absolutely, it kind of boils down to the release medium. The source needs to be synchronised with changes.

I don't know how savvy you guys are at using sites such as github.com or bitbucket.org where you can freely host your code as an owner, but others can push 'merge' (read change) requests to your codebase which you can choose to accept or deny?

You can then mark a 'release' at a certain point in the development phase that can be downloaded as a zip, at a point you think merged changes are stable or significantly different enough to merit a new release tag.
Title: Re: DSLstats webserver - Custom Interface
Post by: 7cfm on March 24, 2019, 08:54:55 AM
I'm using Kitz custom interface on a raspberry pi and it works great but I need to change the default apache port from port 80. I've updated /etc/apache2/sites-enabled/000-default.conf and /etc/apache2/ports.conf and I get the linestats OK but lose the page formatting, any ideas please?


[attachment deleted by admin]
Title: Re: DSLstats webserver - Custom Interface
Post by: j0hn on March 24, 2019, 10:33:20 AM
eww @ that packet loss
Title: Re: DSLstats webserver - Custom Interface
Post by: 7cfm on March 24, 2019, 01:52:41 PM
Not good is it. Interestingly when the line was busy downloading yesterday afternoon the packet loss reduced.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on March 25, 2019, 01:16:09 PM
I get the linestats OK but lose the page formatting, any ideas please?

Check the directory paths as it doesn't appear to have found the file css.css
Have you set up custom folders?  The .css file should be in the same folder as index.htm etc.
Title: Re: DSLstats webserver - Custom Interface
Post by: 7cfm on March 25, 2019, 05:03:52 PM
That was it, I am using the default apache directory and css.css was completely missing, where I was picking it up from when I was using port 80 is a mystery but all sorted now, many thanks
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on March 28, 2019, 10:37:16 PM
YW :) 
Title: Re: DSLstats webserver - Custom Interface
Post by: RTouris on June 01, 2019, 10:08:47 PM
Having just completed my frank-o-setup - running Raspbian DSLstats + Kitz's modified interface on an old tablet via Linux Deploy with much success I was wondering if there is any way to include the quite informative pbparams.txt section in one of the tabs of the main web interface..Seeing that pbparams.html is actually missing (i.e. DSLStats doesn't output it) - I tried to "include" the text output of the .txt file into one of kitz's .htms but unfortunately my HTML is quite rusty to the point that I managed to get the file downloaded, but not actually displayed (embedded) into the respective tab.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 04, 2019, 11:28:51 PM
Sorry only just seen this.    The easiest way is output the text file in a frame.

https://kitz.co.uk/linestats/pbparams.htm

You should be able to download that file. 
Don't forget you will also need to change the menu nav bar for the other pages too. 


---
PS

You may need to adjust the frame width depending upon data in your own txt file.
I just quickly used 800 x 600 to test, as mine isn't uploading live data...  but you can tweak it to what best suits your data output.

Code: [Select]
<iframe src="pbparams.txt" width="800" height="600" frameborder="0">
Title: Re: DSLstats webserver - Custom Interface
Post by: RTouris on June 07, 2019, 12:21:48 PM
Sorry only just seen this.    The easiest way is output the text file in a frame.

https://kitz.co.uk/linestats/pbparams.htm

You should be able to download that file. 
Don't forget you will also need to change the menu nav bar for the other pages too. 


---
PS

You may need to adjust the frame width depending upon data in your own txt file.
I just quickly used 800 x 600 to test, as mine isn't uploading live data...  but you can tweak it to what best suits your data output.

Code: [Select]
<iframe src="pbparams.txt" width="800" height="600" frameborder="0">

Thanks for the reply...For some strange reason I can't get this to work properly, so let me elaborate. Accessing the page from within the tablet that runs the DSLstats server under Ubuntu works beautifully, presenting said pbParams data embedded in the respective .htm tab / page, however when I try to access it from any other desktop class (i.e. not an iPhone/iPad/Android browser) browser outside the server that runs on the tablet results in the pbparams.txt file being downloaded by the browser..

iPhone/iPad also works displaying the pbparams.txt contents in the frame of the page, however any desktop-class browser (Safari/Chrome/Firefox) will download the linked .txt file rather than displaying it..

One thing I noticed is that any other text-based tab has the respective .html that's generated by DSLstats which is then called into by the frame of the custom UI .htm page, however that's not the case with pbParams, where DSLstats does NOT provide the live .html variant, but only outputs the .txt file...maybe that's somehow responsible for this behaviour?
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 07, 2019, 12:47:11 PM
How strange.   

Mine using pbparams.txt (https://kitz.co.uk/linestats/pbparams.txt) works fine here in Firefox, Chrome, Opera, Palemoon & Vivaldi.
Do you have the same problem when trying to view my stats?

https://kitz.co.uk/linestats/pbparams.htm

I'm wondering if there may perhaps be some application or setting on the desktop machine which by default tries to open all text files.
afaik all browsers should by default open .txt files within the browser window - unless told to do otherwise.
Title: Re: DSLstats webserver - Custom Interface
Post by: RTouris on June 07, 2019, 12:48:51 PM
How strange.   

Mine using pbparams.txt (https://kitz.co.uk/linestats/pbparams.txt) works fine here in Firefox, Chrome, Opera, Palemoon & Vivaldi.
Do you have the same problem when trying to view my stats?

https://kitz.co.uk/linestats/pbparams.htm

I'm wondering if there may perhaps be some application or setting on the desktop machine which by default tries to open all text files.
afaik all browsers should by default open .txt files within the browser window - unless told to do otherwise.

The puzzling thing is that yours works like a charm...
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 07, 2019, 02:00:37 PM
I've been doing a wee bit of googling and the recommended method is using a frame.   See here (https://stackoverflow.com/questions/12050465/output-content-of-a-text-file-on-a-web-page).   My script should not see any of the awkward scrolling as mentioned by Madara Uchiha as I'd already added params to stop that problem.  There is an additional parameter "seamless (http://andrewcoyte.duckdns.org/devreferences/www.w3schools.com/html5/att_iframe_seamless.asp.htm)" you could try,  but this only works in html5

Failing that,  if you run PHP there is a script which forces txt files to be output within the main html
https://www.000webhost.com/forum/t/simple-php-script-to-read-txt-files-and-output-as-html/2933

There may be an equivalent for javascript/ajax
https://stackoverflow.com/questions/13709482/how-to-read-text-file-in-javascript
Title: Re: DSLstats webserver - Custom Interface
Post by: RTouris on June 09, 2019, 08:50:07 PM
I've been doing a wee bit of googling and the recommended method is using a frame.   See here (https://stackoverflow.com/questions/12050465/output-content-of-a-text-file-on-a-web-page).   My script should not see any of the awkward scrolling as mentioned by Madara Uchiha as I'd already added params to stop that problem.  There is an additional parameter "seamless (http://andrewcoyte.duckdns.org/devreferences/www.w3schools.com/html5/att_iframe_seamless.asp.htm)" you could try,  but this only works in html5

Failing that,  if you run PHP there is a script which forces txt files to be output within the main html
https://www.000webhost.com/forum/t/simple-php-script-to-read-txt-files-and-output-as-html/2933

There may be an equivalent for javascript/ajax
https://stackoverflow.com/questions/13709482/how-to-read-text-file-in-javascript

Thanks for the prompt reply and the suggestions.

I'm afraid I haven't had much success with the seamless parameter amongst many other things I tried and seeing that I neither run PHP not have any JS knowledge I'm afraid there's not much i can pursue on this front..I can only hope that DSLstats gets updated at some point in the future to also include a dynamic html output of pbparams (instead of txt only) to get this sorted properly.
Title: Re: DSLstats webserver - Custom Interface
Post by: mw2870 on June 28, 2019, 12:01:18 PM
Thanks for the custom web interface! It is really good.

I have deployed mine here: http://dslstats.wilson-serve.co.uk/
It is running on a VPS server that I already had, so I have just set up another vhost on that box.

I am using dslstats v6.5.9 on a Rasberry Pi to upload via SFTP and have configured the Webserver Files and Snapshot tabs on the FTP Uploads section in configuration.

I have hacked history.php to create history2.php
As the snapshot function in dslstats creates new folder per day I have re-worked it a bit.
I have also added support for txt files via an iframe.

Let me know if this is useful to anyone else and I can upload it.

Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on July 06, 2019, 05:49:56 PM
Kitz for some reason when I went on your SNR page chrome thought the page was swedish :D and offered to translate it for me.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on July 06, 2019, 09:13:17 PM
haha.    Same here.    I let it translate and I couldn't see it changed anything  :-\
Title: Re: DSLstats webserver - Custom Interface
Post by: Terry74 on November 19, 2019, 05:01:36 PM
Thanks for the custom web interface! It is really good.

I have deployed mine here: http://dslstats.wilson-serve.co.uk/
It is running on a VPS server that I already had, so I have just set up another vhost on that box.

I am using dslstats v6.5.9 on a Rasberry Pi to upload via SFTP and have configured the Webserver Files and Snapshot tabs on the FTP Uploads section in configuration.

I have hacked history.php to create history2.php
As the snapshot function in dslstats creates new folder per day I have re-worked it a bit.
I have also added support for txt files via an iframe.

Let me know if this is useful to anyone else and I can upload it.

Hi there mw2870. I, for one, would be interested to see your history2.php please.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on June 19, 2020, 07:04:27 PM
Old topic I know but still relevant.

Have never managed to get the kitz custom interface, "history" working locally, error displayed as per attached .png, all other tabs working and displaying to expectation.
The "select" and "go" pull down options are empty.
DSLStats running on RPi 3B, ethernet connected to my desktop Win 10 Home PC.

Error probably not surprising as I can't figure out where to put the history data files from the history php file narrative or the "help" file.

Suggestion, advice appreciated.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on June 24, 2020, 02:23:51 PM
As per previous post of 19/06/20 would really appreciate some advice/guidance if someone can spare a little time as still can't get the "history" function working on the kitz stat's utility.

I'am uploading the stat's to my RPi via the DSLStats "Data Store" function, presume that this is where the "historic data" is obtained from ?
Using the "Single file each day" option but have also tried the "Multiple files" option.
Tried selecting/de-selecting the "Items to include" options.

Have tried replacing the history.php file which lives in the "Webserver" folder with a fresh, downloaded copy just in case of any corruption in the original file.

All aspects of the utility did work perfectly when on my web site but I have given up this facility as no longer have any requirement for remote web access to my router stat's.
Title: Re: DSLstats webserver - Custom Interface
Post by: kitz on June 26, 2020, 05:47:22 AM
because im seeing the php code being echoed to the web page, Just checking that you have php installed?
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on June 26, 2020, 10:35:04 PM
@kitz:
Many thanks for the reply, very much appreciated especially under your current circumstances.

Quote
Just checking that you have php installed?
To my complete embarrasment, no.
Just shows how much I know, apologies for my ignorance on the subject.

Apache2 and php now installed on my RPi 3B running "stretch" and access tested from local & remote web browsers.
However, still struggling with the same error, I believe it's because I am not placing the live files in the correct location.
The webserver files are by default located @ /home/pi/.dslstats/webserver
php default file directory is /var/www/html
Totally confused as to where the history.php script expects to find the live data files which I believe is now the issue.

I appreciate that a third party routine will need to be deployed to refresh the live data files at a chosen frequency to provide historical information.
Title: Re: DSLstats webserver - Custom Interface
Post by: broadstairs on June 27, 2020, 09:28:06 AM
Well I have no idea what you've done but the history page is working now for me.

As for updating the files you can get dslstats to either save the files directly to the required location assuminig it is running n the same PC, or you can get dslstats to either upload the files or ftp them.

Stuart
Title: Re: DSLstats webserver - Custom Interface
Post by: g3uiss on June 27, 2020, 11:51:32 AM
Should you not be using Datastore but Webserver files and note a separate option for uploading  snapshots which is where history data is derived from.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on June 27, 2020, 05:22:10 PM
Should you not be using Datastore but Webserver files and note a separate option for uploading  snapshots which is where history data is derived from.

Yes, you are correct of course, the history php routine expects the DSLStats "Data Store" upload option to be active and the data to be stored in the /var/www/html default folder in order to be able to access the historical data.

After a logical re-think of my requirements, I don't really require the utility history option, I don't wish to store the historical data on the RPi, I currently archieve my stat's snapshots off to the NAS on a 4 day basis and can review these easily on my desktop PC using either the kitz or the broadstairs utilities, again, can view the current stat's either directly on DSLStats via VNC or via either viewing utility.
Use of the DSLStats "Data Store" upload service to a RPi location would only be unnecessary data duplication in my case.

I appreciate that I could use the DSLStats "FTP Uploads" facility to automate the "Data Store" transfer to NAS but I find this too complex to implement and not really necessary for my requirements.

Many thanks to all for advice and assistance offered.
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on February 15, 2021, 02:19:55 PM
For those following my line, stats should be back online, migrated laptop over to win10 and I was fighting some problems, but back online now.

For anyone who might be curious I dont mind sharing my winscp batch script, on how I get the historical stats uploaded to my server, martin, and ned are also using it.  The main live stats are uploaded via native sftp function on dslstats.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on February 15, 2021, 05:32:24 PM
@Chrysalis:

Quote
For anyone who might be curious I dont mind sharing my winscp batch script, on how I get the historical stats uploaded to my server, martin, and ned are also using it.  The main live stats are uploaded via native sftp function on dslstats.

Yes please, a copy would be appreciated.
Might inspire some further action regarding my stumbling attempts at getting the historical data function operational on my setup as outlined earlier in this post, plenty of time to "play" now with ongoing restrictions.
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on February 15, 2021, 06:24:16 PM
No worries, the path it sends from matches the snapshots directory configured in dslstats.  I have save in daily folders ticked. dslstats generates first snapshot at 5 past midnight and every 24 hours after.

This batch script runs daily in task scheduler 10 minutes past midnight.

You will need to edit paths to winscp, paths to your data, as well as login details for server, also depends how your server is configured, mine supports sftp which it uses as its incredibly fast vs normal ftp.

Code: [Select]
@echo off

set datefix=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%

xcopy /E /I /C /F /Y D:\BACKUP\dslstats\Snapshots\%DATEFIX% D:\BACKUP\dslstats\snaptemp\%DATEFIX%

"D:\BACKUP\WinSCP\WinSCP.com" ^
  /log="D:\BACKUP\WinSCP2.log" /ini=D:\BACKUP\WinSCP\WinSCP.ini ^
  /command ^
    "open sftp://<USERNAME>:<PASSWORD>@<HOSTNAME>:<PORT>/ -hostkey=<CERTIFICATE HASH> -rawsettings FollowDirectorySymlinks=1 FtpPingType=0 Ftps=3 MinTlsVersion=12" ^
    "lcd D:\BACKUP\dslstats\snaptemp" ^
    "cd /DSLStatsWeb/Graphs/" ^
    "put -transfer=automatic %DATEFIX%" ^
    "exit"
   
rmdir /S /Q D:\BACKUP\dslstats\snaptemp\%DATEFIX%

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)

exit /b %WINSCP_RESULT%

Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on February 15, 2021, 11:10:46 PM
@Chrysalis:

Many thanks, much appreciated.
Will have a little play and adapt to suit my system.
Title: Re: DSLstats webserver - Custom Interface
Post by: hacktrix2006 on February 18, 2021, 05:05:39 PM
Thanks for the V2 interface, now running with rossallan/dslstats docker image.
Not sure how one goes to get history.php working but,the reset is working fine.

Link to my stats is in my Signature which will be on 24/7 from now on.
Title: Re: DSLstats webserver - Custom Interface
Post by: tiffy on February 19, 2021, 12:14:16 PM
A hopefully constructive suggestion regarding your DSLStats displays.
Change the tone range within DSLStats to reflect your VDSL provision, provides a more comprehensive display of Bit Loading, QLN and HLog parameters, attached, a Bit Loading graph recent snapshot on my line for comparison.

I am on 40/10 VDSL provision so you will have to extend the tone range to suit if on 80/20 VDSL service.
Title: Re: DSLstats webserver - Custom Interface
Post by: Chrysalis on September 24, 2021, 08:09:17 PM
I will update my stats page, I remember getting the files from Martin and others, but I seen on another stats page kitz and eric are both credited for dslstats and the page, so I will update mine to show that.

Thanks.