]> git.saurik.com Git - apple/system_cmds.git/blame - sar.tproj/sar.1
system_cmds-279.6.1.tar.gz
[apple/system_cmds.git] / sar.tproj / sar.1
CommitLineData
c3a08f59
A
1.\" Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
2.\"
3.\" The contents of this file constitute Original Code as defined in and
4.\" are subject to the Apple Public Source License Version 1.1 (the
5.\" "License"). You may not use this file except in compliance with the
6.\" License. Please obtain a copy of the License at
7.\" http://www.apple.com/publicsource and read it before using this file.
8.\"
9.\" This Original Code and all software distributed under the License are
10.\" distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
11.\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
12.\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
13.\" FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
14.\" License for the specific language governing rights and limitations
15.\" under the License.
16.\"
17.\" @(#)sadc.8
18.Dd Jul 25, 2003 \" DATE
19.Dt sar 1 \" Program name and manual section number
20.Os "Mac OS X"
21.Sh NAME \" Section Header - required - don't modify
22.Nm sar
23.\" The following lines are read in generating the apropos(man -k) database. Use only key
24.\" words here as the database is built based on the words here and in the .ND line.
25.\" Use .Nm macro to designate other names for the documented program.
26.Nd system activity reporter
27.Sh SYNOPSIS \" Section Header - required - don't modify
28.Nm
29.Op Fl dgpu \" [-dgpu]
30.Op Fl n Ar mode \" [-n mode]
31.Op Fl o Ar filename \" [-o filename]
32t \" t
33.Op Ar n \" [ n ]
34.Nm
35.Op Fl dgpu \" [-dgpu]
36.Op Fl n Ar mode \" [-n mode]
37.Op Fl e Ar time \" [-e time]
38.Op Fl f Ar filename \" [-f filename]
39.Op Fl i Ar seconds \" [-i seconds]
40.Op Fl s Ar time \" [-s time]
41.Sh DESCRIPTION \" Section Header - required - don't modify
42The
43.Nm
44command is used to sample and report various cumulative statistic counters
45maintained by the operating system. It can be invoked in two different ways.
46.Pp
47In the first usage instance,
48.Ar n
49samples are reported at
50.Ar t
51second intervals.
52If
53.Ar n
54is not specified, only one sample will be captured.
55When the -o option is specified,
56.Nm
57will write the binary sampling data to the output file specified by
58.Ar filename .
59.Pp
60In the second usage instance, there is no on-going sample interval to specify.
61This is because the sampling input comes from a previously recorded, binary activity file.
62The binary activity file can be specified using the -f
63.Ar filename
64option.
65When the -f option isn't used,
66.Nm
67attempts to open a default binary activity file,
68/var/log/sa/sadd, where
69.Ar dd
70represents the current day of the month.
71The starting and ending time of the report can be restricted using the -e
72and -s options. Here, the
73.Ar time
74field is specified in the form hh[:mm[:ss]].
75Finally, the -i option can be used to select the sampling interval.
76Only records at least
77.Ar seconds
78apart will be reported.
79When the -i option is not used, all of the previously recorded
80interval samples are reported.
81.Pp
82Due to the nature of on-going sample collection, the data is reported in a
83verbose mode when more than one sampling option is specified.
84Column headers are printed at the beginning of the report and averages are
85printed when the
86.Nm
87command terminates.
88.Sh OPTIONS
89The following options restrict the sample set that
90.Nm
91reports.
92.Pp \" Inserts a space
93.Bl -tag -width -indent \" Differs from above in tag removed
94.It Fl d
95Report disk activity.
96.Pp
97.Bl -tag -width -indent \" Begins a tagged list
98.It device
99The BSD name of the device.
100.It r+w/s
101The number of reads and writes per second.
102.It blks/s
103Number of blocks (in device's default blocksize) transferred to a device per second.
104.El
105.It Fl g
106Report page-out activity.
107.Pp
108.Bl -tag -width -indent \" Begins a tagged list
109.It pgout/s
110The number of pages paged out per second.
111.El
112.It Fl p
113Report page-in and page fault activity
114.Pp
115.Bl -tag -width -indent \" Begins a tagged list
116.It pgin/s
117The number of pages paged in per second.
118.It pflts/s
119The number of faults that caused a page to be copied in per second.
120.It vflts/s
121The number of times vm_fault routine has been called.
122.El
123.It Fl n Ar mode
124Report network activity with modes
125.Ar DEV ,
126.Ar EDEV ,
127or
128.Ar PPP .
129Multiple network modes can be specified.
130.Pp
131.Bl -tag -width -indent \" Begins a tagged list
132.It DEV
133The
134.Ar DEV
135mode reports network device statistics. The following
136information is displayed for each interface.
137.Pp
138.Bl -tag -width "Obytes/s" \" Begins a tagged list
139.It IFACE
140The network interface name.
141.It Ipkts/s
142The number of packets received per second.
143.It Ibytes/s
144The number of bytes received per second.
145.It Opkts/s
146The number of packets sent per second.
147.It Obytes/s
148The number of bytes sent per second.
149.El
150.It EDEV
151The
152.Ar EDEV
153mode reports network device error statistics. The
154following information is displayed for each interface.
155.Pp
156.Bl -tag -width "Drops/s" \" Begins a tagged list
157.It IFACE
158The interface name.
159.It Ierrs/s
160The input errors per second.
161.It Oerrs/s
162The output errors per second.
163.It Coll/s
164The collisions that occurred per second.
165.It Drops/s
166The number of dropped packets per second.
167.El
168.It PPP
169The
170.Ar PPP
171mode must be specified in order to display ppp connections
172in the network statistics. This will also turn on the PPP modify
173mode in
174.Ar sadc
175(8) when sampling data is not being read from a file.
176By default, both the collection and reporting of ppp
177statistics is turned off. See
178.Ar sadc
179(8).
180.El
181.Pp
182.It Fl u
183Report CPU activity (default)
184.Pp
185%usr, %sys, and %idle
186.Pp
187These report the percentage of time running in user mode,
188system mode and idle.
189.El
190.Sh FILES \" File used or created by the topic of the man page
191.Bl -tag -width "/var/log/sa/sadd" -compact
192.It Pa /var/log/sa/sadd
193Default daily activity file that holds the binary sampling data.
194.Ar dd
195are digits that represent the day of the month.
196.El
197.Sh SEE ALSO
198.\" List links in ascending order by section, alphabetically within a section.
199.Xr sa1 8 ,
200.Xr sa2 8 ,
201.Xr sadc 8 ,
202.Xr iostat 8 ,
203.Xr vm_stat 1 ,
204.Xr netstat 1 ,
205.Xr top 1 ,
206.Xr sc_usage 1 ,
207.Xr fs_usage 1
208.\" .Sh BUGS \" Document known, unremedied bugs