Improved cpu stat script.