It is important to note that sys_getloadavg() does not return a percentage, and the numbers that it returns are completely meaningless if you do not know the number of CPU cores. To get the number as a percentage you need to divide the value by the number of CPU cores in the system. (eg: if the value is 0.5 and you have two cores, then you are using 25% of the CPU on average). Here is a simple function to get the values as a percent: