Forum > macOS / Mac OS X

Using getrusage on OSX (+linux)


Grahame Grieve:
I'd like to call getrusage on OSX, per Ideally, the code will also work on linux.

There's no system routine for getrusage, just an obscure message here:,57914.msg431309.html#msg431309 about using syscall. I really don't know what that means.

Syscall on OSX is equally obscure... - is that relevant?

How do I use either syscall or getrusage on OSX and linux? (or else, how do I get CPU usage by the process?)



[0] Message Index

Go to full version