calculate total system cpu usage, and fixed bugs