There are two basic ways you can get load average on a modern Linux system.
getloadavg (3) system call. The second is
This module provides means of getting the information from both sources.
/proc/loadavg provides some additional information but we ignore that.
Tries to parse the output of
/proc/loadavg. If anything goes wrong an arbitrary exception will be raised.
Discards error checking from getLoadAvgSafe. Will raise IO exception on error.
getloadavg (3) to get system load average.
Provides error checking, and the result may be Nothing in case of error.
If there is not enough data the samples will be copied from more recent samples.