Hi all,
I've a string like this
Cpu(s): 1.9%us, 2.1%sy, 1.5%ni, 94.5%id, 0.8%wa, 0.0%hi, 0.1%si, 0.0%st
it represents the Cpu usage of my unix box.
Now I need to apply awk and sed (i think) to extract the current load of my CPUs. I'd like to extract the 'us', 'sy', 'ni' values from the string and then I want to sum them.
The script should return 5.5 (1.9 + 2.1 + 1.5)... do you know how to achieve this?
Thanks a lot