def get_usage(self):
usage = {}<EOL>for cpu, timings in self.get_cpu_timings().items():<EOL><INDENT>cpu_total = sum(timings)<EOL>del timings[<NUM_LIT:3>:<NUM_LIT:5>]<EOL>cpu_busy = sum(timings)<EOL>cpu_usage = self.calculate_usage(cpu, cpu_total, cpu_busy)<EOL>usage['<STR_LIT>' + cpu] = cpu_usage<EOL><DEDENT>usage['<STR_LIT>'] = usage['<STR_LIT>']<EOL>return usage<EOL>
parses /proc/stat and calcualtes total and busy time
(more specific USER_HZ see man 5 proc for further informations )