[LearnAdmin] Single command to get CPU usage % in linux

14 views
Skip to first unread message

Naresh Surampudi

unread,
Apr 12, 2013, 3:15:51 AM4/12/13
to learnadmin+g...@googlegroups.com

top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%\id.*/\1/" | awk '{print 100 - $1"%"}'


--
Posted By Naresh Surampudi to LearnAdmin at 4/12/2013 12:45:00 PM
Reply all
Reply to author
Forward
0 new messages