System Monitoring

Maybe. Ive killed 2 so far (one from ebay before i realized there was a problem) and 1 Verbatum.
The Verbatum SD from kmart for $8 are bubble packed premium 8gb class 10 in bubble pack. I can certanly pay a lot more around town but I’m not convinced ill have much more luck short of getting the industrial rated ones from RS or Element14.

I tried this but it does not work because systemctl is not available/installed on my Raspian Wheezy system. I found on the Internet that I may need to install


sudo apt-get install systemd systemd-sysv

but this is telling me:


WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  sysvinit
0 upgraded, 7 newly installed, 3 to remove and 1 not upgraded.
Need to get 1,580 kB of archives.
After this operation, 3,557 kB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?]

Naturally, since I don’t know exactly what I’m doing, I answered ‘no’ and the installation aborted. Would you know if it was safe to install/remove these packages?

If you are running wheezy then I wouldn’t mess with installing systemd unless you are already familiar with it, otherwise you are asking for a world of hassle getting things working. It will affect everything installed on the machine, so in most cases it’s not worth it and is easier to just start with a fresh Jessie installation (or arch if you like tinkering) rather than try to upgrade.

OK, thanks, makes sense! Time to start over with a fresh Jessie then :slight_smile:

With you there caius as far as systemd goes. Unless your going from Wheezy to Jessie doing a dist-upgrade using Jessie repositories I wouldn’t attempt it. Even then your probably better off going with a fresh installation of Jessie. Jessie is coming up on a year old and for applications such as those discussed here is more than matured enough to run them stably. I do not see why it is not used more so than Wheezy here.

The foundation images only started using Jessie about 3 months ago, and the piaware sdcard images are still wheezy-based (I’m working on that…) which is probably why wheezy is still mostly used here.

Something I noticed - If you are going to use the anything-sync-daemon it’s worth checking that your /tmp directory is actually mounted on tmpfs. The standard Raspbian Jessie image doesn’t do this by default, so you won’t see any reduced disk writes.

The /etc/fstab file should contain:


tmpfs /tmp  tmpfs defaults,noatime 0 0

Add this, and either reboot or do


sudo mount /tmp

to get it working.

To check all is OK do


df -T /tmp

You should see output with the type indicating tmpfs.

Make sure you stop anything-sync-daemon before doing this to allow it to write anything new back to its proper location, then restart afterwards.

Quite an improvement there. Might have to give it a try and possibly free up a WD Elements drive for use someplace else to be figured out at a later date. Although it has made for an extra place to store files on my home network where it’s at now…

Defiantly makes sense. Know your a busy person but glad to hear your working on a Jessie image.

Perfect timing. :slight_smile:

I was looking at my collectd graphs and trying to figure out why my I/O stats weren’t lower.

Thanks!

I have been curious how much data is flowing to/from my “production” piaware box. My primary feeder is used solely for Dump1090-mutability and piaware with no feeds to other sites or utilities. I have been playing with two tools: nethogs, and vnstat.

Nethogs: shows current network utilization for running processes
Installation: sudo apt-get install vnstat
Operation: sudo nethogs
Sample output:


NetHogs version 0.8.0

  PID USER     PROGRAM                                         DEV        SENT      RECEIVED
1985  root     /usr/bin/piaware                                eth0       0.756       5.240 KB/sec
29446 pi       sshd: pi@pts/0                                  eth0       0.000       0.000 KB/sec
?     root     unknown TCP                                                0.000       0.000 KB/sec

  TOTAL                                                                   0.756       5.240 KB/sec



Another tool for long term network monitoring: vnstat (tracks network statistics and saves to database)
installation: sudo apt-get install vnstat
Operation: Automatically collects stats on network in background
Sample of default output:


pi@piaware ~ $ vnstat
Database updated: Wed Jan  6 12:10:29 2016

   eth0 since 01/05/16

          rx:  426.56 MiB      tx:  654.82 MiB      total:  1.06 GiB

   monthly
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
       Jan '16    426.56 MiB |  654.82 MiB |    1.06 GiB |   18.62 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated      2.34 GiB |    3.59 GiB |    5.94 GiB |

   daily
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     yesterday    313.57 MiB |  478.69 MiB |  792.25 MiB |   75.12 kbit/s
         today    112.99 MiB |  176.13 MiB |  289.12 MiB |   54.04 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       220 MiB |     347 MiB |     567 MiB |


Sample of hourly rates:


pi@piaware ~ $ vnstat -h
 eth0                                                                     12:10
  ^                  t
  |               t  t     t                                   t  t  t
  |   t     t  t  t  t  t  t                                t  t  t  t
  |   t  t  t  t  t  t  t  t                                t  t  t  t  t
  |   t  t  t rt rt rt  t rt  t  t                          t rt rt rt  t
  |  rt rt rt rt rt rt rt rt  t  t  t                    t rt rt rt rt  t
  |  rt rt rt rt rt rt rt rt rt  t  t                    t rt rt rt rt rt
  |  rt rt rt rt rt rt rt rt rt rt rt                   rt rt rt rt rt rt
  |  rt rt rt rt rt rt rt rt rt rt rt  t              t rt rt rt rt rt rt
  |  rt rt rt rt rt rt rt rt rt rt rt rt           t rt rt rt rt rt rt rt  t
 -+--------------------------------------------------------------------------->
  |  13 14 15 16 17 18 19 20 21 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12

 h  rx (KiB)   tx (KiB)      h  rx (KiB)   tx (KiB)      h  rx (KiB)   tx (KiB)
13      17169      25675    21      12987      20597    05       3216       8438
14      17671      24686    22      11740      18995    06       9363      15977
15      18454      27364    23       9850      15916    07      16643      25209
16      19573      27380    00       3885       7233    08      20044      28596
17      19116      28175    01        752       2090    09      20257      29536
18      21781      31176    02        605       1774    10      21279      28601
19      18186      27137    03        766       2563    11      15437      22333
20      19275      28533    04       1202       4852    12       2251       3155


Other options:


pi@piaware ~ $ vnstat -?
 vnStat 1.11 by Teemu Toivola <tst at iki dot fi>

         -q,  --query          query database
         -h,  --hours          show hours
         -d,  --days           show days
         -m,  --months         show months
         -w,  --weeks          show weeks
         -t,  --top10          show top10
         -s,  --short          use short output
         -u,  --update         update database
         -i,  --iface          select interface (default: eth0)
         -?,  --help           short help
         -v,  --version        show version
         -tr, --traffic        calculate traffic
         -ru, --rateunit       swap configured rate unit
         -l,  --live           show transfer rate in real time


Cheers!
LitterBug

In relation to Anything-sync-daemon,

Implemented this on a new Jessie install. Also followed your advice about /tmp directory being mounted on tmpfs (http://discussions.flightaware.com/post186256.html#p186256
I specified the following directories:


WHATTOSYNC=('/var/log' '/var/lib/collectd' '/var/www/html/graphs')

And Disk I/O is practically down to zero :smiley: Thank you for the advice and instructions!

Thanks for the awesome info. I was looking for something like this. I’ll have to share this nice program. :smiley:

iptraf is another tool to consider. It is ncurses based and can be cryptic for customizing, but the default will easily show all port traffic, both on the loopback and externally. I find iptraf especially helpful to check that all my expected connections are flowing data.

Edit: typo fix.

Avg 0.9 write iops (and 0.2 write iops for last 6 hours):

Hi guys,

Sorry to drag this thread out, but I’m having a problem, I am trying to generate the following graph and rrdtool is giving me a segmentation fault and no other info…

aircraft_message_rate_graph() {
rrdtool graph
“$1”
–start end-$4
–width 428
–height 200
–step “$5”
–title “$3 Message Rate / Aircraft”
–vertical-label “Messages/Aircraft/Second”
–right-axis-label “Aircraft”
–lower-limit 0
–units-exponent 0
–right-axis 10:0
“TEXTALIGN:center”
“DEF:aircrafts=$2/dump1090_aircraft-recent.rrd:total:AVERAGE”
“DEF:messages=$2/dump1090_messages-local_accepted.rrd:value:AVERAGE”
“CDEF:rate-provisional=messages,aircrafts,/”
“CDEF:rate=aircrafts,0,GT,rate-provisional,0,IF”
“CDEF:aircrafts10=aircrafts,10,/”
“VDEF:avgrate=rate,AVERAGE”
“VDEF:maxrate=rate,MAXIMUM”
“LINE1:rate#0000FF:Messages / AC”
“LINE1:avgrate#666666:Average:dashes”
“GPRINT:avgrate:%3.1lf”
“LINE1:maxrate#FF0000:Maximum:”
“GPRINT:maxrate:%3.1lf\c”
“LINE1:aircrafts10#990000:Aircraft Seen / Tracked (RHS) \c”
–watermark “Drawn: $nowlit”;
}

Has anyone else had this issue and have a solution they would care to share? rrdtool version is 1.5.4… On Ubuntu ARM… (Pi2 with Ubuntu on it) (not the radar host)…

Thanks people!

Hi jepolch. I am using Raspbian Stretch, when I get as far as the cd ~/pi/dump-tools there is no pi directory. Not sure if this is a difference in the Raspbian version. When I check for /collectd I get a 404 error. I created a pi directory and re ran the script but the directory is empty and still get a 404. Do you have any ideas? Sorry bit of a Luddite.
Regards
Rick

This is for anyone one who might be obsessed with numbers and statistics and looking at their PiAware devices’ performance in real time, with lots of graphs and drill-down, and barely making a dent in the devices’ resources (CPU/memory) - it’s called netdata

This is a deep dive into everything that’s on the Pi except the piaware and dump1090 application data - there are numerous ways to get into that already presented by others in this forum. I find the netdata application to be able to see the guts of the operating system/device metrics in picture and numeric form without having to program anything. Kind of like using an oscilloscope to poke around electronics… Short term, detailed information that doesn’t disturb the device being measured (much).

The installation instruction for a Pi is relatively simple for any Linux host:

bash <(curl -Ss https://my-netdata.io/kickstart.sh)

The link to the installation details is:

If one is comfortable with the command line and logging into a Pi, it is reasonably simple to install and get running, and ‘just works’ without a huge performance penalty on my Pi 3B (not +!):

image

One can spend a lot of time staring at the details!
My PiAware system overview looks like this (there is a LOT more detail) -

Check out the live demo sites for lots of pretty graphs…

2 Likes

not obsessed but fascinated by graphical representations, charts, maps etc. computer art :wink:
thanks for the post. what I find interesting is https://github.com/firehol/netdata/wiki/External-Plugins
which provides opportunities to make direct, own/customized stats (if computer literate :wink: )
even for apps that do not provide stats, say, Dump1090 by Malcolm Robb.

Add some nice system monitoring with rpimonitor using simple ‘iframe’ tag in dump1090 web page.
Also added ‘feeders’ running service into it.

its for learning purpose only though.

3 Likes

Dear Jepolch,

Hi! I could not find the link to the web_install.sh script file since raspi.ayadex.com no longer exist. Do you still have the raw file of the web_install.sh ? I want to install the ADS-B Performance Monitor into my existing ADS-B feeder @ rodyeo.dyndns.org

Thanks.

Rodney