Showing results for 
Search instead for 
Did you mean: 

Tutorial on sar command

Sagar Sirdesai
Trusted Contributor

Tutorial on sar command

I nee dto understand the output of sar command with examples.

Please advise me a study guide
The OS is HP_UX 11.11 and 11.23

Hakki Aydin Ucar
Honored Contributor

Re: Tutorial on sar command

You can use man pages of sar in unix to get details.

Sar retrieves all of its metrics via the /dev/kmem or pstat(2) interface, although in HP-UX some of the counters are specific only to sar. As with most of the counter-based performance tools, overhead is minimal as long as the sampling interval is 5 seconds or more.
Command line options:

-A- All metrics

-a- File system lookups

-b- Disk logical, physical & raw reads/writes; buffer cache hit ratios

-c- System call rates

-d- Disk I/Os and queue lengths by disk drive

-M- CPU utilization by CPU in an HP-UX SMP environment (used with -u or -q)

-m- Message and semaphore operations

-P- Processor set information (must be used with -M and -u or -q)

-q- Run queue

-S- Select system call rate (must be used with the -m )

-u- CPU utilization

-v- Kernel table utilization

-w- Swapping and context switching

-y- Terminal I/O
Trusted Contributor

Re: Tutorial on sar command


Have a look at the webpage below. Although it does not focus specifically on HP-UX I think you will find most of the information quite useful:

P Arumugavel
Respected Contributor

Re: Tutorial on sar command


Please read the below documents.
It explians about performance monitoring which includes sar.

Emil Velez
Honored Contributor

Re: Tutorial on sar command

sar also allows you to collect data.

if you do a man sa1

it lists some cron entries you can put in roots crontab. The next day you can do

sar -c or sar -b

without any timeframes and it will show you the "collected" data.