pcp
[Top] [All Lists]

Re: [pcp] Help with Python API

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp@xxxxxxxxxxx
Subject: Re: [pcp] Help with Python API
From: Rohan Arora <rarora2012@xxxxxxxxx>
Date: Mon, 06 Jul 2015 17:27:37 +0000
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=HDIChUjUp7C8wGa2Ulrs6tcJDpzbW4EdML5dbdD8h7I=; b=D6fPJckhKMf/AOT9FFX11YEE2J4cQRP0+1MTz9JwiHA5WCTXDys07Nmw4+JBtbS2l2 KxQOTZ1KMFtfwS5NT5X90fDMWLR2g1EhV5Pr9sEPFRHyWlTr4tDM2QXacwZZl4FtYopa bcf0xoYBX/k/8PgFbAOxGmdcJGER9NOniBnlO+E17qYYz+EczLSEdbfI3Qu7b+585+IR Qy2rig761el0DDpMZN+0AXPn3E5GdBUfS424kX/95JkmsWDga4rW7WTpGJSHoR3YMH+n 90OTTD6g+nTHvPYXXHXGD4G/aYjOlGeFLp96GCusG6WbImD3/gRR/9pOF3tEwhfLtstJ Zevg==
In-reply-to: <CANbxzdXqUj3i-MR2xF_NrTkYV11MMLBCX0B-+Btt45JQa77NQA@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>
Also, I see that in the pmSetMode() documentation, to read an archive in reverse order you use pmSetMode(PM_MODE_BACK, timeval, delta). The example gave the valueÂ0x7fffffff for timeval.tv_sec, but I was wondering, is that guaranteed to read from the end of the archive? In my case, I always just want to read the last x entries in the log.

Thanks,
Rohan

On Mon, Jul 6, 2015 at 12:50 PM Rohan Arora <rarora2012@xxxxxxxxx> wrote:
Hi,

Sorry I still haven't had a chance to really look at the issue with connecting pmlogger to a remote host yet, but in a previous e-mail, Nathan mentioned result->timestamp, which I'm assuming is the result you get from calling context.pmFetch(metric_ids), correct? How do I access this timestamp from Python? I want to put the timestamp for when a metric was fetched into a list of timestamps.

Thanks,
Rohan

On Wed, Jul 1, 2015 at 6:17 PM Ken McDonell <kenj@xxxxxxxxxxxxxxxx> wrote:
On 02/07/15 02:07, Rohan Arora wrote:
> I tried following the directions on that page, the telnet error that I
> get is "Connect failed" rather than "Connection refused". I have
> verified that pmcd is running on the host I am trying to connect to as
> it is shown as running as a service, and I am able to use pminfo as
> well. Does it matter that the host is protected using a putty private
> key when using ssh? I am not sure where to go from here really.

Are you able to use pminfo on the same system connecting to the remote pmcd (i.e. the same client-server arrangement where pmlogger is not working)? That would be odd.

In any event the following output would help diagnose ...

On the client system

$ pminfo -v -Dcontext -h <remotehost> disk.all
$ echo "log mandatory on once { disk.dev }" | pmlogger -Dcontext -h <remotehost> -l /dev/tty foobar
^C
$ pminfo -a foobar

And on the remote system, the contents of:

/etc/pcp/pmcd/pmcd.conf
/var/log/pcp/pmcd/pmcd.log

_______________________________________________
pcp mailing list
pcp@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/pcp
<Prev in Thread] Current Thread [Next in Thread>