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+.Thanks for the info will have a fiddle but SNRM graph I need as well as bitloading however its working great now.
sudo raspi-config
pico setup.sh
#!/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
chmod +x setup.sh
./setup.sh
sudo raspi-config
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.
Just point your browser at http://ip.of.pi/dslstats/stats.htm
<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>
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
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.
@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.Hi Kitz,
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.
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).
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
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.
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:
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.)
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!
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.
Why is there no G.INP ? And no G.Vector either? That is not good.
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.
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
Why is there no G.INP ? And no G.Vector either? That is not good.
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
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.
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. :'(
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.
Also interesting you commented about a v1 layout as well.
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).
. . . 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.
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:
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 :)
i downloaded the files in post 1 only a few days ago.... are those the most recent version?
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
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.
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
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. I can synchronise the files I have as I seem to have mixture of versions.
"> 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]
https://cddsystems.co.uk/index.htm
Have a shufty and let me know if it works :)
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.
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,
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.
I got my webspace but nothing is loading dslstats?
https://adslmax.wixsite.com/dslstats
<?
to <?php
should do the trick.#!/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 -- {} +
<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>
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 ?
find ${DSLstatspath}snapshots/. -type f -name "SNRM-*.png" -exec ln -sf -t ${DSLstatspath}SNRM "{}" \;
# Now delete any dead links where the original file has been removedStruggling to understand the format of the last line of code, can you elaborate further or point to reference ?
find -L ${DSLstatspath} -type l -exec rm -- {} +
<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>
<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>
#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
#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";
@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.
I get the linestats OK but lose the page formatting, any ideas please?
<iframe src="pbparams.txt" width="800" height="600" frameborder="0">
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">
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.
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 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.
Just checking that you have php installed?To my complete embarrasment, no.
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.
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.
@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%