CPU usage Info As Record (for quick monitoring)


on cpuUsageInfoRecord()
	set {ATID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, {": ", ", ", "% "}}
	set cpuUsageInfo to text items of (do shell script "top -l 1 | grep 'CPU usage'")
	set AppleScript's text item delimiters to ATID
	tell cpuUsageInfo to return {user:item 2 as real, sys:item 4 as real, |idle|:item 6 as real}
end cpuUsageInfoRecord

my cpuUsageInfoRecord()