lib/console/vmstat_utils.pm

read_memory_cpu

read_memory_cpu("/tmp/file.log")
Input :  File which contains vmstat output.
Returns a list with two array references which maps to amount of idle memory and CPU usage from the vmstat output log file.

average

average([1,2,4,5])
Input:  Array of numbers.
Returns the average of numbers.