Raspberry stop logging at /var/log/modes.log?

Questions about joining this site
jozg
Posts: 12
Joined: Tue Jan 08, 2019 6:51 pm

Raspberry stop logging at /var/log/modes.log?

Post by jozg »

Hello all,

I'm using a 20mb ramdrive for the /var/log directory, so save my sd-card's life.
The modes.sh service is filling up the ramdrive with messages as:
Executed com.mysql.jdbc.JDBC4PreparedStatement@1df022c: INSERT INTO statusPI(HexCode, Location, Date ,Time, GMTTIME, squawk, Altitude) VALUES ('449D05','Klundert, NL','2019/02/20','20:27:20.921','20:27:20.921','1136','---')
Lat

Is it possible to not log to file, so that my ramdrive is'nt filling up?

Thanks for helping.

Regards,
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by modesfan »

Hi jozg,

I am using a 100 MB partition but experience nearly the same problem. So I am deleting the files from time to time.
You have several options:

1. Use actual version: logging is a bit more compact and would look like this:

#
MSG, 5, 4951C7, 2019/02/20, 22:27:00.046, TAP532, Klundert, NL
MSG, 6, 4951C7, 2019/02/20, 22:27:59.676, ---, 2341, Klundert, NL
MSG, 7, A53013, 2019/02/20, 22:28:19.362, 36000, 6606, Klundert, NL
MSG, 7, 4951C7, 2019/02/20, 22:29:06.761, 13125, 2341, Klundert, NL
MSG, 3, 4951C7, 2019/02/20, 22:29:57.653, 52.14516, 13.28977, ---, TAP532, 11250, 2341, Klundert, NL
#
# 19346 MSGs sorted by type (1, 2, .., 8), 3-Mlat: 151, 0, 1523, 1561, 5359, 1153, 2418, 7182, 0
#
# usable (correct, without 4, 8) MSGs: 10604, blacklist filtered MSGs: 5189
#
MSG, 7, 738050, 2019/02/20, 22:36:09.286, 2575, 7617, Klundert, NL
MSG, 6, 738050, 2019/02/20, 22:36:09.083, ---, 7617, Klundert, NL


2. Redirect output to > /dev/null

Regards
jozg
Posts: 12
Joined: Tue Jan 08, 2019 6:51 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by jozg »

Hello modesfan,

Thanks for responding.
I'm using an older version, wich is not stopping or crashing.
First i used the latest version, and that one crashed from time to time, so i have to manually start it again.

As for the logging options, i prefere the /dev/null option ;-)
Can you please point me in the right direction, where i have to set the /dev/null logging output?.

Thanks.

Regards,
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by modesfan »

The redirection has to be placed inside the start script /etc/init.d/modes.sh.
Open the file with editor by: sudo nano /etc/init.d/modes.sh and
edit the line

Code: Select all

java -jar $PROG > $LOGFILE 2>$LOGFILE &
to

Code: Select all

java -jar $PROG > /dev/null 2>/dev/null &
How do you know the latest version chrashes on your device? What is the output like?
jozg
Posts: 12
Joined: Tue Jan 08, 2019 6:51 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by jozg »

Hello modesfan,

Not sure what the error was, so i again use the V16 version, and see what the error log will show again, and then let you know.
After this checks, then i will stop the program from logging.

Thanks.

Regards
jozg
Posts: 12
Joined: Tue Jan 08, 2019 6:51 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by jozg »

Hello modesfan,

Since i was using the V16 again, it stopped working after aprox. 2 hours.
The last log was:
# got high value from MLAT
# got high value from MLAT
MSG, 5, 7608EB, 2019/02/21, 23:57:34.350, ---, Klundert, NL
MSG, 6, 7608EB, 2019/02/21, 23:57:34.350, ---, ---, Klundert, NL
# Exception: Exc G: java.lang.ArrayIndexOutOfBoundsException: 10
# Try to open first port: Success.
# Exception: Exc G: java.lang.ArrayIndexOutOfBoundsException: 10
# Try to open first port: Success.
MSG, 5, 4853D1, 2019/02/21, 23:57:54.514, ---, Klundert, NL
MSG, 6, 4853D1, 2019/02/21, 23:57:54.514, ---, ---, Klundert, NL
#
# 183964 MSGs sorted by type (1, 2, .., 8), 3-Mlat: 1107, 0, 10662, 10659, 48404, 17692, 13674, 81716, 91539
#
# usable (correct, without 4, 8) MSGs: 91537, blacklist filtered MSGs: 47689
#
#
# 0 MSGs sorted by type (1, 2, .., 8), 3-Mlat: 0, 0, 0, 0, 0, 0, 0, 0, 0
#
# usable (correct, without 4, 8) MSGs: 0, blacklist filtered MSGs: 0
#
#

And then only repeatly every couple of minutes:

# 0 MSGs sorted by type (1, 2, .., 8), 3-Mlat: 0, 0, 0, 0, 0, 0, 0, 0, 0
#
# usable (correct, without 4, 8) MSGs: 0, blacklist filtered MSGs: 0

And no msg;s anymore.
A little bit hard to resolve because the log file doesn't say much.

Do you have an idea?.

Regards,
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by modesfan »

Hi jozg, thanks for the log! Finally I have got something to trace. The exception is the indication.
jozg
Posts: 12
Joined: Tue Jan 08, 2019 6:51 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by jozg »

Hello Modesfan,

If i can help you more, let me know.
The exception in the logfile, i've seen it more in the log file, but normally the program keeps going.
But after a couple of hours, it stops, and shows only 0 in the stats.

Now i revert back to the older version, wich is keep working.

Maybe, i'll try V16 again, and email you my complete logfile?.
Let me know.

regards,
modesfan
Posts: 111
Joined: Thu Apr 07, 2016 7:37 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by modesfan »

Hi jozg,
I have prepared a new version V17. It would help me, if you could test it and report errors.
I am interested in lines like # Exception ...
Somehow the feeder closes its port, stops sending or receiving function gets confused.

What kind of feeder are you using? Is it some other than dump1090?
jozg
Posts: 12
Joined: Tue Jan 08, 2019 6:51 pm

Re: Raspberry stop logging at /var/log/modes.log?

Post by jozg »

Hello Modesfan,

I'm using a raspberry pi, with a flightaware pro stick.
So dump1090 it is.

edit: I downloaded the new version V17, and testing it right now.
Let you know.

Regards,
Post Reply