pcp
[Top] [All Lists]

RE: Possible pmmgr issue?

To: "'Nathan Scott'" <nathans@xxxxxxxxxx>, "'Frank Ch. Eigler'" <fche@xxxxxxxxxx>
Subject: RE: Possible pmmgr issue?
From: "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx>
Date: Sat, 15 Feb 2014 09:20:32 +1100
Cc: "'pcp developers'" <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1040057732.6827059.1392333686610.JavaMail.zimbra@xxxxxxxxxx>
References: <1952377955.6159460.1392281163287.JavaMail.zimbra@xxxxxxxxxx> <1444843200.6174759.1392282098405.JavaMail.zimbra@xxxxxxxxxx> <20140213125811.GG11820@xxxxxxxxxx> <1040057732.6827059.1392333686610.JavaMail.zimbra@xxxxxxxxxx>
Thread-index: AQIIJXTr6HzUKtjwSm/+GIWI066zTAH+t6t0ApeCtHMCIP3IXJoNoAZQ
> -----Original Message-----
> From: Nathan Scott [mailto:nathans@xxxxxxxxxx]
> Sent: Friday, 14 February 2014 10:21 AM
> To: Frank Ch. Eigler; Ken McDonell
> Cc: pcp developers
> Subject: Re: Possible pmmgr issue?
> ...
> Ken, I'd be interested in your thoughts on a few observations from the
> pmlogger_daily scripts on this host (all defaults are in place, for 
> everything -
> both pmlogger_daily & pmmgr):
> - there seems to be some older data that is not being culled?

See previous mail ... if merge finds a problem, culling and compressing is 
skipped

> - there's a couple of logs that haven't merged, possibly cos one has a zero
> sized file or two?

I think the zero sized files are OK (expected, warnings issued but proceed), 
the problem is the truncated archive (again, refer to earlier mail for possible 
remediation options).

> - from inspection of the pmlogger_daily script, we appear to always do a
> logmerge, even if there is only one log - could this not simply be handled 
> via a
> mv(1) of the files?  (avoiding the read/write I/O there entirely, for the 
> simple
> case of one archive for the previous day - i.e. no pmcd/pmlogger restarts).

Yep, that's an optimization that could be done.

Probably safer to do a 2 pass operation
1. hard link each of the index, meta, 0, 1, ... files
2. rm the original ones

This way you always have at least one complete archive, even if the system 
crashes or the script is interrupted/terminated.

<Prev in Thread] Current Thread [Next in Thread>