Dump1090 stats.json underreporting

I’ve been running dump1090 for some time and recently started graphing the stats. The data.json file seems to be underreporting the number of tracks for the last 1, 5 and 15 minutes. At times when the stats file indicates just a few tracks in the last minutes, the live html view shows many more active tracks. Is anyone else seeing the same behaviour?

What data value are you graphing?

I’m using the track values:

last1min/tracks/all
last5min/tracks/all
last15min/tracks/all

The cpr values seem more valid:

last1min/cpr/local_ok
last5min/cpr/local_ok
last15min/cpr/local_ok

All the stats are counting events over the given time period. (exception: the signal power data and CPU data, which are average power or peak power or average CPU over the time period)

The event that “tracks/all” counts is creation of a new aircraft track; so those stats are telling yow how many new aircraft tracks were seen in the last 1/5/15 minutes.

You can’t compare that directly to the number of active tracks at a point in time, because some of those active tracks might have been created outside the window of time covered by the stats data value, and some tracks counted in the stats may no longer be active.

If you want to monitor the number of aircraft active at a point in time, count them in aircraft.json

Ah! Thanks for the clarification. I thought that “tracks” was current tracks, not newly created tracks. The 1/5/15 minute CPR values seem to be what I’m looking for.

Cheers,
Len

The CPR values are counting a (specific type of) position report, essentially; not sure if that’s what you’re after.

I assume you have found dump1090/README-json.md at master · flightaware/dump1090 · GitHub ? (It is a bit out of date)

Yes, I read that doc which is what got me started. Now I’m back to the beginning. If “tracks” is telling me how many tracks were started during the period, CPR is a specific type of report then I guess there is no variable in the stats file that tells me “how many tracks were active/visible” during the previous 1/5/15 minute periods. Do I need to deduce that from the aircraft history files?

You can just count aircraft.json every minute.

GitHub - wiedehopf/graphs1090: Graphs for readsb / dump1090-fa / dump1090 (based on dump1090-tools by mutability)

There’s no statistic that directly measures this, as wiedehopf says you’ll need to poll aircraft.json

It’s not hugely hard to add something to the stats if it’s useful - but I don’t know exactly what you’re trying to measure - peak simultaneous tracks? average simultaneous tracks? averaged at what interval?

I want to graph the number of planes (tracks) seen during the previous 5 minutes, at 5 minute intervals.

Yeah, that’s a bit more complex since you need to maintain a set of unique aircraft seen. Probably better off polling and doing that externally.