shirou / gopsutil

psutil for golang
Other
10.56k stars 1.58k forks source link

cpu single Percent for (user,system,idle...) #278

Open dblucyne opened 7 years ago

dblucyne commented 7 years ago

Can provide a single value than the use of CPU?

shirou commented 7 years ago

Sorry, could you tell me what is single value ? cpu.Percent is calculated from use, system, idle and so on.

dblucyne commented 7 years ago

thank you for your reply,A single(user,nice,system,iowait) value Percent for TimesStat. as follows: %user %nice %system %iowait %steal %idle 0.00 0.00 0.00 0.00 0.00 100.00 0.99 0.00 0.99 0.00 0.99 97.03 5.15 0.00 1.03 0.00 0.00 93.81 1.00 0.00 1.00 0.00 0.00 98.00

a3linux commented 7 years ago

Does this one require the function cpu_times_percent in Python psutil? Do we really want this? Python code is here.