MacOS – How to get the load average (and only the load average) on Mac OS X

macosterminal

On all linux boxes /proc/loadavg contains the raw load for 1, 5, and 15 minutes. Nothing extra. On OS X machines this file does not exist.

Is there a file or a terminal command which will give me the 1, 5 and 15 minute load averages under OS X, similar to /proc/loadavg on Linux? I know top and w display the load averages but they have a lot more information too. I want just the load averages.

Best Answer

You can also use this sysctl:

sysctl -n vm.loadavg