System Monitoring

UPDATE: Orange Pi + Raspbian_For_OrangePi_PC_v0_8_0 :

Tried changing the path, tried using user pi, all failed with Xforce’s installation script for rrdtools/collectd.

Tried @jprochazka’s scripts, failed with many issues.

Tried throwing Orange Pi in garbage bin - success.

You can try the manual installation instructions I posted a while back here:
post184307.html#p184307

The GitHub link contained in that post has been moved to github.com/jprochazka/adsb-feed … tal/graphs.

Place these files anywhere just note the path.
Place the HTML file in the directory /var/www/html/. (/var/www/html/ is the root directory for the default website for Jessie however this may differ on yours.)
Replace the existing /etc/collectd/collectd.conf file with the one posted in the linked post.
Create the directory /var/www/html/collectd.
chmod 777 /var/www/html/collectd.
Replace in all the files and also the crontab below with the path to where you placed the files taken from GitHub earlier.
Restart collectd.

For the sake of neatness the cronjobs should be placed in a new file called something like /etc/cron.d/adsb-feeder-performance-graphs instead of a user’s crontab and should look like this:

*/5 * * * * root bash /make-collectd-graphs.sh 1h >/dev/null
*/10 * * * * root bash /make-collectd-graphs.sh 6h >/dev/null
2,12,22,32,42,52 * * * * root bash /make-collectd-graphs.sh 24h 180 >/dev/null
4,24,44 * * * * root bash /make-collectd-graphs.sh 7d 1200 >/dev/null
6 * * * * root bash /make-collectd-graphs.sh 30d 5400 >/dev/null
8 */12 * * * root bash /make-collectd-graphs.sh 365d 86400 >/dev/null

After doing this run the following command and report any errors you may encounter. I will do my best to help out.
sudo /make-collectd-graphs.sh 1h

As a side note my scripts have not been tested on an Orange Pi. I know it runs a different kernel and honestly don’t know how well their repositories mirror that of Debian’s or Raspbian’s that well or are even that well maintained for that matter. It is the main reason I am planning to pick one up to see if it is going to be worth while to make it work on that device. There was also an issue reported to me with the CPU graphs on versions of collectd older than v4.2 which is newer than that ran by Wheezy.

I would be interested to know what error occurs when using the scripts to install the graphs on the Orange Pi if anyone has them committed to memory or written down somewhere. :slight_smile:

@jprochazka This is what I have from last nights install of your script.

Failure in install.sh at line 490, Manually install whiptail to fix

Dump mute not performing and generating obscure USB errors in log, Manual install of rtl-sdr libs appears to fix

No sign of dump1090 mutability rrd’s, system rrd’s are there and appear to be updating.

A lot of the collectd graphs stuff isn’t installed.
no /home/pi/adsb-feeder/bash/portal/build/portal/graphs/
This is the result of running graphs.sh


Backing up and replacing the current collectd.conf file...

Reloading collectd so the new configuration is used...

 ok ] Reloading collectd configuration (via systemctl): collectd.service.

Placing performance graph HTML file in Lighttpd's www root directory...

mkdir: cannot create directory ‘/var/www/html/collectd’: File exists
mkdir: cannot create directory ‘/var/www/html/graphs’: File exists
cp: cannot stat ‘/home/pi/adsb-feeder/bash/portal/build/portal/graphs/html/*’: No such file or directory
Adding jobs to crontab...

chmod: cannot access ‘/home/pi/adsb-feeder/bash/portal/build/portal/graphs/make-collectd-graphs.sh’: No such file or directory
tee: /etc/cron.d/adsb-feeder-performance-graphs: No such file or directory

FA install and PF install appear ok, there are errors and a stuck in loop associated with ADSB exchange install but i didn’t catch them at the time.

Took it for granted that whiptail is installed by default on all Debian and Debian derivative distros being it is used for both operating system installation and system recovery. I added a check tonight to install.sh for the whiptail package to the script to be safe.

I am surprised that the package librtlsdr-dev even installed without librtlsdr. librtlsdr0 is a dependency for librtlsdr-dev. I have not ran into this issue on any of the other tested distros but will check this out once I have an Orange Pi in hand.

Out of curiosity did you execute the graphs.sh script directly while within the directory /home/pi/adsb-feeder/bash/portal/? If so that would be the reason the path is so far off. The script graphs.sh is supposed to be executed by the install.sh script. The users pwd (present working directory) from where the script was executed is used to generate the path to files needed during and after installation. By executing graphs.sh directly the scripts saw the root directory where the files were cloned as /home/pi/adsb-feeder/bash/portal/ instead of /home/pi/adsb-feeder/ which would have been the directory from which install.sh was executed. If this was not the case let me know if you do not mind.

I use the pwd from where the install.sh script was executed so that no matter where the repository is cloned the path is proper with no need to conform to where I feel you should be downloading the scripts.

Will look into the loop. I know the maintenance script they supply goes through a continual loop to fire netcat. Have not seen any errors in my logs regarding this, however I may not have looked that closely.

Thanks for the Orange Pi info it was much appreciated!

That Debian Jessie mini is fairly stripped down, not sure what it is based on?
This is my manual install list for dump, if its any help


sudo adduser pi
sudo adduser pi sudo
apt-get update
sudo apt-get install ca-certificates
sudo apt-get install cron
wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr0_0.5.4.git-1_armhf.deb
wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr-dev_0.5.4.git-1_armhf.deb
sudo dpkg -i librtlsdr0_0.5.4.git-1_armhf.deb
sudo dpkg -i librtlsdr-dev_0.5.4.git-1_armhf.deb
apt-get update
sudo apt-get install git-core
mkdir git
cd git
git clone https://github.com/mutability/dump1090.git
sudo apt-get install librtlsdr-dev libusb-1.0-0-dev pkg-config debhelper
cd dump1090
dpkg-buildpackage -b
cd ..
sudo dpkg -i dump1090-mutability_1.15~dev_armhf.deb
sudo apt-get install lighttpd   
sudo lighty-enable-mod dump1090
sudo service lighttpd force-reload
sudo nano /etc/lighttpd/lighttpd.conf      "set server.document-root =/var/www"

Yes i ran it from /home/pi/adsb-feeder/bash/portal/, i noticed a warning in the script later about not doing it that :wink: so that explains some of the errors but /graphs/ with make-collectd-graphs.sh etc. are still not there

You might be missing a couple dependences including the collectd and rrdtool packages by skipping directly to the graphs.sh script.

Paths more than likely are also be fouled up in the files /etc/collectd/collectd.conf and /etc/cron.d/adsb-feeder-performance-graphs which will cause make-collectd-graphs.sh to not work properly. Either try and fix these manually or you could try running install.sh again and selecting only to install the portal once more. Doing so should set the paths right. You can skip through, actually you should be automatically skipped past the rest of the items you already installed such as dump1090 and the feeders which were already installed.

Edit:

Just ran a test on this and will address it soon but if you do run the scripts again to try and fix things up edit /etc/cron.d/adsb-feeder-performance-graphs and remove the TOP “duplicate” commands. I will be have this overwrite any existing cron file by that name shortly. More than likely the fix will come some time tomorrow.

I’ve got the dump1090 graphs working on my OrangePi running Debian-jessie-mini

Created a user Pi and added to sudoer list. Might not have been needed since there is an orangepi user (I’ll check that later but for now just wanted to update on progress)

Abandoned the scripts and worked through their contents line by line.

Some of the sudo commands to create directories result in them being owned by root. The subsequent commands to wget files into those directories fails because the command is performed as the non-root user. So some of the later commands relying on those downloaded files don’t work.

Next problem is that Jessie changed the web server default from /var/www (in Wheezy) to /var/www/html.

So these commands need to be changed:
sudo mkdir /var/www/html/collectd
cd /var/www/html/collectd

Also the make-graphs.sh script needs the same changes made (add html/ in eight places using search and replace)

Then the graphs appeared in ](http://)<>/collectd.

Nothing for Core Temperature but rrd install failed with a dpkg error which might be the reason -doesn’t matter - mostof the data is there! Just need to do the crontab bit now.

@idh
Thanks for the tip. I will now do the same for Orange Pi running “Raspbian_For_OrangePi_PC_v0_8_0”, i.e. abandon the rrdtools/collectd auto install scripts and use their commands manually one by one, so that in case of any error, it is easy to debug.

Since this procedure is tedious & time consuming, I may not be able to do it immediately.

Anyway my Orange PI PC is running great with Raspbian_For_OrangePi_PC_v0_8_0, dump1090-mutability v1.15~dev, Piaware data feeder, Planefinder data feeder, and Flightradar24 data feeder. :slight_smile:

@jprochazka I did execute the install.sh with all options enabled originally, messing with graphs.sh only happened while trying to figure out what was going wrong. Turned out some of the problem was the absence of cron, installing that sorted out some of the problems as you would expect :unamused:

Executed install again as per ur suggestion, now most of the system graphs are there but no mute graphs or mute map displayed, mute .rrd files are still not being installed. Too much on at the moment and no time,will look at again after Christmas

@idh, Is it the xforce script that you are using? If so I found it easier to edit the lighttpd config file and change the base path back to the /var/www that the script expects. jprochazka’s portal script appears to be aware of the changes to lighttpd that jessie brought, anyway that part worked ok on my portal install.

I may not be using the latest script - with 14 pages of commentary (and coming in for the first time at page 14), it is not easy to figure out what has changed or which one to use. It seems to be the xforce version I’m using and I’ve just found that also causes problems if the user is not pi since the “/home/pi” directory is hard coded into collectd.conf. Once I changed that to /home/orangepi" the rrd files were created correctly.

If you recommend " jprochazka’s portal script", I suggest that he posts that in a “System Monitoting (Part 2)” thread so we get the latest and greatest up font and obvious :wink: for newcomers.

Whatever - the effort was worth it :smiley:

Was thinking the same the other day.
Going to try and wrap up a couple issues, mainly having to do with wheezy compatibility, over the next couple days and do this.

When you get around to it try executing the script manually from a prompt and report any errors you receive.

Was thinking the same the other day.
Going to try and wrap up a couple issues, mainly having to do with wheezy compatibility, over the next couple days and do this.

Thank you sir - it’ll make life easier for those coming to the party late :laughing:

@jprochazka, I had a chance to clone a fresh copy of your script from git tonight and tried the install. Unfortunately still no dump1090 mute related .rrd files so no mute graphs and no map. errors are as you would expect.


pi@OrangePI:~/adsb-feeder$ sudo ./install.sh
-------------------------------------------
 Now ready to install dump1090-portal.
-------------------------------------------
The goal of the dump1090-portal portal project is to create a very
light weight easy to manage web interface for dump-1090 installations
This project is at the moment very young with only a few of the planned
featured currently available at this time.

https://github.com/jprochazka/dump1090-portal

Press enter to continue...

Installing packages needed to build and fulfill dependencies...

Checking if the package collectd is installed... [OK]
Checking if the package rrdtool is installed... [OK]

Installing homepage...


Placing homepage HTML file in Lighttpd's www root directory...


Installing map container...


Placing map HTML file in Lighttpd's www root directory...

mkdir: cannot create directory ‘/var/www/html/map’: File exists

Installing performance graphs...


Backing up and replacing the current collectd.conf file...

Reloading collectd so the new configuration is used...

 ok ] Reloading collectd configuration (via systemctl): collectd.service.

Placing performance graph HTML file in Lighttpd's www root directory...

mkdir: cannot create directory ‘/var/www/html/graphs’: File exists
Adding jobs to crontab...
Removing previously installed cron file...


Installing performance graphs...


Adding links to the Plane Finder ADS-B Client web interface to the portal pages...


Installation and configuration of the performance graphs is now complete.
Please look over the output generated to be sure no errors were encountered.



If you are running on an OrangePi you’ll need to install the systemd-cron package, the loboris images seem to be missing that package and none of the cron jobs will run without it. Once I installed that on my Wily install I got the Dump1090 graphs, (still missing the rest of the graphs, but I’m still working that one out.)

Six hour ago I installed loboris image “Ubuntu Vivid Mate” + All adsb-software, on Orange PI PC. http://discussions.flightaware.com/post185768.html#p185768

I did not install systemd-cron package. Still the graphs are being plotted (except the temprature, which I have yet to debug).

@jprochazka: I am planning to format my microSD card, and again burn the image of Ubuntu Vivid Mate, but this time use your script to install the ads-b software to see how it goes with this distro.

@dschaper Yes cron and ca certificates package both need to be installed with the loboris builds that i have tried. I think there is something a bit more obscure missing that causes the problem with jprochazka’ script, and they look a bit complicated for me to work through :confused: .

@abcd567 It will be interesting to see if you get the same result with your new install.

Slightly off topic but are others seeing a lot of SD card writes ( Disk I/O Bandwidth below) running these OPI PC builds?

Barring a few tweaks all credit goes to xforce and the previous contributors to this thread
http://i.imgur.com/PbGftm6.jpg

@jprochazka

============ FIRST ATTEMPT ===========

Tried to install adsb stuff using your script on Orange Pi PC / Ubuntu Vivid Mate.
first added user “pi”, included in sudo. then reboot, loged in as “pi”, ran the code on github wiki page.
After first attempt, checked, found
http : // … 404 NOT FOUND :frowning:
http : // /dump1090/gmap.html … 404 NOT FOUND :frowning:
http : // /graphs … 404 NOT FOUND :frowning:
Rebooted, checked again, same result :frowning:

Gave following command

pi@OrangePI:~$ cd adsb-feeder
pi@OrangePI:~$ sudo ./install.sh

It said it did not find dump1090 and web portal, then proceeded to installed these two. On completion, checked again, same result 404 Not Found :frowning:

=========== SECOND ATTEMPT =============

Instead of debugging, I took an easy way. I formatted the microSD card, and burned “Ubuntu Vivid Mate.img” on it - a clean fresh install.



orangepi@OrangePI:~$ sudo adduser pi
orangepi@OrangePI:~$ sudo adduser pi sudo
orangepi@OrangePI:~$ sudo reboot


At reboot, loggedin as user “pi”

pi@OrangePI:~$ sudo apt-get install git
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package git
pi@OrangePI:~$ sudo apt-get update
pi@OrangePI:~$ sudo apt-get install git
pi@OrangePI:~$ git clone github.com/jprochazka/adsb-feeder.git
pi@OrangePI:~$ cd adsb-feeder
pi@OrangePI/adsb-feeder:~$ sudo chmod +x install.sh
pi@OrangePI/adsb-feeder:~$ sudo ./install.sh

It went through a long process then announced everything installed successfully. checked, found 404 Not Found :frowning:



pi@OrangePI:~$ sudo reboot


Again checked, found everything working :slight_smile: except:
(1) Max Range Graph.
(2) Flightaware feed (CA problem)

12/28/2015 14:54:31 TLS handshake with adept server at piaware.flightaware.com/1200 failed: handshake failed: certificate verify failed
12/28/2015 14:54:31 reconnecting in 111 seconds…
12/28/2015 14:54:48 7066 msgs recv’d from dump1090-mutabi (640 in last 5m); 0 msgs sent to FlightAware
12/28/2015 14:56:22 Connecting to FlightAware adept server at piaware.flightaware.com/1200
12/28/2015 14:56:22 Connection with adept server at piaware.flightaware.com/1200 established
12/28/2015 14:56:23 TLS verify failed: self signed certificate in certificate chain
12/28/2015 14:56:23 Failing certificate:
12/28/2015 14:56:23 sha1_hash: B69ABB0BF41433F4E27434BF6628CE1EA1CAA704
12/28/2015 14:56:23 subject: CN=FlightAware Root,OU=Operations,O=FlightAware LLC,L=Houston,ST=TX,C=US
12/28/2015 14:56:23 issuer: CN=FlightAware Root,OU=Operations,O=FlightAware LLC,L=Houston,ST=TX,C=US
12/28/2015 14:56:23 notBefore: Dec 9 16:50:04 2015 GMT
12/28/2015 14:56:23 notAfter: Dec 4 16:50:04 2035 GMT
12/28/2015 14:56:23 serial: A9FE756D9E6B94B4
12/28/2015 14:56:23 TLS alert: unknown CA
12/28/2015 14:56:23 TLS error: certificate verify failed
12/28/2015 14:56:23 TLS handshake with adept server at piaware.flightaware.com/1200 failed: handshake failed: certificate verify failed
12/28/2015 14:56:23 reconnecting in 66 seconds…
pi@OrangePI:~$

Maybe this will solve:



pi@OrangePI:~$ sudo apt-get install ca-certificates


EDIT: ran above command then checked after 5 minutes & 10 minutes, no success

Maybe this will solve:



pi@OrangePI:~$ sudo apt-get install ca-certificates


acdd567,

You used jprochazka install commands to go the graphs. Did you also use them to install Piaware and Dump1090-Mutability or not? Thanks.

The only thing I installed myself was “Ubuntu_Vivid_Mate.img”.
Immediately after this I ran jprochazka’s install command, and his “install.sh” did the rest of the job (i.e. it installed dump1090-mutability, Piaware, rrdtools/collectd, and the webportal page).