SAR utility in Solaris 10

This entry was posted in Solaris Administration and tagged on June 17, 2012, by

SAR utility on Solaris 10:

SAR stands for System activity resources.The different sar command is as shown below

SAR command Display output

sar -b Monitor unix buffer output activity

sar -u Monitor cpu activity

sar -w RAM memory switching and swapping activity

sar -d monitor disk usage

The output of sar command usually shows a time base activity snapshots. When you issue sar command you pass two numeric arguments , the first time interval between the samples and the second is the number of samples.

For eg.

For CPU consumption , issue the command

# sar -u 10 5

15:51:12 %usr %sys %wio %idle
15:51:22 1 2 0 97
15:51:32 1 2 0 97
15:51:42 2 2 0 95
15:51:52 1 2 0 97
15:52:02 3 2 0 95

Average 2 2 0 96

The output shows the cpu consumption every 10 seconds.

For Memory switching and swapping issue the following command

# sar -w 5 5

15:54:29 swpin/s bswin/s swpot/s bswot/s pswch/s
15:54:34 0.00 0.0 0.00 0.0 268
15:54:39 0.00 0.0 0.00 0.0 257
15:54:44 0.00 0.0 0.00 0.0 258
15:54:49 0.00 0.0 0.00 0.0 262
15:54:54 0.00 0.0 0.00 0.0 258

Average 0.00 0.0 0.00 0.0 261

This will give the memory switching and swapping every 5 seconds .

where

* swpin/s?Number of process swap-ins per second.

* swpot/s?Number of process swap-outs per second.

* bswin/s?Number of 512-byte swap-ins per second.

* bswot/s?Number of 512-byte swap-outs per second.

* pswch/s?Number of process context switches per second.

For Buffer activity reports use following syntax

# sar -b 1 5

This will display buffer activity every 1 sec

15:58:53 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
15:58:54 0 0 100 0 0 100 0 0
15:58:55 0 0 100 0 0 100 0 0
15:58:56 0 0 100 0 0 100 0 0
15:58:57 0 0 100 0 0 100 0 0
15:58:58 0 0 100 0 0 100 0 0

Average 0 0 100 0 0 100 0 0

Where,

* Bread/s- Number of physical reads from disk per second.

* lread/s?- Number of reads per second

* %rcache?- Buffer cache hit ratio for read request

* bwrit/s? – Number of physical writes to disk per second. This gives the DBA an indication of the overall write activity on the server.

* lwrit/s? – Number of writes per second

* %wcache? – Buffer cache hit ratio for write requests.

* pread/s? – Number of reads per second from disk. This is an excellent measure of the load on the I/O subsystem.

* pwrit/s? – Number of writes per second to disk

This command (sar -b ) is mostly used in activity resources of oracle database server.

??

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.