code: def get_usage(self):
          
          usage = {}
  
          for cpu, timings in self.get_cpu_timings().items():
              cpu_total = sum(timings)
              del timings[3:5]
              cpu_busy = sum(timings)
              cpu_usage = self.calculate_usage(cpu, cpu_total, cpu_busy)
  
              usage['usage_' + cpu] = cpu_usage
  
          # for backward compatibility
          usage['usage'] = usage['usage_cpu']
  
          return usage
docs: parses /proc/stat and calcualtes total and busy time
          (more specific USER_HZ see man 5 proc for further informations )