getLoadAvg

fnauto getLoadAvg() @safe

Gets load averages from sysinfo.

This is an alternative to reading /proc/loadavg, using the sysinfo syscall.

Returns

Tuple of (1-minute, 5-minute, 15-minute) load averages.

Example:

auto loads = getLoadAvg();
writeln("1-min load: ", loads[0]);