Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2009 13:19:16 +0530
From:      Manish Jain <invalid.pointer@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Looking for a convenient way in C to retrieve CPU and memory usage of a process
Message-ID:  <4B37117C.3050502@gmail.com>

next in thread | raw e-mail | index | archive | help

Hello,

I am looking for a convenient way using C to retrieve the current CPU 
and memory utilization of a process of which I have the pid. Can 
somebody please give me a hint of which system-calls/library-functions 
to use for this ? I don't want to use the system() function or grep for 
information via the /proc filesystem.

I would be grateful if you could also please mention whether the 
suggested method[s] is/are FreeBSD-specific or would be portable to 
other environments like Solaris/Linux ?


Thanks for any help.

Regards & Happy New Year
Manish Jain
invalid.pointer@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B37117C.3050502>