Functions to get stat information about cpu and/or processes reading from /proc/stat and /proc/<pid>/stat files. Based on a concept explained in question from: http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux/1424556#1424556