pcp
[Top] [All Lists]

Re: PCP + LSF

To: Jonathan Sparks <jsparks@xxxxxxx>
Subject: Re: PCP + LSF
From: Mark Goodwin <markgw@xxxxxxx>
Date: Wed, 20 Dec 2000 10:37:47 +1100 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <3A3FA8B3.768CF7A7@sgi.com>
Sender: owner-pcp@xxxxxxxxxxx
[cc:  pcp@xxxxxxxxxxx since this is of interest to all PCP users]

On Tue, 19 Dec 2000, Jonathan Sparks wrote:

> 
> I've probably asked you this before, but how easy is it to create a
> display to include data from an external command ? And is there some
> documentation to read on how to do that ?
> 
> Basically I need to create a display to monitor LSF and the jobs being
> processed, which means pulling the information from the LSF commands.
> 

You can use the "trace" PCP agent to do this. The documentation
is in the following man pages: 
    pmdatrace(1) - the PCP agent
    pmdatrace(3) - the libpcp_trace API (for instrumenting C or fortran)
    pmtrace(1)   - the pmtrace command (for instrumenting shell scripts)

The basic steps you will need to follow are:

1. read all the documentation ;-) (yeah right)
2. cd /var/pcp/pmdas/trace; ./Install
3. use either the pmtrace command in your scripts, or insert
   pmdatrace(3) calls in your code, or both.
4. monitor metrics below "trace" in the name space with any pcp tool
   (pmchart is usually the most useful for this)

Here's an example (step 2 has already been done) :

[root@sherman trace]# pmtrace -v 1000 "hello world"
pmtrace: observation complete (tag="hello world", value=1000.000000)
[root@sherman trace]# pminfo -f trace.observe.value

trace.observe.value
    inst [1 or "hello world"] value 1000

[root@sherman trace]# pmtrace -v 50  "hello world"
pmtrace: observation complete (tag="hello world", value=50.000000)
[root@sherman trace]# pminfo -f trace.observe.value

trace.observe.value
    inst [1 or "hello world"] value 50

You can have as many tags as you like. "hello world" is just a random
one that I chose for this example.

Hope this helps,
-- Mark


<Prev in Thread] Current Thread [Next in Thread>
  • Re: PCP + LSF, Mark Goodwin <=