1836468 Members
2802 Online
110101 Solutions
New Discussion

Re: sar

 
Jade Bulante
Frequent Advisor

sar

I would like to see how our system performance is by running sar so I used this command:

sar -u

It gave me these results.
%usr %sys %wio %idle
How come there is no numbers/rate showing how the system is performing?

I also ran this command and gave me this result:
device %busy avque r+w/s blks/s avwait avserv

Please let me know if I'm doing it wrong.

Thanks.

a
2 REPLIES 2
Tom Danzig
Honored Contributor

Re: sar

You need to specify an interval and count. To get CPU info every 5 seconds 5 times, use:
sar -u 5 5

Other useful reports from sar are:

-b Report buffer activity
-d Report activity for each block device
-w Report system swapping and switching activity
-q Report average queue length
-v Report status of text, process, inode and file tables

Greg Hall
Frequent Advisor

Re: sar

Hi Jade,

sar -u without any interval/count parms should show you the current days data. But you must be collecting the data first. Do you have any files in /var/adm/sa? Are you running the sa1/sa2 scripts via cron? See the reference manuals for full details but something like this:
0 * * * * /usr/lib/sa/sa1 900 4

will give you 15min intervals, 24 x 7. There are many ways to configure the collection, hourly, 15 mins, vary it overnight or at weekends, whatever suits your environment best.

greg
Confucious Confused