1

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

roalz
  • 2,699
  • 3
  • 25
  • 42
LK__
  • 6,515
  • 5
  • 34
  • 53

3 Answers3

1

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.

Community
  • 1
  • 1
luke
  • 36,103
  • 8
  • 58
  • 81
0

HP-UX supports getrusage().

Martin v. Löwis
  • 124,830
  • 17
  • 198
  • 235
0

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

mark4o
  • 58,919
  • 18
  • 87
  • 102