Announcement

Collapse
No announcement yet.

Testing fix for older Debian feed status

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing fix for older Debian feed status

    Originally posted by abcd567 View Post
    Any command like "fr24feed" or "fr24feed -foo" or "fr24feed --foo" will start a NEW instance of fr24feed.
    The systemd service has already started fr24feed.
    Why you have to start it again by any other command?

    To check status, use this command:
    Code:
    abcd@ubuntu-bionic:~$ sudo systemctl status fr24feed 
    
    [sudo] password for abcd:
    
    ● fr24feed.service - Flightradar24 Decoder & Feeder
       Loaded: loaded (/lib/systemd/system/fr24feed.service; enabled; vendor preset: enabled)
       Active: active (running) since Sat 2019-03-30 03:38:00 EDT; 8min ago
     Main PID: 702 (fr24feed)
        Tasks: 10 (limit: 2318)
       CGroup: /system.slice/fr24feed.service
               └─702 /usr/bin/fr24feed
    
    Mar 30 03:38:00 ubuntu-bionic systemd[1]: Started Flightradar24 Decoder & Feeder.
    I'm unsure that is accurate across all versions.

    I had a user reply to me, straight up tell me I was wrong. And that on his linux install the <space> --status | was the only valid one.

    Just as Stealth found, while the later version Pi Build, includes fr24feed-service.
    Similar needs to be investigated on .deb packages and older versions. As once upon a time 'fr24feed-status' didn't exist.
    refer https://forum.flightradar24.com/thre...ll=1#post68021

    $ sudo service fr24feed status
    [ ok ] FR24 Feeder/Decoder Process: running.
    [ ok ] FR24 Stats Timestamp: 2015-07-01 07:55:45.
    [ ok ] FR24 Link: connected [UDP].
    [ ok ] FR24 Radar: T-XXXX12.
    [ ok ] FR24 Tracked AC: 2.
    [ ok ] Receiver: connected (3313 MSGS/0 SYNC).
    [ ok ] FR24 MLAT: ok [UDP].
    [ ok ] FR24 MLAT AC seen: 5.
    (side note, I will edit that shortly)

    pi@raspberrypi:~ $ dpkg-query -L fr24feed
    /etc
    /etc/fr24feed.ini
    /etc/cron.d
    /etc/cron.d/fr24feed_updater
    /etc/systemd
    /etc/systemd/system
    /etc/systemd/system/fr24feed.service
    /etc/udev
    /etc/udev/rules.d
    /etc/udev/rules.d/rtl-sdr.rules
    /usr
    /usr/bin
    /usr/bin/fr24feed-status
    /usr/bin/fr24feed
    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

  • #2
    And some more digging.

    fr24feed-status was only introduced in 19-5 and above. I believe the debian packages are 18-5? which pre-dates this. (well and truely)
    (also why I said I'm unconvinced that's a valid option for non-DVBT receivers)

    if
    cat /dev/shm/decoder.txt
    exists - this is the raw output file the decoder service writes when running.

    This is what fr24feed-status looks at and visually displays a better status to give an idea on what failed. May work on 18-5 too?

    sudo nano /usr/bin/fr24feed-status

    #!/bin/bash

    . /lib/lsb/init-functions

    MONITOR_FILE=/dev/shm/decoder.txt

    systemctl status fr24feed 2>&1 >/dev/null || {
    log_failure_msg "FR24 Feeder/Decoder Process"
    exit 0
    }

    log_success_msg "FR24 Feeder/Decoder Process: running"

    DATE=`grep time_update_utc_s= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    log_success_msg "FR24 Stats Timestamp: $DATE"


    FEED=`grep 'feed_status=' ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    if [ "$FEED" == "" ]; then
    FEED="unknown"
    fi

    if [ "$FEED" == "connected" ]; then
    MODE=`grep feed_current_mode= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    log_success_msg "FR24 Link: $FEED [$MODE]"
    FEED=`grep feed_alias= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    log_success_msg "FR24 Radar: $FEED"
    FEED=`grep feed_num_ac_tracked= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    log_success_msg "FR24 Tracked AC: ${FEED}"
    else
    log_failure_msg "FR24 Link: $FEED"
    fi

    RX=`grep rx_connected= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    RX1=`grep num_messages= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    RX2=`grep num_resyncs= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`

    if [ "$RX" == "1" ]; then
    log_success_msg "Receiver: connected ($RX1 MSGS/$RX2 SYNC)"
    else
    log_failure_msg "Receiver: down"
    fi

    MLAT=`grep 'mlat-ok=' ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    if [ "$MLAT" == "" ]; then
    MLAT="unknown"
    fi

    if [ "$MLAT" == "YES" ]; then
    MLAT_MODE=`grep mlat-mode= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    log_success_msg "FR24 MLAT: ok [$MLAT_MODE]"
    MLAT_SEEN=`grep mlat-number-seen= ${MONITOR_FILE} 2>/dev/null | cut -d'=' -f2`
    log_success_msg "FR24 MLAT AC seen: $MLAT_SEEN"
    else
    log_failure_msg "FR24 MLAT: not running"
    fi
    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

    Comment


    • #3
      The command fr24feed-status works perfect on RPi, but fails on .deb (i386 ) and and executable binary (amd64).

      Code:
      pi@raspberrypi:~ $ fr24feed-status
      
      [ ok ] FR24 Feeder/Decoder Process: running.
      [ ok ] FR24 Stats Timestamp: 2019-03-30 08:39:16.
      [ ok ] FR24 Link: connected [UDP].
      [ ok ] FR24 Radar: T-CYYZ21.
      [ ok ] FR24 Tracked AC: 6.
      [ ok ] Receiver: connected (63200 MSGS/0 SYNC).
      [ ok ] FR24 MLAT: ok [UDP].
      [ ok ] FR24 MLAT AC seen: 6.
      Code:
      pi@raspberrypi:~ $ fr24feed --status
      
      /dev/shm/decoder.txt: Permission denied
      [main][e]Could not create monitor file!
      2019-03-30 08:39:33 | ______  _  _         _      _                    _              _____    ___
      2019-03-30 08:39:33 | |  ___|| |(_)       | |    | |                  | |            / __  \  /   |
      2019-03-30 08:39:33 | | |_   | | _   __ _ | |__  | |_  _ __  __ _   __| |  __ _  _ __`' / /' / /| |
      2019-03-30 08:39:33 | |  _|  | || | / _` || '_ \ | __|| '__|/ _` | / _` | / _` || '__| / /  / /_| |
      2019-03-30 08:39:33 | | |    | || || (_| || | | || |_ | |  | (_| || (_| || (_| || |  ./ /___\___  |
      2019-03-30 08:39:33 | \_|    |_||_| \__, ||_| |_| \__||_|   \__,_| \__,_| \__,_||_|  \_____/    |_/
      2019-03-30 08:39:33 |                __/ |                                      
      2019-03-30 08:39:33 |               |___/                                       
      2019-03-30 08:39:33 | [main][i]FR24 Feeder/Decoder
      2019-03-30 08:39:33 | [main][i]Version: 1.0.23-8/generic
      2019-03-30 08:39:33 | [main][i]Built on Oct 16 2018 08:10:47 (HEAD-2d57e58.git/Linux/static_armel)
      2019-03-30 08:39:33 | [main][i]Running on: debian9
      2019-03-30 08:39:33 | [main][i]Local IP(s): 192.168.0.22 2607:fea8:4d1f:fe70::2 fd00:f0f2:4906:68d2:a2b3:5ce9:7980:1062
      2019-03-30 08:39:33 | [main][i]Copyright 2012-2018 Flightradar24 AB
      2019-03-30 08:39:33 | [main][i]https://www.flightradar24.com
      2019-03-30 08:39:33 | [main][i]DNS mode: PING
      2019-03-30 08:39:33 | [main][i]Automatic updates are ENABLED
      2019-03-30 08:39:33 | [httpd][e]bind function failed, errno: 98
      2019-03-30 08:39:33 | [httpd][d]Master thread terminated
      2019-03-30 08:39:33 | [main][i]Reader thread started
      2019-03-30 08:39:33 | [master][i]Starting processing thread
      2019-03-30 08:39:33 | [main][i]MLAT data feed started
      2019-03-30 08:39:33 | [reader][i]Initializing reader
      2019-03-30 08:39:33 | [reader][i]Connecting to unknown receiver via (tcp://127.0.0.1:30005)
      2019-03-30 08:39:33 | [mlat][i]Waiting for MLAT configuration
      2019-03-30 08:39:33 | [reader][i]Connected to the receiver, configuring
      2019-03-30 08:39:33 | [reader][i]Configured, processing messages
      2019-03-30 08:39:33 | [reader][w]Setting new UTC offset: 0!
      2019-03-30 08:39:34 | [time][i]Synchronizing time via NTP
      ^C2019-03-30 08:39:36 | [main][i]Terminating on user request
      2019-03-30 08:39:36 | [reader][i]Connection terminated
      2019-03-30 08:39:36 | [reader][i]Terminating on request
      2019-03-30 08:40:02 | [time][i]Time synchronized correctly, offset +0.0003 seconds
      2019-03-30 08:40:02 | [main][i]Feed Network client started
      2019-03-30 08:40:02 | [feed][i]Downloading configuration
      2019-03-30 08:40:02 | [main][i]Terminating worker threads
      2019-03-30 08:40:02 | [feed][d]fetching configuration
      2019-03-30 08:40:02 | [feed][i]configuring decoder
      2019-03-30 08:40:02 | [feed][c]Max range AIR: 350.0nm
      2019-03-30 08:40:02 | [feed][c]Max range GND: 100.0nm
      2019-03-30 08:40:02 | [feed][i]configuration changed
      2019-03-30 08:40:02 | [feed][i]defined 3 servers
      2019-03-30 08:40:02 | [feed][c]Timestamps: optional
      2019-03-30 08:40:02 | [stats][i]Stats thread started
      2019-03-30 08:40:02 | [feed][n]CYYZ21@185.218.24.22:8099/UDP
      2019-03-30 08:40:02 | [feed][n]connecting
      2019-03-30 08:40:02 | [feed][n]connected via UDP (fd 9)
      2019-03-30 08:40:02 | [feed][i]Feed connected
      2019-03-30 08:40:02 | [feed][n]working
      2019-03-30 08:40:02 | info | Stopping ReceiverACSender threads for feed
      2019-03-30 08:40:02 | info | Configured ReceiverACSender: 185.218.24.22:8099,185.218.24.23:8099,185.218.24.24:8099, feed: CYYZ21, send_interval: 5s, max age: 15s, send metadata: true, mode: 1, filtering: true
      2019-03-30 08:40:02 | info | Network thread connecting to 185.218.24.22:8099 for feed CYYZ21
      2019-03-30 08:40:04 | [master][i]Terminating on request
      2019-03-30 08:40:04 | [feed][x]Feeding thread terminated
      2019-03-30 08:40:05 | [feed][n]busy
      2019-03-30 08:40:05 | [feed][i]Feed disconnected
      2019-03-30 08:40:05 | [feed][n]disconnected
      2019-03-30 08:40:05 | [main][i]Terminated successfully

      Code:
      abcd@ubuntu-bionic:~$ fr24feed-status
      fr24feed-status: command not found
      
      abcd@ubuntu-bionic:~$ fr24feed --status
      /dev/shm/decoder.txt: Permission denied
      [main][e]Could not create monitor file!
      2019-03-30 04:50:09 | [main][i]FR24 Feeder/Decoder
      2019-03-30 04:50:09 | [main][i]Version: 1.0.18-5/generic
      2019-03-30 04:50:09 | [main][i]Built on Mar  4 2016 16:26:55 (devel-d11ca48.git/Linux/x86_64)
      2019-03-30 04:50:09 | [main][i]Copyright 2012-2016 Flightradar24 AB
      2019-03-30 04:50:09 | [main][i]http://flightradar24.com
      2019-03-30 04:50:09 | [main][i]DNS mode: LIBC
      2019-03-30 04:50:09 | [main][i]Automatic updates are DISABLED
      2019-03-30 04:50:09 | [main][i]Reader thread started
      2019-03-30 04:50:09 | [main][i]MLAT data feed started
      2019-03-30 04:50:09 | [master][i]Starting processing thread
      2019-03-30 04:50:09 | [reader][i]Initializing reader
      2019-03-30 04:50:09 | [reader][i]Connecting to Beast [httpd]receiver via (avr-tcp://127.0.0.1:30002)
      2019-03-30 04:50:09 | [[e]bind function failed, errno: mlat][i]Waiting for MLAT configuration9
      2019-03-30 04:50:09 | 8
      2019-03-30 04:50:09 | [httpd][d]Master thread terminated
      2019-03-30 04:50:09 | [reader][e]Could not connect to avr-tcp://127.0.0.1:30002
      2019-03-30 04:50:10 | [time][i]Synchronizing time via NTP

      Comment


      • #4
        Well, unless it was his particular linux version pre init.d removal *shrug*

        Can't find the original post (I probably found it in wrong area) and --service isn't an exact searchable term

        Does creating the fr24feed-service function (above) work at all on the 18-5
        Posts not to be taken as official support representation - Just a helpful uploader who tinkers

        Comment


        • #5
          Originally posted by Oblivian View Post
          Does creating the fr24feed-service function (above) work at all on the 18-5
          Code:
          abcd@ubuntu-bionic:~$ sudo service fr24feed status
          
          [sudo] password for abcd:
          
           fr24feed.service - Flightradar24 Decoder & Feeder
             Loaded: loaded (/lib/systemd/system/fr24feed.service; enabled; vendor preset: enabled)
             Active: active (running) since Sat 2019-03-30 05:47:22 EDT; 2min 20s ago
           Main PID: 745 (fr24feed)
              Tasks: 10 (limit: 2318)
             CGroup: /system.slice/fr24feed.service
                     └─745 /usr/bin/fr24feed
          
          Mar 30 05:47:22 ubuntu-bionic systemd[1]: Started Flightradar24 Decoder & Feeder.

          Comment


          • #6
            Originally posted by abcd567 View Post
            Code:
            abcd@ubuntu-bionic:~$ sudo service fr24feed status
            
            [sudo] password for abcd:
            
             fr24feed.service - Flightradar24 Decoder & Feeder
               Loaded: loaded (/lib/systemd/system/fr24feed.service; enabled; vendor preset: enabled)
               Active: active (running) since Sat 2019-03-30 05:47:22 EDT; 2min 20s ago
             Main PID: 745 (fr24feed)
                Tasks: 10 (limit: 2318)
               CGroup: /system.slice/fr24feed.service
                       └─745 /usr/bin/fr24feed
            
            Mar 30 05:47:22 ubuntu-bionic systemd[1]: Started Flightradar24 Decoder & Feeder.
            I realise thats the service confirmed active. However I mean re-creating this..
            https://forum.flightradar24.com/thre...l=1#post117441

            /usr/bin/fr24feed-status (new command included with Pi) just greps /dev/shm/decoder.txt (also found on the web config page) to the abbreviated status by checking for active decoder and so on

            Remember when we changed from Jessie to stretch and everyone took issue with the service output like you posted...
            Posts not to be taken as official support representation - Just a helpful uploader who tinkers

            Comment


            • #7
              Not advertised. But :8754/monitor.txt still exists (on a Pi at least - perhaps still debian)
              Posts not to be taken as official support representation - Just a helpful uploader who tinkers

              Comment

              Working...
              X