Operating System - HP-UX
1752650 Members
5309 Online
108788 Solutions
New Discussion юеВ

How to get only %idle value in Sar report

 
Chandan Kumar_1
Honored Contributor

How to get only %idle value in Sar report

Hi,

When I do sar it gives me %usr, %sys, %wio & %idle. However, I am looking for some trick which will give me only %idle value. Please let me know what argument I should pass to get only %idle value of sar report.

Thanks
Learn. Share. Inspire.
2 REPLIES 2
Michael Steele_2
Honored Contributor

Re: How to get only %idle value in Sar report

sar -u 5 5 | awk '{ print $5 }'
Support Fatherhood - Stop Family Law
Raj D.
Honored Contributor

Re: How to get only %idle value in Sar report

Chandan,
Check this out, with time and %value:

# sar -u 5 5 | perl -lnae 'print "$F[0] $F[4]"'

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "