Thanks, this is very helpful. I also discovered that I probably don’t need all those lines -and I could try to keep the file smaller. Piping through grep and only keeping those lines with positions, altitudes and callsign is probably the most I need.
I assume that myreceiver is supposed to be the host name but I only know my pi by its IP address. I also noticed I don’t seem to have write access to /home/pi directory that putty drops me into, plus i figure its probably better to append instead of overwriting. Once I figured those out, things went swimmingly. Here are the 2 different commands I tried- based off both your suggestions:
nc 127.0.0.1 30003 | egrep --line-buffered 'MSG,1,|MSG,3,|MSG,5,' >> /tmp/flight_tracks.csv
sudo wget -O - -q 127.0.0.1:30003 | egrep --line-buffered 'MSG,1,|MSG,3,|MSG,5,' >> /tmp/log.txt
I don’t know which is better nc or wget so I did a top command to see which used fewer resources:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2036 root 20 0 16924 6916 1680 R 16.8 0.7 388:12.99 dump1090
2393 root 20 0 11416 9644 5344 S 3.0 1.0 121:18.04 fa-mlat-client
5373 root 20 0 5756 2744 2540 S 1.0 0.3 0:02.49 wget
5372 pi 20 0 3560 1756 1664 S 0.3 0.2 0:00.95 egrep
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2036 root 20 0 16924 6916 1680 S 21.1 0.7 393:23.80 dump1090
2393 root 20 0 11416 9644 5344 S 3.3 1.0 122:06.22 fa-mlat-client
5414 pi 20 0 2360 1492 1384 S 1.0 0.2 0:03.83 nc
5415 pi 20 0 3560 1828 1736 S 0.3 0.2 0:01.79 egrep
They are almost exactly the same with a slight advantage to nc though I notice that wget uses root permissions vs nc’s user level. I don’t know the difference
This is almost done. The process of logging to a file implies 2 other steps, at least to me anyhow :
1.) I’d want the data to be logged to a file automatically, instead of me having a window up on my workstation. You mentioned executable sh or chrontab but could you possibly show me that as well?
2.) To prevent the file from getting too big over time, it should stop and start a new file possibly every day. For instance I notice that the /tmp/piaware.out gets renamed to /tmp/piawareout.yesterday around midnight. I’m not quite sure how this is done so possibly something similar could be used for these files?
thanks,