dump1090 logs?


#1

I don’t see a dump1090 log file in /var/log

I would like to see a log created that contains all the aircraft data being output.

Is there a place I can find that? If not can I specify on the command line when starting dump1090 to output to a file in addition to outputting to FA?

Would it eat too much CPU to do that?

Thanks


#2

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…


#3

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.


#4

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)


#5

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.

K1BAA


#6

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


#7

#8

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


#9

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.


#10

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.

K1BAA


#11

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


#12

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.


#13

Awesome. Thanks


#14

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

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

Thanks


#15

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”


#16

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?

Thanks


#17

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?


#18

That fixed it thanks for your help.


#19

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


#20

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?