LinHES Forums
http://forums.linhes.org/

Saving console output from the frontend
http://forums.linhes.org/viewtopic.php?f=3&t=1962
Page 1 of 1

Author:  nigelpearson [ Tue Jul 13, 2004 6:31 pm ]
Post subject:  Saving console output from the frontend

By default, if there are any errors from the frontend program, they will be lost when its xterm closes. This mod writes them into a log file:

% sudo vi /usr/local/bin/KnoppMyth-run
[go to line 15, change from:
CMD2='exec mythfrontend'
to:
CMD2='mythfrontend >> /var/log/mythtv/MythFrontend.log'
]

% sudo vi /home/mythtv/.fvwm/.fvwm2rc
[go to line 77, change from:
+ "MythTV" Exec exec mythfrontend
to:
+ "MythTV" Exec exec mythfrontend >> /var/log/mythtv/MythFrontend.log
]

% sudo cp /etc/logrotate.d/mythtv-backend /etc/logrotate.d/mythtv-frontend

% sudo vi /etc/logrotate.d/mythtv-frontend
[change mythbackend to MythFrontend in the first line]

%

After either a reboot, or restarting fvwm, the frontend should record all its messages into that file.

Author:  cesman [ Tue Jul 13, 2004 9:28 pm ]
Post subject: 

NOTE: If you make this mod and you keep you boxen on for months cause it is just rock solid! :) Your log can GROW in size. You may want to pipe it to /dev/null every once in a while...

Author:  nigelpearson [ Tue Jul 13, 2004 9:55 pm ]
Post subject: 

True, and with bad reception and a DVB card, /var/log/mythtv/mythbackend.log will start to fill the machine. Luckily, these files are rotated (copied and compressed) daily.

Author:  ashtonp [ Mon Jul 26, 2004 10:22 pm ]
Post subject: 

cesman wrote:
NOTE: If you make this mod and you keep you boxen on for months cause it is just rock solid! :) Your log can GROW in size. You may want to pipe it to /dev/null every once in a while...


Fortunately, there's a safety net in there that will prevent that from happening. The line "rotate 7" in the new /var/log/mythtv/MythFrontend.log file will cause the daily log files to be rotated a maximum of 7 times, and then deleted (same as this line in the original /etc/logrotate.d/mythtv-backend file will limit the number of older versions kept for the backend). With Nigel's change, the logs from both the front-end and the backend will be maintained going back 7 days only.

I think this will be a very valuable aid in tracking down problems in the frontend, and would like to see it made part of the standard configuration. (Assuming it works... I have just added the changes to my system, and will be trying them out now.)

BTW, cesman, many many thankyous for all of the work you have put into this package! Although I am still working out some wrinkles with my system, I have been blown away by how much you and the other contributors have achieved.

Author:  nigelpearson [ Tue Jul 27, 2004 6:30 pm ]
Post subject: 

It looks like the rotation doesn't work as expected. After the first rotation (e.g. creation of MythFrontend.log.0.gz), MythFrontend.log seems to be stuck at 0 bytes.

I am going to try the -l (or --logfile) argument to mythfrontend instead of doing the shell redirect, to see if that gives me better results.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/