在 HPUX 上以编程方式获取应用程序的 CPU 和内存使用情况
有没有办法以编程方式(C++)获取 HPUX 上应用程序的 CPU 和内存使用情况?
Is there a way to get the CPU and memory usage programmatically (C++) of an application on HPUX?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如何从内部确定 CPU 和内存消耗process
给出了 Windows 和 Linux 的答案,而不是 HPUX,但 Linux 版本可能会引导您走向正确的方向。
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.
HP-UX 支持 getrusage()。
HP-UX supports getrusage().
如果您需要获取不同进程的编号,请使用
pstat_getproc()
。If you need to get the numbers for a different process, use
pstat_getproc()
.