I just had this little script running for a day and notices that "OMAP McSPI/0" takes a lot of cpu time... Code: import os import sys import time import commands while(True): time.sleep(20) res = commands.getoutput('top -b -n 1') lines = res.split('\n') for i in range(len(lines)): if ("COMMAND" in lines[i]): logfile = open('cpu.log', 'a') logfile.write('\n') logfile.write('---------------------------------->\n') logfile.write('\n') logfile.write(lines[i+1] + '\n') logfile.write(lines[i+2] + '\n') logfile.close()
import os import sys import time import commands while(True): time.sleep(20) res = commands.getoutput('top -b -n 1') lines = res.split('\n') for i in range(len(lines)): if ("COMMAND" in lines[i]): logfile = open('cpu.log', 'a') logfile.write('\n') logfile.write('---------------------------------->\n') logfile.write('\n') logfile.write(lines[i+1] + '\n') logfile.write(lines[i+2] + '\n') logfile.close()