FlightAware Discussions

dump1090 logs?

If you omit --quiet then dump1090 will write decoded messages to stdout.

Where those go and how to edit the command line depends a lot on how you have installed dump1090.

Be aware that the format is not really machine readable…

Where DO they go? I removed --quiet and restarted dump1090. I don’t see any verbose logging in /var/log/syslog, messages, or /tmp/piaware.out. I’m running stock dump1090.

My new Pi will arrive today. When I set it up I plan to use dump1090-mutability.

What’s stock dump1090? Installed by hand, from a package, what package?
Probably your best bet is to look at the init.d script and see what redirection - if any - it does.

My new Pi will arrive today. When I set it up I plan to use dump1090-mutability.

That’ll log to /var/log/dump1090-mutability.log by default. You will have to edit the init.d-script to get verbose output, as it always adds --quiet by default.
(Edit: Actually, you could add ARGS="" to the end of /etc/default/dump1090-mutability and it’ll probably work)
(Edit2: I’ll add a config option. Should be a new version later today)

My goal is to eventually add a second pi running MRTG or PRTG and grab the data off the first pi and build graphs.

I also want to maintain an archive of all data received.

I have a couple terabyte drives attached so I have lots of space. I can then set up cron to rotate the logs every afternoon at 0000.

Thanks for your help.


From dump1090.sh
start() {
if -e $PIDFILE ]; then
## Program is running, exit with error.
echo “Error! $PROG is currently running!” 1>&2
exit 1
** ## Change from /dev/null to something like /var/log/$PROG if you want to save output.
./$PROG $PROG_ARGS 2>&1 >/dev/null &
echo "$PROG started"
touch $PIDFILE
Note the parts I bolded. I changed /dev/null to /tmp/dump1090.log but with quiet, it us usually an empty file.

That would be cool to see when done. Graphs would look nice. Good idea. Like to know how this is done.

Possibly a better option there is to make dump1090 periodically dump summary stats to disk which you can then collect. I’m looking at something like this to feed e.g. message rates to the web map anyway. What stats would you be looking for?

I also want to maintain an archive of all data received.

You might want to look at taking a feed from port 30005 and archiving that, that has all the raw message data in Beast format.
It’s slightly awkward to decode it later, but you can do it by starting a dump1090 in --net-only mode and then feeding your archived data to port 30004.

I see that in /tmp/piawarout that dump1090 is dumping a line of text containing the count of the messages received and sent to FA in the past 300 seconds.

12/30/2014 16:36:52 71950 msgs recv’d from dump1090 (1353 in last 5m); 71998 msgs sent to FlightAware
12/30/2014 16:41:52 73336 msgs recv’d from dump1090 (1386 in last 5m); 73385 msgs sent to FlightAware

MRTG could parse that data (msgs recv’d), (xxxx in last 5m), and (msgs sent) and build graphs on 300 second intervals.

This is similar to the way MRTG is used when collecting SNMP data from router and switch interfaces (Interface In Octets) (Interface Out Octets).

Graphical in/out stats, plus an archive would make a complete package.


dump1090-mutability 1.08.2302.14+1mu-6 has a LOG_DECODED_MESSAGES option now.

Those message counts don’t correspond to ADS-B message counts on the air, FWIW. They are counting the “FATSV” format messages, which are basically messages taking a periodic snapshot of the last known state of each seen aircraft. Not sure if that’s what you want to monitor or not.

Awesome. Thanks

I spoke too soon. I’m not clear on how to implement this.

Can someone point me how to install this and run it?


Install instructions are in this post
(The version info is slightly out of date in that post, but the instructions should still be correct)

To enable logging of decoded messages, either “sudo dpkg-reconfigure dump1090-mutability” and say yes to the relevant question (it’s near the end)
or edit /etc/default/dump1090-mutability and set LOG_DECODED_MESSAGES=“yes”

I installed and started dump1090-mutability. I see the log incrementing but I’m not sending data outbound to FA and not building html for local viewing or at least I don’t know where the httpd stuff is sitting.

Can someone who has configured this give me a hand please?


To use the internal webserver you need to do two things:

  1. enable the HTTP port: HTTP_PORT=“8080”
  2. clear NET_BIND_ADDRESS so that dump1090 will accept connections from other machines: NET_BIND_ADDRESS=""

Both are in /etc/default/dump1090-mutability
Then "sudo service dump1090-mutability restart"
Then you should have a HTTP server listening on 8080.

Or you can use dpkg-reconfigure to set the same things.

Step 2 may fix the piaware integration too (I remember a bug in piaware in this area that may be breaking things - forgot I’m running a fixed version)
(edit: pull request for that problem, if you’re interested)

If it’s still not working after that, can you show us your piaware logs, and “sudo netstat -ntap” output?

That fixed it thanks for your help.

Great! I have added a note to the dump1090-mutability post warning about the NET_BIND_ADDRESS issue.

Next release of dump1090-mutability will include a received messages counter in aircraft.json. You could extract this for use by MRTG (it should work fine if treated like a regular non-resetting counter i.e. MRTG computes the rate from the change in value over time).

This can be extended to other stats easily - what do you need?

Here’s a mrtg config fragment for grabbing message counts from dump1090.
You will need “jq” which unfortunately hasn’t made it into Raspbian yet. I built a copy of the upstream Debian package and put it on repo.mutability.co.uk.
Point the URL in the target definition at the base address of the dump1090 webserver or external webserver.

Target[nw_dump1090_messages]: `/usr/local/bin/fetch-dump1090-message-count.sh http://rpi.lxi:8081`
Title[nw_dump1090_messages]: NW antenna dump1090 messages
MaxBytes[nw_dump1090_messages]: 5000
Options[nw_dump1090_messages]: noo, nopercent
YLegend[nw_dump1090_messages]: messages/s
LegendI[nw_dump1090_messages]: messages/second:

And here is fetch-dump1090-message-count.sh, the script that does the fetching:


COUNTER=`wget -q -O - "$1/data/aircraft.json" | jq '.messages'`

if  -n "$COUNTER" ]; then echo $COUNTER; else echo UNKNOWN; fi
echo 0
echo 0
echo "dump1090 at $1"

Edit: Here’s another one to count active aircraft + active aircraft with recent positions:

Target[nw_dump1090_aircraft]: `/usr/local/bin/fetch-dump1090-aircraft-count.sh http://rpi.lxi:8081`
Title[nw_dump1090_aircraft]: NW antenna aircraft seen
MaxBytes[nw_dump1090_aircraft]: 500
Options[nw_dump1090_aircraft]: gauge, nopercent
YLegend[nw_dump1090_aircraft]: aircraft
LegendI[nw_dump1090_aircraft]: aircraft seen:
LegendO[nw_dump1090_aircraft]: aircraft with positions seen:


AC_TOTAL=`wget -q -O - "$1/data/aircraft.json" | jq '.aircraft] | select(.pos < 15)] | length'`
AC_POS=`wget -q -O - "$1/data/aircraft.json" | jq '.aircraft] | select(.seen_pos < 15)] | length'`

if  -n "$AC_TOTAL" ]; then echo $AC_TOTAL; else echo UNKNOWN; fi
if  -n "$AC_POS" ]; then echo $AC_POS; else echo UNKNOWN; fi
echo 0
echo "dump1090 at $1"