On Sat, Dec 15, 2007 at 03:21:32PM +0700, Thanh D. Do wrote:
> What I really want to do is to monitor specific process.

assuming you are using linux (or SysV *nix) then :

  ps h -C MyProcessName -o "%cpu"

will give you the amount of cpu consumed by the process named
"MyProcessName" which then you need to send out as a metric (in this example
called "MyProcessCPU") with something like :

  gmetric --name=MyProcessCPU --value="`ps h -C MyProcessName -o "%cpu"`"
--type=float --units="%"

which then will need to be scheduled every minute through crontab by doing :

  echo '* * * * * gmetric --name=MyProcessCPU --value="`ps h -C MyProcessName 
-o "%cpu"`" --type=float --units="%"' >> /etc/crontab

> For example,
> I would like to store lastest 100 sample CPU usage of a specific
> process for further processing, in the host that run gmond. What
> should I do?

if you want to "store" a limited number of samples, then you probably just
want to write them to a file and rotate that instead of using gmetric and 
extracting them later from ganglia.

ganglia (through gmetad) uses RRD files for storage which allow for unlimited
number of samples in a concise format but that is not meant to be accurate as
it averages over time.

Carlo

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to