Showing posts with label SAR. Show all posts
Showing posts with label SAR. Show all posts

Monday, May 18, 2009

SAR (Context Switch)

To monitor the context switching activity

# sar -wP ALL 10 5

Context switching happens when a multi-process OS suspends running one process or thread and starts another. Context switching occurs during any of the following,
  • A time slice expires.
  • A process exits
  • A process puts itself to sleep or in a stopped state.
  • A real-time priority process becomes ready to run.

Thanks

SAR (Paging)

To monitor paging activity

# sar -r 10 5

The o/p has the following columns

Slots - No. of free pages (4kb pagesize) available. (672979 *4*1024) kb.
Cycle/s- No. of page replacement cycles per second.
Fault/s - No. of page faults per second.
Odio/s - No. of non-paging disk I/O per second.

Thanks

SAR (System Buffer Usage)

To monitor the system's buffer activity (not Oracle's buffer cache).

# sar -b 10 5

It provides the number of transfers per second between system buffers and block devices.

Bread/s, bwrit/s -No. of physical I/O. Gives overall write activity on server.
Lread/s, lwrit/s -No. of reads and writes from and to system’s buffer cache.
Pread/s, pwrit/s -No. of I/O on raw devices.
%rcache, %wcache-Buffer cache hit ratio for read and write requests. (100* (lread –bread)/lread )

Inference
  • %rcache > 90% indicates the potential for bad disk I/O.
  • %wcache < 70% indicates the potential for bad disk I/O.

Thanks

SAR (IO)

To monitor the disk usage

# sar -d 10 5

The o/p has the following columns

%busy- The portion of time the device was busy servicing a transfer request.
avque - The average number of requests in queue.
r+w/s- Number of read and write requests per second.
Kbs/s - The number of Kbytes transferred per second.
avwait- The average time each request waits in the queue before it is serviced.
avserv- The average time taken for servicing a request.

Inference

  • %busy > 50 on a device indicates contention.
  • Avwait should not be greater than avserv
  • A high %busy and high avque indicates a big I/O bottleneck.

Thanks

SAR (Cpu) Individual

To monitor one CPU at a time.

# sar -P 2 10 5

The o/p displays the result for the 3rd CPU, 10 seconds apart, 5 times.

# sar -P 0,3 10 5

The o/p displays the result for the 1st and 4th CPU, 10 seconds apart, 5 times.

# sar -P ALL 10 5

The o/p displays the result for all the CPU, 10 seconds apart, 5 times.

Thanks

SAR (Cpu)

To monitor CPU usage

# sar -u 10 5

The o/p has the following columns.

%usr - Percent of CPU running in user mode (executing user code).
%sys - Percent of CPU running in system mode (executing OS code).
%wio - Percent of CPU running idle with a process waiting for block I/O.
%idle - Percent of CPU that is idle.

Inference
  • A low %idle indicates CPU intensive job.
  • A high %wio indicates a disk contention.
  • A high %sys (>20) indicates a bottleneck. May be due to swapping or paging.
  • A high %usr indicates applications not tuned properly or over utilization of CPU.

Thanks

Followers

Powered By Blogger
 

RAC Database Administration. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com