Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
sar(1)				 User Commands				sar(1)

NAME
       sar - system activity reporter

SYNOPSIS
       sar [-aAbcdgkmpqruvwy] [-o filename] t [n]

       sar [-aAbcdgkmpqruvwy] [-e time]	[-f filename] [-i sec] [-s time]

DESCRIPTION
       In  the first instance, sar samples cumulative activity counters	in the
       operating system	at n intervals of t seconds, where t should  be	 5  or
       greater.	 If  t is specified with more than one option, all headers are
       printed together	and the	output may be difficult	to read.  (If the sam-
       pling  interval	is  less than 5, the activity of sar itself may	affect
       the sample.) If the -o option is	specified, it  saves  the  samples  in
       filename	in binary format. The default value of n is 1.

       In the second instance, no sampling interval is specified. sar extracts
       data from a previously recorded filename, either	the one	 specified  by
       the  -f	option or, by default, the standard system activity daily data
       file /var/adm/sa/sadd for the current day dd. The starting  and	ending
       times  of  the report can be bounded using the -e and -s	arguments with
       time specified in the form hh[:mm[:ss]].	The -i option selects  records
       at  sec	second	intervals.  Otherwise, all intervals found in the data
       file are	reported.

OPTIONS
       The following options modify the	subsets	 of  information  reported  by
       sar.

       -a    Report  use  of  file  access  system  routines: iget/s, namei/s,
	     dirblk/s

       -A    Report all	data. Equivalent to -abcdgkmpqruvwy.

       -b    Report buffer activity:

	     bread/s, bwrit/s
		   transfers per second	of data	 between  system  buffers  and
		   disk	or other block devices.

	     lread/s, lwrit/s
		   accesses of system buffers.

	     %rcache, %wcache
		   cache hit ratios, that is, (1-bread/lread) as a percentage.

	     pread/s, pwrit/s
		   transfers using raw (physical) device mechanism.

       -c    Report system calls:

	     scall/s
		   system calls	of all types.

	     sread/s, swrit/s, fork/s, exec/s
		   specific system calls.

	     rchar/s, wchar/s
		   characters  transferred  by read and	write system calls. No
		   incoming or outgoing	exec(2)	 and  fork(2)  calls  are  re-
		   ported.

       -d    Report  activity for each block device (for example, disk or tape
	     drive) with the exception of XDC disks and	tape drives. When data
	     is	 displayed, the	device specification dsk- is generally used to
	     represent a disk drive. The device	specification used  to	repre-
	     sent  a  tape  drive  is machine dependent. The activity data re-
	     ported is:

	     %busy, avque
		   portion of time device was busy servicing  a	 transfer  re-
		   quest,  average  number of requests outstanding during that
		   time.

	     read/s, write/s, blks/s
		   number of read/write	transfers from or to device, number of
		   bytes transferred in	512-byte units.

	     avwait
		   average wait	time in	milliseconds.

	     avserv
		   average service time	in milliseconds.

       For  more  general  system  statistics, use iostat(1M), sar(1M),	or vm-
       stat(1M).

	     See System	Administration Guide: Basic Administration for	naming
	     conventions for disks.

       -e time
	     Select data up to time. Default is	18:00.

       -f filename
	     Use  filename  as the data	source for sar.	Default	is the current
	     daily data	file /var/adm/sa/sadd.

       -g    Report paging activities:

	     pgout/s
		   page-out requests per second.

	     ppgout/s
		   pages paged-out per second.

	     pgfree/s
		   pages per second placed on the free list by the page	steal-
		   ing daemon.

	     pgscan/s
		   pages per second scanned by the page	stealing daemon.

	     %ufs_ipf
		   the percentage of UFS inodes	taken off the freelist by iget
		   which had reusable pages associated with them. These	 pages
		   are	flushed	 and  cannot  be reclaimed by processes. Thus,
		   this	is the percentage of igets with	page flushes.

       -i sec
	     Select data at intervals as close as possible to sec seconds.

       -k    Report kernel memory allocation (KMA) activities:

	     sml_mem, alloc, fail
		   information about the memory	pool reserving and  allocating
		   space for small requests: the amount	of memory in bytes KMA
		   has for the small pool, the number of  bytes	 allocated  to
		   satisfy  requests for small amounts of memory, and the num-
		   ber of requests for small amounts of	memory that  were  not
		   satisfied (failed).

	     lg_mem, alloc, fail
		   information for the large memory pool (analogous to the in-
		   formation for the small memory pool).

	     ovsz_alloc, fail
		   the amount of memory	allocated for  oversize	 requests  and
		   the	number	of oversize requests which could not be	satis-
		   fied	(because oversized memory  is  allocated  dynamically,
		   there is not	a pool).

       -m    Report message and	semaphore activities:

	     msg/s, sema/s
		   primitives per second.

       -o filename
	     Save samples in file, filename, in	binary format.

       -p    Report paging activities:

	     atch/s
		   page	 faults	 per second that are satisfied by reclaiming a
		   page	currently in memory (attaches per second).

	     pgin/s
		   page-in requests per	second.

	     ppgin/s
		   pages paged-in per second.

	     pflt/s
		   page	faults from protection errors per second (illegal  ac-
		   cess	to page) or "copy-on-writes".

	     vflt/s
		   address  translation	page faults per	second (valid page not
		   in memory).

	     slock/s
		   faults per second caused by software	lock requests  requir-
		   ing physical	I/O.

       -q    Report  average  queue length while occupied, and percent of time
	     occupied:

	      runq-sz, %runocc
		   run queue of	processes in memory and	runnable.

	     swpq-sz, %swpocc
		   these are no	longer reported	by sar.

       -r    Report unused memory pages	and disk blocks:

	     freemem
		   average pages available to user processes.

	     freeswap
		   disk	blocks available for page swapping.

       -s time
	     Select data later than time in  the  form	hh[:mm].   Default  is
	     08:00.

       -u    Report CPU	utilization (the default):

	      %usr, %sys, %wio,	%idle
		   portion  of	time  running  in user mode, running in	system
		   mode, idle with some	process	waiting	 for  block  I/O,  and
		   otherwise idle.

       -v    Report status of process, i-node, file tables:

	     proc-sz, inod-sz, file-sz,	lock-sz
		   entries/size	 for  each  table,  evaluated once at sampling
		   point.

	     ov	   overflows that occur	between	sampling points	for  each  ta-
		   ble.

       -w    Report system swapping and	switching activity:

	     swpin/s, swpot/s, bswin/s,	bswot/s
		   number  of  transfers  and  number of 512-byte units	trans-
		   ferred for swapins and swapouts (including initial  loading
		   of some programs).

	     pswch/s
		   process switches.

       -y    Report TTY	device activity:

	     rawch/s, canch/s, outch/s
		   input  character  rate,  input  character rate processed by
		   canon, output character rate.

	     rcvin/s, xmtin/s, mdmin/s
		   receive, transmit and modem interrupt rates.

EXAMPLES
       Example 1: Viewing system activity

       To see today's CPU activity so far:

       example%	sar

       Example 2: Watching system activity evolve

       To watch	CPU activity evolve for	10 minutes and save data:

       example%	sar -o temp 60 10

       Example 3: Reviewing disk and tape activity

       To later	review disk and	tape activity from that	period:

       example%	sar -d -f temp

FILES
       /var/adm/sa/sadd
	     daily data	file, where dd are digits representing the day of  the
	     month

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       +-----------------------------+-----------------------------+
       |      ATTRIBUTE	TYPE	     |	    ATTRIBUTE VALUE	   |
       +-----------------------------+-----------------------------+
       |Availability		     |SUNWaccu			   |
       +-----------------------------+-----------------------------+

SEE ALSO
       sag(1),	 iostat(1M),   sar(1M),	 vmstat(1M),  exec(2),	 fork(2),  at-
       tributes(5)

       System Administration Guide: Basic Administration

NOTES
       The sum of CPU utilization might	vary  slightly	from  100  because  of
       rounding	errors in the production of a percentage figure.

SunOS 5.9			  25 Oct 2001				sar(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=sar&sektion=1&manpath=SunOS+5.9>

home | help