pcp
[Top] [All Lists]

Re: getting the currently running process metrics

To: kenmcd@xxxxxxx
Subject: Re: getting the currently running process metrics
From: Madhu Sudhan R Tera <mst9696@xxxxxxxxxxx>
Date: Fri, 6 Jul 2001 09:48:25 -0500 (CDT)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <Pine.SGI.4.32.0107060520410.1125934-100000@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
Hello!
Thank you for your quick response.

As mentioned in my previous mail,i have recently installed PCP.

But is there a procedure to pass process ids and get the metrics
while writing a PMAPI??And what is this process.psinfo.stime and
others in pminfo command(As far as i understand its a namespace.Correct me
if i am wrong!)

Thank you,
With regards,           
MadhuSudhan Reddy Tera
              
 --------------------------------------------------
|Department of Computing and Information Sciences, |          
|Kansas State University,                          |
|Manhattan, KS 66502.                              |
|ph no:785-537-3276                                |
 --------------------------------------------------

On Fri, 6 Jul 2001, Ken McDonell wrote:

> On Thu, 5 Jul 2001, Madhu Sudhan R Tera wrote:
> 
> > Hello all!
> > I am new to this mailing list!
> 
> Welcome.
> 
> > Currently i am working on load balancing in beowulf cluster.
> >
> > The proposed procedure is to get the metrics for all the running
> > processes from PCP and provide these metrics as input to the loadbalancing
> > algorithm, which evaluates these metrics and decides which process to be
> > migrated.
> 
> Seems like a reasonable fit with PCP's capabilities.
> 
> > But I dont find any facility to get the process metrics like CPU usage by
> > each running process or memorey required by each process.pmem tool is not
> > available in non-commercial versions of PCP,i guess!
> 
> The reason pmem is not there is that compared to IRIX, Linux does not export 
> the same
> (nor as detailed) information about the address space of each process.
> 
> But there are some stats ... check out
> 
>     pminfo -dT proc.memory
> 
> Similarly the CPU usage stats are covered by
> 
>     pminfo -dT proc.psinfo.utime proc.psinfo.stime proc.psinfo.cutime \
>           proc.psinfo.cstime
> 
> To get a feel for the numbers and the amount of information, use -f
> with pminfo in place of -dT.
> 
> > Please tell me how i can get the process metrics programmatically using
> > pcp libraries.DO i have to write a PMDA or PMAPI??
> 
> I expect you will need to write a client program that uses the PMAPI to
> connect to PMCD and fetch the desired proc.* metrics for each process
> ... if you are interested in _recent_ CPU usage then you'll have to
> include periodic fetching or fetch-sleep-fetch because the CPU usage
> metrics are free-running counters that return CPU time used since the
> process began ... pmclient and pmstat are examples of programs that
> fetch a small number of metrics using the PMAPI, I'd suggest using
> pmclient as source reference.
> 
> 


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