View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Log file location
PostPosted: Fri Feb 03, 2017 7:09 pm 
Offline
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location: Sydney, Australia
Back in the good old days (of KnoppMyth), useful log files used to be stored in /var/log. e.g. /var/log/mythbackend.log

LinHES stored them under a directory of today's date. Which is neater than several days worth of files in /var/log, but harder to access for old-timers like me (muscle memory, et c.). This helps:
Code:
cd /var/log/`date -Idate`


but the filenames still have your server name prepended - too much typing for me. This script, run as a cronjob by root:
Code:
#!/bin/sh
#
# simplifyLogs.sh - make symlinks to some of today's LinHES log files:
#
# % ls -l /var/log/2017-02-04
# mythtv-server_dbus.log            mythtv-server_php.log
# mythtv-server_lighttpd.log        mythtv-server_rsyslogd.log
# mythtv-server_maillog.log         mythtv-server_sshd.log
# mythtv-server_messages.log        mythtv-server_sudo.log
# mythtv-server_mythbackend.log     mythtv-server_su.log
# mythtv-server_mythcommflag.log    mythtv-server_zmaudit.log
# mythtv-server_mythfrontend.log    mythtv-server_zmdc.log
# mythtv-server_myth_mtc.log        mythtv-server_zmupdate.log
# mythtv-server_mythpreviewgen.log
#

cd /var/log/mythtv

for i in  mythbackend.log  mythcommflag.log  mythfrontend.log  mythpreviewgen.log
do
   ln -sf ../`date -Idate`/*_$i $i
done

will make things easier.

_________________
| Nigel Pearson, nigel.pearson.au@gmail.com
| "Things you own end up owning you" - Tyler, Fight Club


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu