tar1090 history files?

Discussion in 'Hardware' started by RichardG, Jul 8, 2020.

  1. RichardG

    RichardG Member

    Hi

    I recenly built my own image from the ground up since then I have noticed a large number of files related to tar1090 being copied over in my nightly back up

    I am getting very large number of files saved as per below

    '''
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23154095-608-1594223520
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23154185-608-1594223522
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23154316-608-1594223524
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23154451-608-1594223526
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23154605-608-1594223528
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23154668-608-1594223529
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23155763-608-1594223530
    var/cache/lighttpd/compress/tar1090/data/aircraft.json-gzip-23155915-608-1594223532
    '''
    Is this the tar1090 history doing it's thing? If I go into the config file and change the history size from 450 to 0 will it stop putting files in this folder? Can I safely delete these files with out messing up tar1090? My SD card has filled by 2% in the last 3 days.

    Any help appreciated.
    Thanks
    Richard
     
  2. wiedehopf

    wiedehopf Administrator Staff Member

    Code:
    sudo sed -i -e 's/^compress.cache-dir/#\0/' /etc/lighttpd/lighttpd.conf
    sudo systemctl restart lighttpd
    sudo rm /var/cache/lighttpd/compress/ -rf
    
    Switching on the lighttpd compress.cache-dir is a bad idea.
    Seems to be default now but normally the json files aren't compressed and it's not an issue.
    But apparently there is a modified config that produces that issue.

    Really just lighttpd being stupid and for that reason a configuration option that shouldn't be used.
     
  3. RichardG

    RichardG Member

    Thanks. It must be a default as I definielty did not switch it on myself.... not that skilled yet.

    I'll run your code and see where I get.

    Thanks
     
  4. RichardG

    RichardG Member

    Code ran fine (not that I expected it not too) and my SD card is back to 10% full again.
    I'll keep an eye on it and see what happens over the next few days.
    Cheers.
     
  5. RichardG

    RichardG Member

    I have just built another feeder from the ground up and come across the same problem again. I figure that I can't be the only person who has this problem... would it be worth including your above listed code somewhere in the install of tar1090 so that is compression cache is turned off by default by the install of tar1090?

    I did not install Lighttpd when building the feeder, it must have been installed as part of the install of one of the scripts I used during the build.

    p.s. thanks for your Bias-T scripts - worked great!
     
  6. wiedehopf

    wiedehopf Administrator Staff Member

    lighttpd is a dependency for readsb.

    I actually changed the install script to disable the problematic configuration if it's present when tar1090 is installed.

    If i purge lighttpd / remove the config files and then follow the steps of the guide i don't encounter the problem you're having.
    Must be something extra you install that overwrites the lighttpd config?
     
  7. RichardG

    RichardG Member

    Thanks for getting back to me...

    hummmm odd. I followed your guide on your GitHub wiki

    Went RLT-SDR drivers --> readsb --> tar1090 --> graphs1090 --> installing cmake then bias-t scripts. Didn't restart in between each step. Wonder if this would have made a difference.

    If I build another feeder I'll start completely from the ground up as I use a base image with my wifi settings /SSH already up and going.
     
  8. wiedehopf

    wiedehopf Administrator Staff Member

    Well your base image is the issue then.

    I suppose it's not configured in a way my automatic install will detect.
    I guess you didn't check if the tar1090 install warned you? :)

    Did you already fix it?
    If not i could try and adapt the install script to catch your case (which i hope is rare but still).
     
  9. RichardG

    RichardG Member

    Probably is the base image, but it is the basic RPi Lite with only SSH / Wifi and a user set-up. That's it. Gives me a starting point for all my projects.

    Could the issue be that I am not installing under the default 'pi' user? I am installing under user 'richard' which is the one I created for the base install?

    Nope, and I don't have the text in a session log either

    I've already fixed it by using the code from before, which worked perfectly
     
  10. wiedehopf

    wiedehopf Administrator Staff Member

    Well no it's not the default lighttpd configuration at least not the current one.

    You're using sudo to run the script ... which runs as root.
     
  11. RichardG

    RichardG Member

    Hey.
    Well installed again from scratch from an unadulterated Raspberry Pi OS basic image, I did not add a user, I did not do anything apart from updating the fresh image and then installing RTL_SDR drivers, cmake etc for your Bias-t scripts, Bias-t script, readsb, tar1090 and graphs 1090. Cutting to the end it is still doing the same thing (See then end of the file below, I listed directory contents). I have copied everything from the terminal into a text doc on my google drive for you to look at should you want to

    https://drive.google.com/file/d/12cI8KnEk4GQd_IU9GDs4Cn7CshuvEHQb/view?usp=sharing


    Yes using sudo, but a piece of software that I have been trying with my UPS requires it to be installed and run under the Pi user to work properly, so figured no harm in checking
     
  12. wiedehopf

    wiedehopf Administrator Staff Member

    That Raspbian isn't Raspbian Lite .... what exactly are you installing?
     
  13. wiedehopf

    wiedehopf Administrator Staff Member

    Also what i need to look at is the lighttpd.conf in /etc/lighttpd ... and please put it on pastebin not into an image.
    Will check why the install script magic isn't doing its job.
     
  14. RichardG

    RichardG Member

    Would appear that the image I managed to install it on was Buster Desktop from the Raspberry Pi foundation website which I downloaded in August before they moved to Pi OS - selected the wrong image, but still I had made no changes to it. I can do it all again with the Lite if you want??

    Think I have the pastebin thing working now.

    https://pastebin.com/PsRzrWiN
     
  15. wiedehopf

    wiedehopf Administrator Staff Member

    Yeah i'm pretty sure the RPi Lite has a different lighttpd configuration.


    compress.cache-dir = "/var/cache/lighttpd/compress/"
    compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
    So ... that shouldn't apply to the json files, not sure why it would.
    I didn't want to always disable compress.cache-dir .... but i suppose i should.
    After all it's a somewhat bad idea considering it's not automatically cleaned up.

    Yeah ... whatever i'll just disable it even when filetype json isn't mentioned.
     
  16. wiedehopf

    wiedehopf Administrator Staff Member

    So ... if you run the tar1090 install now it should disable compress.cache-dir
     
  17. RichardG

    RichardG Member