Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

--logfile vs. --logpath (was: mythbackend won't start during bootup on fc16)

 

 

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded


stse+mythtv at fsing

May 17, 2012, 11:06 AM

Post #1 of 29 (3651 views)
Permalink
--logfile vs. --logpath (was: mythbackend won't start during bootup on fc16)

On Thu, May 17, 2012 at 11:22:23AM -0500, Bill Meek wrote:
># See: http://www.mythtv.org/wiki/Logging for other options/details.
># Uncomment the next line for 0.24 and below:
># ExecStart=/usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log
># Uncomment the next line for 0.25 and above:
># ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv

I’m really wondering who thought the change from logfile to logpath was
a good idea. While you now have logfiles according to the name of process
(e.g. mythbackend or mythpreviewgen), the names contain „cryptic” things
like PID and date. How can you now configure any logrotation program to
rotate the right logfiles?

I switched to syslog logging with local6 (local7 was used by aiccu), but
this is harder for every distribution to preconfigure for their user.
I think, all logfiles should simply be named <process>.log, so you can
point logrotate to rotate everything with *.log.

Shade and sweet water!

Stephan

--
| Stephan Seitz E-Mail: stse [at] fsing |
| Public Keys: http://fsing.rootsland.net/~stse/keys.html |
Attachments: smime.p7s (3.54 KB)


raymond at wagnerrp

May 17, 2012, 12:08 PM

Post #2 of 29 (3581 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 5/17/2012 14:06, Stephan Seitz wrote:
> Im really wondering who thought the change from logfile to logpath was
> a good idea. While you now have logfiles according to the name of
> process (e.g. mythbackend or mythpreviewgen), the names contain
> cryptic things like PID and date. How can you now configure any
> logrotation program to rotate the right logfiles?

Wildcards and manual postrotate definitions.

http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
http://www.mythtv.org/wiki/Logrotate_-_mythbackend

The separation of the logs is an attempt to clarify things. Separate
logs for separate instances means when we ask for logs of an event, it's
not going to get interspersed with logs of half a dozen other preview
generation or commercial detection jobs.

Of course where's the fun in log rotation when your filesystem does live
compression?

#ls -l /var/log/mythtv | awk '{ SUM += $5 } END { print SUM/1024/1024"M" }'
67.0284M
#du -hd1 /var/log/mythtv
4.8M /var/log/mythtv
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


hobbes1069 at gmail

May 17, 2012, 12:23 PM

Post #3 of 29 (3578 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Thu, May 17, 2012 at 2:08 PM, Raymond Wagner <raymond [at] wagnerrp> wrote:
> On 5/17/2012 14:06, Stephan Seitz wrote:
>>
>> Im really wondering who thought the change from logfile to logpath was
>> a good idea. While you now have logfiles according to the name of
>> process (e.g. mythbackend or mythpreviewgen), the names contain
>> cryptic things like PID and date. How can you now configure any
>> logrotation program to rotate the right logfiles?
>
>
> Wildcards and manual postrotate definitions.
>
> http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
> http://www.mythtv.org/wiki/Logrotate_-_mythbackend

What I'd really like to see is a sane logrotate config for mythpreviewgen... :)

Richard
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


keemllib at gmail

May 17, 2012, 1:16 PM

Post #4 of 29 (3585 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/17/2012 01:06 PM, Stephan Seitz wrote:
...
>
> Im really wondering who thought the change from logfile to logpath was a good idea.
...

Hi;

From a user's perspective, (who submits a ticket on Trac once in a
while,) I always use --logpath. A simple script allows:

Running gdb on a core file and
Getting the matching run of the logfile, plus
(Nothing to do with --logpath) mythprogramname --version > version.out

All can then be attached to a ticket.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 17, 2012, 2:10 PM

Post #5 of 29 (3583 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/17/2012 03:23 PM, Richard Shaw wrote:
> On Thu, May 17, 2012 at 2:08 PM, Raymond Wagner wrote:
>> On 5/17/2012 14:06, Stephan Seitz wrote:
>>> Im really wondering who thought the change from logfile to logpath was
>>> a good idea. While you now have logfiles according to the name of
>>> process (e.g. mythbackend or mythpreviewgen), the names contain
>>> cryptic things like PID and date. How can you now configure any
>>> logrotation program to rotate the right logfiles?
>>
>> Wildcards and manual postrotate definitions.
>>
>> http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>> http://www.mythtv.org/wiki/Logrotate_-_mythbackend
> What I'd really like to see is a sane logrotate config for mythpreviewgen... :)

http://www.mythtv.org/wiki/Category:Log_Rotation_Configuration_Files

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


hobbes1069 at gmail

May 17, 2012, 2:25 PM

Post #6 of 29 (3568 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Thu, May 17, 2012 at 4:10 PM, Michael T. Dean
<mtdean [at] thirdcontact> wrote:
> On 05/17/2012 03:23 PM, Richard Shaw wrote:
>
>> On Thu, May 17, 2012 at 2:08 PM, Raymond Wagner wrote:
>>>
>>> On 5/17/2012 14:06, Stephan Seitz wrote:
>>>>
>>>> Im really wondering who thought the change from logfile to logpath was
>>>> a good idea. While you now have logfiles according to the name of
>>>> process (e.g. mythbackend or mythpreviewgen), the names contain
>>>> cryptic things like PID and date. How can you now configure any
>>>> logrotation program to rotate the right logfiles?
>>>
>>>
>>> Wildcards and manual postrotate definitions.
>>>
>>> http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>>> http://www.mythtv.org/wiki/Logrotate_-_mythbackend
>>
>> What I'd really like to see is a sane logrotate config for
>> mythpreviewgen... :)
>
>
> http://www.mythtv.org/wiki/Category:Log_Rotation_Configuration_Files

There is only two links, mythfrontend and mythbackend which Raymond
already posted. Mythpreviewgen creates many logs every day so I was
considering trying some sort of prerotate setup that would echo all of
the mythpreviewgen logs into a file and then tarring them up into one
log archive, but then what do you name it?

Richard
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


keemllib at gmail

May 17, 2012, 2:34 PM

Post #7 of 29 (3570 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/17/2012 04:25 PM, Richard Shaw wrote:
...
> On Thu, May 17, 2012 at 4:10 PM, Michael T. Dean
>>
>> http://www.mythtv.org/wiki/Category:Log_Rotation_Configuration_Files
>
> There is only two links, mythfrontend and mythbackend which Raymond
> already posted.

Richard;

This is old issue. If you're logged in, you'll see:

Logrotate - all applications
Logrotate - mythbackend
Logrotate - mythfrontend
Logrotate - mythpreviewgen

But if you log out, you only see the 2 you mentioned. Semi-glad to see its
not just me.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 17, 2012, 3:18 PM

Post #8 of 29 (3573 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/17/2012 05:34 PM, Bill Meek wrote:
> On 05/17/2012 04:25 PM, Richard Shaw wrote:
> ...
>> On Thu, May 17, 2012 at 4:10 PM, Michael T. Dean
>>>
>>> http://www.mythtv.org/wiki/Category:Log_Rotation_Configuration_Files
>>
>> There is only two links, mythfrontend and mythbackend which Raymond
>> already posted.
>
> Richard;
>
> This is old issue. If you're logged in, you'll see:
>
> Logrotate - all applications
> Logrotate - mythbackend
> Logrotate - mythfrontend
> Logrotate - mythpreviewgen
>
> But if you log out, you only see the 2 you mentioned. Semi-glad to see
> its
> not just me.
>

Or, for those who don't have log ins, yet, and aren't ready to create them:

http://www.mythtv.org/wiki/Logrotate_-_mythpreviewgen
http://www.mythtv.org/wiki/Logrotate_-_all_applications

Mike

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


ctreleaven at cogeco

May 18, 2012, 4:59 AM

Post #9 of 29 (3554 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

At 5:10 PM -0400 5/17/12, Michael T. Dean wrote:
>On 05/17/2012 03:23 PM, Richard Shaw wrote:
>>On Thu, May 17, 2012 at 2:08 PM, Raymond Wagner wrote:
>>>On 5/17/2012 14:06, Stephan Seitz wrote:
>>>>I'm really wondering who thought the change from logfile to logpath was
>>>>a good idea. While you now have logfiles according to the name of
>>>>process (e.g. mythbackend or mythpreviewgen), the names contain
>>>>cryptic" things like PID and date. How can you now configure any
>>>>logrotation program to rotate the right logfiles?
>>>
>>>Wildcards and manual postrotate definitions.
>>>
>>>http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>>>http://www.mythtv.org/wiki/Logrotate_-_mythbackend
>>What I'd really like to see is a sane logrotate
>>config for mythpreviewgen... :)
>
>http://www.mythtv.org/wiki/Category:Log_Rotation_Configuration_Files
>

I've been doing some testing with 0.25 so I've
never had the backend running more than a few
hours at a time. Correct me if I'm wrong, but
for mythpreviewgen, (and mythcommflag, and
mythfilldatabase, I think) the key is the
following lines:
lastaction
find /var/log/mythtv/old -name 'mythpreviewgen*' -type f -mtime +30 -delete
Each time one of these guys run, they create a
new log file. These logs don't need to be
"rotated"--just pruned periodically. Right? I
think I'm going to add that to my daily db backup
and optimization. For me, I think 7 days of
previewgens and commflags would be *lots*. Maybe
14 days of mfd.

Does the backend and frontend continue to write
to the same log file for as long as they are
running--potentially weeks or months?

Craig
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


newbury at mandamus

May 18, 2012, 9:37 AM

Post #10 of 29 (3554 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/17/2012 03:23 PM, Richard Shaw wrote:
> On Thu, May 17, 2012 at 2:08 PM, Raymond Wagner<raymond [at] wagnerrp> wrote:
>> On 5/17/2012 14:06, Stephan Seitz wrote:
>>>
>>> Im really wondering who thought the change from logfile to logpath was
>>> a good idea. While you now have logfiles according to the name of
>>> process (e.g. mythbackend or mythpreviewgen), the names contain
>>> cryptic things like PID and date. How can you now configure any
>>> logrotation program to rotate the right logfiles?
>>
>>
>> Wildcards and manual postrotate definitions.
>>
>> http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>> http://www.mythtv.org/wiki/Logrotate_-_mythbackend
>
> What I'd really like to see is a sane logrotate config for mythpreviewgen... :)

I was actually thinking of an every minute cron job to just delete them.
I can see exactly no value for these particular logs.

Geoff

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


gjhurlbu at gmail

May 18, 2012, 9:53 AM

Post #11 of 29 (3554 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

The value is for debugging and diagnosis of issues. Without the logs you
can not get any support at all. Disk space is cheap. Just prune them out
every few days or so and they will stay under control just fine.

If you delete the files every minute, you are likely to mess things up. I,
for one, will not even attempt to support a system with that setup.


newbury at mandamus

May 18, 2012, 10:35 AM

Post #12 of 29 (3544 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/18/2012 12:53 PM, Gavin Hurlbut wrote:
> The value is for debugging and diagnosis of issues. Without the logs
> you can not get any support at all. Disk space is cheap. Just prune
> them out every few days or so and they will stay under control just fine.
>
> If you delete the files every minute, you are likely to mess things up.
> I, for one, will not even attempt to support a system with that setup.
>

OK, so I will set the cron to delete them every hour or so..
And turn off the cron job if I need to debug anything.
But I have never had a problem with preview generation.

Geoff
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


gjhurlbu at gmail

May 18, 2012, 10:39 AM

Post #13 of 29 (3548 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Fri, May 18, 2012 at 10:35 AM, R. G. Newbury <newbury [at] mandamus> wrote:
> OK, so I will set the cron to delete them every hour or so..
> And turn off the cron job if I need to debug anything.
> But I have never had a problem with preview generation.

Or, you could use logrotate, and change the prune time in there. The
way you are doing things is not wise as you are deleting log files
that are actively being written to at the time of the cronjob. Also,
*again*, it makes it impossible to debug if/when something goes wrong.

Seriously, there's no point to being OCD with log directories. A 2k
file per preview isn't going to kill you. You could just run
logrotate once a day and it would keep your log dir clean.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 18, 2012, 10:40 AM

Post #14 of 29 (3549 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/18/2012 01:35 PM, R. G. Newbury wrote:
> On 05/18/2012 12:53 PM, Gavin Hurlbut wrote:
>> The value is for debugging and diagnosis of issues. Without the logs
>> you can not get any support at all. Disk space is cheap. Just prune
>> them out every few days or so and they will stay under control just
>> fine.
>>
>> If you delete the files every minute, you are likely to mess things up.
>> I, for one, will not even attempt to support a system with that setup.
>>
>
> OK, so I will set the cron to delete them every hour or so..

Still seems like overkill. Are you really concerned about using a couple
megabytes of HDD space in a day (and even a couple megabytes/day is
quite a lot for mythpreviewgen)?

> And turn off the cron job if I need to debug anything.
> But I have never had a problem with preview generation.

If you really do have a problem with it, you can use syslog logging, and
just tell your syslog logger to throw away all mythpreviewgen log
output. That said, I'm guessing there are other issues on your MythTV
computers that deserve more attention than complete eradication of
mythpreviewgen log files... ;)

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


newbury at mandamus

May 18, 2012, 8:00 PM

Post #15 of 29 (3545 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/18/2012 01:39 PM, Gavin Hurlbut wrote:
> On Fri, May 18, 2012 at 10:35 AM, R. G. Newbury<newbury [at] mandamus> wrote:
>> OK, so I will set the cron to delete them every hour or so..
>> And turn off the cron job if I need to debug anything.
>> But I have never had a problem with preview generation.
>
> Or, you could use logrotate, and change the prune time in there. The
> way you are doing things is not wise as you are deleting log files
> that are actively being written to at the time of the cronjob. Also,
> *again*, it makes it impossible to debug if/when something goes wrong.

Hell, you guys have been writing such good code for years that I cannot
now remember when I last had to use a logfile to debug something. I
think it was back when I had a Via Epia motherboard, with an Intel
graphics chip running xvmc. IIRC, that motherboard died when a dinosaur
stepped on it...or maybe it was a wooly mammoth.

> Seriously, there's no point to being OCD with log directories.
> A 2k > file per preview isn't going to kill you. You could just run
> logrotate once a day and it would keep your log dir clean.

Actually, my ... irritation with the new logging scheme is that it
produces so many small files for most processes. I just killed 384
mythpreviewgen files... and I only have about 80 tv files ATM. I could
easily live with one file for preview, commflag and filldatabase. To
make ANY use of them, it is far easier to cat them together and look at
that....

Geoff


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


newbury at mandamus

May 18, 2012, 8:11 PM

Post #16 of 29 (3538 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/18/2012 01:40 PM, Michael T. Dean wrote:
> On 05/18/2012 01:35 PM, R. G. Newbury wrote:
>> On 05/18/2012 12:53 PM, Gavin Hurlbut wrote:
>>> The value is for debugging and diagnosis of issues. Without the logs
>>> you can not get any support at all. Disk space is cheap. Just prune
>>> them out every few days or so and they will stay under control just
>>> fine.
>>>
>>> If you delete the files every minute, you are likely to mess things up.
>>> I, for one, will not even attempt to support a system with that setup.
>>>
>>
>> OK, so I will set the cron to delete them every hour or so..
>
> Still seems like overkill. Are you really concerned about using a couple
> megabytes of HDD space in a day (and even a couple megabytes/day is
> quite a lot for mythpreviewgen)?
>
>> And turn off the cron job if I need to debug anything.
>> But I have never had a problem with preview generation.
>
> If you really do have a problem with it, you can use syslog logging, and
> just tell your syslog logger to throw away all mythpreviewgen log
> output. That said, I'm guessing there are other issues on your MythTV
> computers that deserve more attention than complete eradication of
> mythpreviewgen log files... ;)

Well I will end up doing something. ATM the logging scheme seems to me
to be disfunctional. I'm going to have to read the wiki and play with
the settings. Try logrotate, or syslog or cron.
Myth now seems to spew logging files. I changed the loglevel to crit, in
an attempt to reduce the output, but now the files don't report much of
anything.
Uptime is 49 days, I have about a dozen backend logfiles all dated April
29 and nothing after that. I have 4 frontend files dated April 29 and
one dated May 3 and nothing after that. loglevel at crit may be too high.
I liked the old logfile scheme: one process one file.

Geoff






_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 19, 2012, 2:13 AM

Post #17 of 29 (3543 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/18/2012 11:11 PM, R. G. Newbury wrote:
> On 05/18/2012 01:40 PM, Michael T. Dean wrote:
>> On 05/18/2012 01:35 PM, R. G. Newbury wrote:
>>> On 05/18/2012 12:53 PM, Gavin Hurlbut wrote:
>>>> The value is for debugging and diagnosis of issues. Without the logs
>>>> you can not get any support at all. Disk space is cheap. Just prune
>>>> them out every few days or so and they will stay under control just
>>>> fine.
>>>>
>>>> If you delete the files every minute, you are likely to mess things
>>>> up.
>>>> I, for one, will not even attempt to support a system with that setup.
>>>>
>>>
>>> OK, so I will set the cron to delete them every hour or so..
>>
>> Still seems like overkill. Are you really concerned about using a couple
>> megabytes of HDD space in a day (and even a couple megabytes/day is
>> quite a lot for mythpreviewgen)?
>>
>>> And turn off the cron job if I need to debug anything.
>>> But I have never had a problem with preview generation.
>>
>> If you really do have a problem with it, you can use syslog logging, and
>> just tell your syslog logger to throw away all mythpreviewgen log
>> output. That said, I'm guessing there are other issues on your MythTV
>> computers that deserve more attention than complete eradication of
>> mythpreviewgen log files... ;)
>
> Well I will end up doing something. ATM the logging scheme seems to me
> to be disfunctional. I'm going to have to read the wiki and play with
> the settings. Try logrotate, or syslog or cron.
> Myth now seems to spew logging files. I changed the loglevel to crit,
> in an attempt to reduce the output, but now the files don't report
> much of anything.
> Uptime is 49 days, I have about a dozen backend logfiles all dated
> April 29 and nothing after that. I have 4 frontend files dated April
> 29 and one dated May 3 and nothing after that. loglevel at crit may be
> too high.
> I liked the old logfile scheme: one process one file.

Actually, it was "one process and all its subprocess, one file full of
mixed up log messages" that resulted in users saying, "The backend
locked up with 'invalid protocol version' error," which is impossible (a
backend can't have an invalid protocol version with itself). What was
actually happening was some child process started by the backend was
failing due to the backend's network/socket code failing to listen
for/respond to clients. Now, users would correctly report,
"mythpreviewgen runs fail due to 'invalid protocol version' and
mythbackend doesn't respond to network requests," because they won't see
mythpreviewgen logging in mythbackend.log, so they'll actually know
where it's coming from/what's happening.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


newbury at mandamus

May 19, 2012, 6:05 PM

Post #18 of 29 (3533 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/19/2012 05:13 AM, Michael T. Dean wrote:
> On 05/18/2012 11:11 PM, R. G. Newbury wrote:
>> On 05/18/2012 01:40 PM, Michael T. Dean wrote:
>>> On 05/18/2012 01:35 PM, R. G. Newbury wrote:
>>>> On 05/18/2012 12:53 PM, Gavin Hurlbut wrote:
>>>>> The value is for debugging and diagnosis of issues. Without the logs
>>>>> you can not get any support at all. Disk space is cheap. Just prune
>>>>> them out every few days or so and they will stay under control just
>>>>> fine.
>>>>>
>>>>> If you delete the files every minute, you are likely to mess things
>>>>> up.
>>>>> I, for one, will not even attempt to support a system with that setup.
>>>>>
>>>>
>>>> OK, so I will set the cron to delete them every hour or so..
>>>
>>> Still seems like overkill. Are you really concerned about using a couple
>>> megabytes of HDD space in a day (and even a couple megabytes/day is
>>> quite a lot for mythpreviewgen)?
>>>
>>>> And turn off the cron job if I need to debug anything.
>>>> But I have never had a problem with preview generation.
>>>
>>> If you really do have a problem with it, you can use syslog logging, and
>>> just tell your syslog logger to throw away all mythpreviewgen log
>>> output. That said, I'm guessing there are other issues on your MythTV
>>> computers that deserve more attention than complete eradication of
>>> mythpreviewgen log files... ;)
>>
>> Well I will end up doing something. ATM the logging scheme seems to me
>> to be disfunctional. I'm going to have to read the wiki and play with
>> the settings. Try logrotate, or syslog or cron.
>> Myth now seems to spew logging files. I changed the loglevel to crit,
>> in an attempt to reduce the output, but now the files don't report
>> much of anything.
>> Uptime is 49 days, I have about a dozen backend logfiles all dated
>> April 29 and nothing after that. I have 4 frontend files dated April
>> 29 and one dated May 3 and nothing after that. loglevel at crit may be
>> too high.
>> I liked the old logfile scheme: one process one file.
>
> Actually, it was "one process and all its subprocess, one file full of
> mixed up log messages" that resulted in users saying, "The backend
> locked up with 'invalid protocol version' error," which is impossible (a
> backend can't have an invalid protocol version with itself). What was
> actually happening was some child process started by the backend was
> failing due to the backend's network/socket code failing to listen
> for/respond to clients. Now, users would correctly report,
> "mythpreviewgen runs fail due to 'invalid protocol version' and
> mythbackend doesn't respond to network requests," because they won't see
> mythpreviewgen logging in mythbackend.log, so they'll actually know
> where it's coming from/what's happening.

That aspect of it I understand and I agree with. I still have to learn
how to handle the spew of files which the new methodology produces. I
don't mind one file per process/subprocess. I just don't find the
present method particularly usable due to the fact that I have to open
and look at so many files to find anything. And what I presently see is
not too useful to me. That may be that I have the error level turned up
too high, so I don't see the 'normal' reporting I am used to.

And logrotate or syslog or cron will have to be instituted to deal with
it all.

G.





_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


stichnot at gmail

May 19, 2012, 7:22 PM

Post #19 of 29 (3528 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Sat, May 19, 2012 at 6:05 PM, R. G. Newbury <newbury [at] mandamus> wrote:
> I still have to learn how
> to handle the spew of files which the new methodology produces. I don't mind
> one file per process/subprocess. I just don't find the present method
> particularly usable due to the fact that I have to open and look at so many
> files to find anything. And what I presently see is not too useful to me.
> That may be that I have the error level turned up too high, so I don't see
> the 'normal' reporting I am used to.

I haven't seen this mentioned yet, but what I do is run both syslog
and logpath at the same time. That way, I get a nice predictable
syslog file location that is suitable for most cases, but if I want
more detail or more accurate timestamps, I can track down the specific
logpath file to view.

Jim
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


stse+mythtv at fsing

May 21, 2012, 9:14 AM

Post #20 of 29 (3480 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Thu, May 17, 2012 at 03:08:54PM -0400, Raymond Wagner wrote:
>On 5/17/2012 14:06, Stephan Seitz wrote:
>>I’m really wondering who thought the change from logfile to logpath was
>>a good idea. While you now have logfiles according to the name of
>>process (e.g. mythbackend or mythpreviewgen), the names contain
>>„cryptic” things like PID and date. How can you now configure any
>>logrotation program to rotate the right logfiles?
>Wildcards and manual postrotate definitions.
>http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>http://www.mythtv.org/wiki/Logrotate_-_mythbackend

Well, I still think this is very ugly. If restart the backend I get a new
logfile which has to go through its own rotation cycle together with the
old log. This makes the directory contents confusing.

>The separation of the logs is an attempt to clarify things. Separate
>logs for separate instances means when we ask for logs of an event, it's
>not going to get interspersed with logs of half a dozen other preview
>generation or commercial detection jobs.

I agree with you that separate logs for separate applications have
a great advantage. Yes, and if I debug an application it may have an
advantage to have single logs fot the instances, but normally I don’t
debug the application and I don’t be interested in playing a „what’s the
name of the current logfile” game if I have the need to look into one.

What would you think if the simple commands „less
/var/log/apache2/error.log” or „tail -f /var/log/mail.log” don’t show you
the current log content, because the name contains the PID and a date and
you have to look into the directory to find the current log?

Piping the log output through syslog to get proper logfile names is only
a workaround for a buggy software.

So please, can’t you revert the change so that you get <application>.log
when you don’t use debugging?

>Of course where's the fun in log rotation when your filesystem does live
>compression?

Why should I be interested in very old logs? And which stable linux
filesystem can do live compression?

Shade and sweet water!

Stephan

--
| Stephan Seitz E-Mail: stse [at] fsing |
| Public Keys: http://fsing.rootsland.net/~stse/keys.html |
Attachments: smime.p7s (3.54 KB)


mtdean at thirdcontact

May 21, 2012, 9:43 AM

Post #21 of 29 (3487 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/21/2012 12:14 PM, Stephan Seitz wrote:
> On Thu, May 17, 2012 at 03:08:54PM -0400, Raymond Wagner wrote:
>> On 5/17/2012 14:06, Stephan Seitz wrote:
>>> Im really wondering who thought the change from logfile to logpath was
>>> a good idea. While you now have logfiles according to the name of
>>> process (e.g. mythbackend or mythpreviewgen), the names contain
>>> cryptic things like PID and date. How can you now configure any
>>> logrotation program to rotate the right logfiles?
>> Wildcards and manual postrotate definitions.
>> http://www.mythtv.org/wiki/Logrotate_-_mythfrontend
>> http://www.mythtv.org/wiki/Logrotate_-_mythbackend
>
> Well, I still think this is very ugly. If restart the backend I get a
> new logfile which has to go through its own rotation cycle together
> with the old log. This makes the directory contents confusing.
>
>> The separation of the logs is an attempt to clarify things. Separate
>> logs for separate instances means when we ask for logs of an event,
>> it's not going to get interspersed with logs of half a dozen other
>> preview generation or commercial detection jobs.
>
> I agree with you that separate logs for separate applications have a
> great advantage. Yes, and if I debug an application it may have an
> advantage to have single logs fot the instances, but normally I dont
> debug the application and I dont be interested in playing a whats
> the name of the current logfile game if I have the need to look into
> one.
>
> What would you think if the simple commands less
> /var/log/apache2/error.log or tail -f /var/log/mail.log dont show
> you the current log content, because the name contains the PID and a
> date and you have to look into the directory to find the current log?

You do realize you can easily find the current log file with something like:

ls -t /var/log/mythtv/mythbackend-*.log | head -n1

and could even have your mythbackend/mythfrontend start script create a
link with a name like /var/log/mythtv/mythbackend.log using information
obtained that way.

> Piping the log output through syslog to get proper logfile names is
> only a workaround for a buggy software.

Using the definition of buggy = something I don't understand/like?

> So please, cant you revert the change so that you get
> <application>.log when you dont use debugging?

Why not just use syslog? The syslog logging is the approach we've
provided to allow users to configure the log file name. If you want to
configure the log file name, you should use the approach we've provided
to allow you to configure the log file name. (And, again, it's not a
workaround for a bug--we actually have code that Gavin Hurlbut went to
great trouble writing specifically to support syslog logging.)

And, we even provide useful syslog configurations you can use (
http://www.mythtv.org/wiki/Category:Syslog_Configuration_Files ). Well,
we've provided them for rsyslog (
http://www.mythtv.org/wiki/Rsyslog_Configuration ), because that's the
syslog implementation I use, and, therefore, the one I was able to
configure and test (even though I don't use syslog logging, myself). I
assume that no one else uses any other syslog implementation since no
one has created other configuration files...

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


stse+mythtv at fsing

May 21, 2012, 10:27 AM

Post #22 of 29 (3479 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Mon, May 21, 2012 at 12:43:23PM -0400, Michael T. Dean wrote:
>You do realize you can easily find the current log file with something
>like:
>ls -t /var/log/mythtv/mythbackend-*.log | head -n1
>and could even have your mythbackend/mythfrontend start script create
>a link with a name like /var/log/mythtv/mythbackend.log using
>information obtained that way.

Of course, we will certainly find other complicated hacks to get standard
behaviour.

>>Piping the log output through syslog to get proper logfile names is
>>only a workaround for a buggy software.
>Using the definition of buggy = something I don't understand/like?

Buggy = something that doesn’t follow the good old unix way.

>Why not just use syslog? The syslog logging is the approach we've

Well, for now I’m using syslog according to your nice examples you
quoted. It is working but I still consider it a workaround, especially
since everything was right before 0.25.

This is bad for distributions as well. How should mythtv be packaged?
With logpath and then having a directory with lots of confusing files?
With syslog and then try to figure out which facility is not used and how
to configure the different log daemons (Debian has three at least)?

This new behaviour makes everything so unnecessary complicated.

Shade and sweet water!

Stephan

--
| Stephan Seitz E-Mail: stse [at] fsing |
| Public Keys: http://fsing.rootsland.net/~stse/keys.html |
Attachments: smime.p7s (3.54 KB)


gjhurlbu at gmail

May 21, 2012, 10:51 AM

Post #23 of 29 (3484 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On Mon, May 21, 2012 at 10:27 AM, Stephan Seitz
<stse+mythtv [at] fsing> wrote:
> On Mon, May 21, 2012 at 12:43:23PM -0400, Michael T. Dean wrote:
> Of course, we will certainly find other complicated hacks to get standard
> behaviour.

Standard behavior? There is no "standard behavior" for application logging.

> Buggy = something that doesnt follow the good old unix way.

Whatever. The logs are primarily for debugging and tracking what
happened. They are not really designed for user perusal, as is the
case for nearly every application that logs. The only time most
logfiles are ever read is to troubleshoot. In MythTV, this is the
desired (by those troubleshooting) methodology, and we have made it
easy enough for the users to control the size of the contents in the
directory (or from syslog).

> Well, for now Im using syslog according to your nice examples you quoted.
> It is working but I still consider it a workaround, especially since
> everything was right before 0.25.

No it wasn't "right" before 0.25. It was quite wrong, in fact.
Logging would slow down the programs by working synchronously rather
than asynchronously. And the output format was nearly useless in a
lot of places.

> This is bad for distributions as well. How should mythtv be packaged? With
> logpath and then having a directory with lots of confusing files? With
> syslog and then try to figure out which facility is not used and how to
> configure the different log daemons (Debian has three at least)?

Well, like it or not, this is how it's going to be. Mythbuntu has
already setup the syslog part, and that is the distribution that seems
to have the vast majority of users. The files aren't confusing, they
are just not important for the users in the general case, but only
matter to the user when troubleshooting, at which case, they are far
easier to deal with than digging through one monstrous log.
Especially when it comes to something like mythpreviewgen which can at
times have 8 or more running in parallel. If the logs were all to one
file, it becomes exceedingly difficult to follow without unnecessary
post-processing.

> This new behaviour makes everything so unnecessary complicated.

Then put in a log rotator, and ignore the directory. Problem solved.
I don't hear you complaining about the spew most apps put in odd
places. To the most extent, all that matters (until something breaks)
is that the application runs and does its job. What internal
mumbo-jumbo happens is like a TV... no user-servicable parts inside.

Anyways... Just let it drop, it's not changing :)
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


jan.ceuleers at gmail

May 21, 2012, 11:04 AM

Post #24 of 29 (3481 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/21/2012 07:27 PM, Stephan Seitz wrote:
> This is bad for distributions as well. How should mythtv be packaged?
> With logpath and then having a directory with lots of confusing files?
> With syslog and then try to figure out which facility is not used and
> how to configure the different log daemons (Debian has three at least)?
>
> This new behaviour makes everything so unnecessary complicated.

FWIW, I agree. As far as I understand the motivation for the change in
behaviour (and I'm not saying that I do), it makes it easier for a user
to find the right information to provide to developers in case a bug
needs to be reported at the expense of either a large and uncontrolledly
growing number of files or disabling the behaviour by adopting syslog.

So when I migrate to 0.25 I'll be going down the syslog route.

And as you point out I don't envy the packager's job here.

Cheers, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 21, 2012, 11:22 AM

Post #25 of 29 (3483 views)
Permalink
Re: --logfile vs. --logpath [In reply to]

On 05/21/2012 01:27 PM, Stephan Seitz wrote:
> On Mon, May 21, 2012 at 12:43:23PM -0400, Michael T. Dean wrote:
>> You do realize you can easily find the current log file with
>> something like:
>> ls -t /var/log/mythtv/mythbackend-*.log | head -n1
>> and could even have your mythbackend/mythfrontend start script create
>> a link with a name like /var/log/mythtv/mythbackend.log using
>> information obtained that way.
>
> Of course, we will certainly find other complicated hacks to get
> standard behaviour.
>
>>> Piping the log output through syslog to get proper logfile names is
>>> only a workaround for a buggy software.
>> Using the definition of buggy = something I don't understand/like?
>
> Buggy = something that doesnt follow the good old unix way.

MythTV is different from many/most other *nix apps in that there are
often multiple instances of applications running--and logging
information--concurrently. That said, the only "good old unix way" of
logging I know of is, in fact, syslog--everything else is pretty much
non-standard, application-specific logging practices (where the vast
majority of those applications have only one instance or an application
to worry about, too).

>> Why not just use syslog? The syslog logging is the approach we've
>
> Well, for now Im using syslog according to your nice examples you
> quoted. It is working but I still consider it a workaround, especially
> since everything was right before 0.25.
>
> This is bad for distributions as well. How should mythtv be packaged?
> With logpath and then having a directory with lots of confusing files?
> With syslog and then try to figure out which facility is not used and
> how to configure the different log daemons (Debian has three at least)?

FWIW, you don't need an unused log facility with the simple
configuration (which I just moved to a separate page so it's easier to
quote/easier to distinguish as separate).

http://www.mythtv.org/wiki/Simple_rsyslog_Configuration

As for dealing with multiple syslog implementations, I'd suppose
packagers could handle it as they do for other syslog-using
applications. (That said, I know nothing of packaging, but I do know of
many applications that use syslog.)

Mike


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.