pcp
[Top] [All Lists]

Re: Archive processing and reporting

To: "Junkin, Bobby" <Bobby.Junkin@xxxxxxxxxxxxxxxxx>
Subject: Re: Archive processing and reporting
From: Ken McDonell <kenmcd@xxxxxxxxxxxxxxxxx>
Date: Tue, 6 Feb 2001 22:19:10 +1100
Cc: <pcp@xxxxxxxxxxx>
In-reply-to: <FCF379336618D3119BDA00C00D00924602E7D17E@UMS.MSFC.NASA.GOV>
Reply-to: <kenmcd@xxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
On Thu, 25 Jan 2001, Junkin, Bobby wrote:

> I'm currently using PCP 2.1 in an IRIX 6.5.9 environment.
> According to the pmlogger_daily man page, toward the bottom, it indicates
> "The script /usr/pcp/bin/pmlogger_daily could be copied and modified to
> implement a site-specific procedure for end-of-week and/or end-of-month
> management for a set of PCP archives."
> My question is, what specifically "could be modified" in this script to
> accomplish an end-of-week and month processing? ...

There are a number of things here ...

1. I would suggest you set up 3 pmlogger instances, with their choice
   of metrics and (most importantly) logging interval tuned to the
   needs of your 30-min daily snapshot, 2-hr weekly snapshots and
   24-hour monthly averages.

   One word of warning: for the longer periods you may have problems
   with pmcd re-starts (the counters get re-set, so any rate-converted
   metrics cannot be reported over a period where pmcd is re-started,
   and instantaneous metrics are not informative).

   Another word of warning: for long sampling periods, the frequency
   of counter overlow goes up ... this may make rate-conversion
   meaningless.

   And when archives are merged together, the resultant archive will
   have the same discontinuities as a pmcd-restart at the points
   where the archives are merged.

   You may wish to consider some other form time averaging of the
   data collected more frequently to overcome these problems, but
   that will be peyond pmcd unless you use pmimport to recreate
   a PCP archive from a statistical reduction of a PCP archive.

2. I would use pmlogger_daily each day on these 2 archive sets to
   deal with pmcd re-starts and produce once one log per day for
   each of the 3 collections.

   Adjust the -k option is long enough to keep all the archives
   you need, i.e. 31 ... the default is 14.

3. Next write another cron script to do the weekly and monthly
   merging of the relevant logs ... see pmdate(1) to generate the
   date patterns for logs matching the names generated by pmlogger_daily
   e.g.

        for d in 1 2 3 4 5 6 7
        do
            x=`pmdate -${d}d %Y%m%d`
            echo $x
        done

    will generate the archive names for the past 7 days.

    Use pmlogextract to merge these archives together, and run
    pmchart on the resultant archive.

> ... I currently have
> pmlogger_daily running (as specified for daily processing) and using pmsnap
> to generate snapshots every 30-minutes. This all works great! However, what
> I also would like to implement Daily charts (at say 2 hour intervals for the
> past 7 days) and Monthly charts (depicting daily averages for the past 31
> days).
> I'm no scripting guru or ace programmer. I've tried setting up the crontab
> for pmlogger_daily to only run on Sunday which works fine for one week
> (provided the system isn't rebooted or pcp restarted). But I figured someone
> in this list might have a better way or be able to provide some more
> information. Any help is greatly appreciated.
> Thanks,
> Bobby Junkin
> Lockheed Martin Space Operations
> Huntsville AL
> bobby.junkin@xxxxxxxxxxxxxxxxx
>
>


<Prev in Thread] Current Thread [Next in Thread>
  • Re: Archive processing and reporting, Ken McDonell <=