cpu usage calculation and percent memory used updated