views:

212

answers:

3

Is there a way to get the CPU and memory usage programatically (C++) of an application on HPUX?

A: 

How to determine CPU and memory consumption from inside a process

Answers are given for Windows and Linux, not HPUX, but the Linux version might lead you in the right direction.

luke
A: 

HP-UX supports getrusage().

Martin v. Löwis
A: 

If you need to get the numbers for a different process, use pstat_getproc().

mark4o