Getting the most recent data from piaware

As nice as the graphs are over at flightaware.com/adsb/stats/ … I would like to generate my own.

So I was looking in the log, here: /var/log/piaware.log
…and thinking that I could just parse the log for the interesting numbers that I want.

Then I started to think that maybe there was a way to query the process directly (the one that is writing to the log in the first place) for the interesting numbers that I would like to graph. Why duplicate work, right?

So, is there any way to pull numbers directly from the piaware process(es) like positions/minute, messages received from dump1090, messages sent to flightaware?

I see those stats in the log, but maybe there exists a way to produce them? I don’t know enough about the piaware process(es) …

Any ideas? (thanks!)

If you just want to graph stats or record info to a database try this
ads-b-flight-tracking-f21/ads-b-receiver-project-setup-scripts-t36532.html

I have enabled logging for my dump978 feed into dump1090. I don’t get many position hits so I shouldn’t fill up the logs.
If I did it for dump1090 (I get 1 million receive reports per day that go to FA. Probably 10 times as much don’t make it) then I would quickly fill up the file system.

You can also send the traffic for VRS or modesmixer.

While that looks like a full project, I am not sure installing additional stuff is the direction I wish to take.

Really, I have a graphing solution in place, all it is missing are the numbers generated by piaware.

I would rather poll the existing processes for the numbers, but if pulling them out of the log file is going to be more straightforward, then that is the approach I will have to take.

I am not sure what I was hoping for, perhaps a way to have the existing processes spit out the numbers sent to FlightAware. As I really have no idea of the inner workings of the dump1090 or piaware software, the log file offered me a tantalizing insight into what numbers are generated.

The graphs on the user adsb page are quite nice, and I could be satisfied with that report, but I felt it would be better from an analytical standpoint to have a second set of graphs for comparison.

piaware doesn’t produce stats in an easy-to-consume form.

dump1090 does; see /run/dump1090-fa/stats.json

I don’t have that directory on this system. I bought a preconfigured kit from Amazon, thinking that would be the fastest way to get up an running. There is a /run/piaware/status.json … but I have no idea what to do with that file either.
Thanks for the information, would you please elaborate?

Well, hard to say without knowing what software you’re running. If you use a piaware sdcard image then it will have dump1090-fa.

I had purchased this kit: a.co/22EXP3u

And it is Raspbian GNU/Linux 8 (jessie).

I believe that the piaware version installed is 3.1.0~bpo8+1

I see that via ‘aptitude show piaware’ that it “suggests” dump1090-fa, but when I make a query about that package, it returns with:
No current or candidate version found for dump1090-fa
Package: dump1090-fa
State: not a real package

So I believe that I do not have that software installed. I hope this is more information that is useful, and thanks for your assistance!

What does " dpkg -l ‘dump1090*’ " say?

Thanks for your interest and assistance!

Here is the result:



~ $ dpkg -l 'dump1090*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  dump1090       1.2-3        armhf        ADS-B Ground Station System for R
un  dump1090-fa    <none>       <none>       (no description available)


Ok. That version of dump1090 does not provide stats in any useful form. I suggest you upgrade it to dump1090-fa (you can probably do that via the stats page upgrade-dump1090 command).

OK, so via the stats page, I asked it to upgrade all debian packages. The result of " dpkg -l ‘dump1090*’ " is now:


~ $ dpkg -l 'dump1090*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  dump1090       3.1.0        all          transitional dummy package for du
ii  dump1090-fa    3.1.0        armhf        ADS-B Ground Station System for R


…and looking in the /run/dump1090-fa directory, I now see a stats.json

Any suggestions on how best to process that file as I see quite a bit of stuff in there. Is the file format explained somewhere as well as what some of the fields mean? I think I can sort out what some of them are, but I sure would appreciate a detailed description.

Thanks again for the clue about upgrading, I didn’t realize that this piaware system was downlevel. The new stats webpage is much nicer!