I want to get the cpu usage. I tried this command
top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}'
Could you confirm if this command is correct?
I want to get the cpu usage. I tried this command
top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}'
Could you confirm if this command is correct?
top
? – muru Feb 15 '16 at 23:50