Configure log statistics frequency

4 weeks 1 day ago #1710 by Bagoong
I'm running OpenSky on a Raspberry Pi, under Raspbian Buster.  I would like to be able to control the frequency and/or layout of syslog entries for openskyd-dump1090 entries.  I  currently push logs from a number of Pi's to a cloud log-storage but the openskyd-dump1090 statistics entries are a) too frequent and/or b) too dense.

Stats are currently logged every 10 minutes.   While I could redirect the logs in their entirety, they are useful to me, I just don't need all of them so often.

Is there a way to change the statistics logging frequency to, say, hourly instead of every 10 minutes?  

By Statistics logs, I mean the following entries:

Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   Statistics
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - started on Mon Nov 8 18:14:26 2021
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - running since 44d, 00h:30m:21s
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   Receiver
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 53546037 frames received (14.08 /s, 18.96 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 45374812 [ 85%] Mode-A/C (11.93 /s, 18.96 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 2430932 [ 5%] Mode-S Short (0.64 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 5740293 [ 11%] Mode-S Long (1.51 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 733718 [ 9%] type 0 (0.19 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 291079 [ 4%] type 4 (0.08 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 25752 [ 0%] type 5 (0.01 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 1380383 [ 17%] type 11 (0.36 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 69867 [ 1%] type 16 (0.02 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 4737110 [ 58%] type 17 (1.25 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 1019 [ 0%] type 18 (0.00 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 374811 [ 5%] type 20 (0.10 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 557486 [ 7%] type 21 (0.15 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 [ 0%] status (0.00 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 [ 0%] unknown (0.00 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 48807908 [ 91%] filtered (12.83 /s, 18.96 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 3433096 [ 6%] Mode-S filtered (0.90 /s, 0.00 /s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 53546037 unsynchronized frames
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   Buffer
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 queued messages (current)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 200 queued messages (max)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 discarded messages (current)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 9036 discarded messages (overall)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 4601 discarded messages (in worst overflow situation)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 199 messages in pool (Usage 0.00%)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 dynamic pools (current)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 dynamic pools (overall)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 dynamic pools (max)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 72 flushes
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 uncollected dynamic pools
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 0 Garbage Collector runs
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   Network
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - currently online
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 3791555 [100%] seconds online (overall)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 653 disconnections
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 654 connection attempts
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 112566966 bytes sent (29.60/s)
Dec 22 18:44:48  rpi-1090-03   openskyd-dump1090   - 432 bytes received (0.00/s)

Thanks a ton!

Please Log in or Create an account to join the conversation.

4 weeks 1 day ago #1711 by strohmeier
AFAIK not in the stable version but the source is open: github.com/openskynetwork/opensky-sensor/ :)
The following user(s) said Thank You: Bagoong

Please Log in or Create an account to join the conversation.

4 weeks 23 hours ago #1712 by Bagoong
Thanks a ton.

I think I see where the interval of 600 secs is hardcoded in statistics.c, but I'm not a C coder.  I'll shelve my desire for a while and try and tackle it later (unless someone else does it).

static const struct CFG_Section cfg = {
    .name = "STATISTICS",
    .n_opt = 2,
    .options = {
        {
            .name = "Enabled",
            .type = CFG_VALUE_TYPE_BOOL,
            .var = &cfgEnabled,
            .def = { .boolean = true }
        },
        {
            .name = "Interval",
            .type = CFG_VALUE_TYPE_INT,
            .var = &cfgInterval,
            .def = { .integer = 600 }
        }
    }
};


But, thanks a ton for the swift reply.  

Cheers
The following user(s) said Thank You: strohmeier

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
This website uses cookies to offer you the best experience of our services. By using this website you agree to our privacy policy!