pcp
[Top] [All Lists]

Re: [pcp] Help with Python API

To: Rohan Arora <rarora2012@xxxxxxxxx>, pcp@xxxxxxxxxxx
Subject: Re: [pcp] Help with Python API
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 07 Jul 2015 07:33:28 +1000
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <CANbxzdUQKQW6OBswgpH5OsexCYV5Dx+MCD5gqSfdK6AF3GQ0+Q@xxxxxxxxxxxxxx>
References: <CANbxzdXmsRFyF_J_7c93uBuKWJHZikoRs6xmSPQC91rALtZbNA@xxxxxxxxxxxxxx> <CANbxzdXGZosHkKZXrcvJMoaPb=2YOY7_Rhw6cs2y-vp0Jhj8Vg@xxxxxxxxxxxxxx> <CANbxzdXVmBE1qRoHQQTy9VvbAt4rqppwEL-xizSUH7cKOswNzQ@xxxxxxxxxxxxxx> <CANbxzdV7Vndvczvo9OLgc8CpQ20wBK=YUD6v87ewVBa6yrTXKQ@xxxxxxxxxxxxxx> <CANbxzdXcqg=sRYa0JwETB+RHChw42uAeZE-n+bABUjV-FD9TDg@xxxxxxxxxxxxxx> <587447889.27462536.1435530714712.JavaMail.zimbra@xxxxxxxxxx> <CANbxzdX_4yDiOBqU954wjfbKOFOXnB8SJ_uiRsKEBdUk-hxF1w@xxxxxxxxxxxxxx> <CANbxzdUHygK=0NuO7L3pV+FERXa-LRL59=sumY5TznT0xzonxg@xxxxxxxxxxxxxx> <337532723.28653925.1435618315696.JavaMail.zimbra@xxxxxxxxxx> <CANbxzdVqbstVAue-GKW5moDkkKJKeg5pvtRdg1eHNET_7dHxeQ@xxxxxxxxxxxxxx> <559466FE.8090107@xxxxxxxxxxxxxxxx> <CANbxzdXqUj3i-MR2xF_NrTkYV11MMLBCX0B-+Btt45JQa77NQA@xxxxxxxxxxxxxx> <CANbxzdUn0Q8BkJUm-KAuTGxQAhQTz0CmSLdXEHKLT8UVKuBx4A@xxxxxxxxxxxxxx> <CANbxzdUQKQW6OBswgpH5OsexCYV5Dx+MCD5gqSfdK6AF3GQ0+Q@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
On 07/07/15 03:51, Rohan Arora wrote:
For the program that I am writing, I want to be able to append an
already existing archive, as the name is derived in a specific way, so I
cannot name the archive something different if it is for the same host.
However, I am taking the results for the previous x amount of hours, so
I would like to be able to append to an existing archive. This would
only be an issue if pmlogger is stopped and restarted. Currently,
pmlogger is being started from a bash script file. Is there an option
when starting pmlogger from the terminal to have it append to file "x"
if it exists, else create it?

I'm afraid you're going to be out of luck here.

There are a bunch of data integrity and data semantic issues that prevent arbitrarily appending to an archive.

You can however take a set of archives from the same host and combine them with pmlogextract (it is really a temporal merge, but this becomes a concatenation if the the archives do not overlap in time).

Another option would be to use pmlc(1) to control the one pmlogger to add and/or delete metrics and instances to be logged over time.

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