1 .\"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
4 .\"This file contains Original Code and/or Modifications of Original Code
5 .\"as defined in and that are subject to the Apple Public Source License
6 .\"Version 2.0 (the 'License'). You may not use this file except in
7 .\"compliance with the License. Please obtain a copy of the License at
8 .\"http://www.opensource.apple.com/apsl/ and read it before using this
11 .\"The Original Code and all software distributed under the License are
12 .\"distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
13 .\"EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
14 .\"INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
15 .\"FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
16 .\"Please see the License for the specific language governing rights and
17 .\"limitations under the License.
21 .Dd Jul 25, 2003 \" DATE
22 .Dt sar 1 \" Program name and manual section number
24 .Sh NAME \" Section Header - required - don't modify
26 .\" The following lines are read in generating the apropos(man -k) database. Use only key
27 .\" words here as the database is built based on the words here and in the .ND line.
28 .\" Use .Nm macro to designate other names for the documented program.
29 .Nd system activity reporter
30 .Sh SYNOPSIS \" Section Header - required - don't modify
32 .Op Fl dgpu \" [-dgpu]
33 .Op Fl n Ar mode \" [-n mode]
34 .Op Fl o Ar filename \" [-o filename]
38 .Op Fl dgpu \" [-dgpu]
39 .Op Fl n Ar mode \" [-n mode]
40 .Op Fl e Ar time \" [-e time]
41 .Op Fl f Ar filename \" [-f filename]
42 .Op Fl i Ar seconds \" [-i seconds]
43 .Op Fl s Ar time \" [-s time]
44 .Sh DESCRIPTION \" Section Header - required - don't modify
47 command is used to sample and report various cumulative statistic counters
48 maintained by the operating system. It can be invoked in two different ways.
50 In the first usage instance,
52 samples are reported at
57 is not specified, only one sample will be captured.
58 When the -o option is specified,
60 will write the binary sampling data to the output file specified by
63 In the second usage instance, there is no on-going sample interval to specify.
64 This is because the sampling input comes from a previously recorded, binary activity file.
65 The binary activity file can be specified using the -f
68 When the -f option isn't used,
70 attempts to open a default binary activity file,
71 /var/log/sa/sadd, where
73 represents the current day of the month.
74 The starting and ending time of the report can be restricted using the -e
75 and -s options. Here, the
77 field is specified in the form hh[:mm[:ss]].
78 Finally, the -i option can be used to select the sampling interval.
81 apart will be reported.
82 When the -i option is not used, all of the previously recorded
83 interval samples are reported.
85 Due to the nature of on-going sample collection, the data is reported in a
86 verbose mode when more than one sampling option is specified.
87 Column headers are printed at the beginning of the report and averages are
92 The following options restrict the sample set that
95 .Pp \" Inserts a space
96 .Bl -tag -width -indent \" Differs from above in tag removed
100 .Bl -tag -width -indent \" Begins a tagged list
102 The BSD name of the device.
104 The number of reads and writes per second.
106 Number of blocks (in device's default blocksize) transferred to a device per second.
109 Report page-out activity.
111 .Bl -tag -width -indent \" Begins a tagged list
113 The number of pages paged out per second.
116 Report page-in and page fault activity
118 .Bl -tag -width -indent \" Begins a tagged list
120 The number of pages paged in per second.
122 The number of faults that caused a page to be copied in per second.
124 The number of times vm_fault routine has been called.
127 Report network activity with modes
132 Multiple network modes can be specified.
134 .Bl -tag -width -indent \" Begins a tagged list
138 mode reports network device statistics. The following
139 information is displayed for each interface.
141 .Bl -tag -width "Obytes/s" \" Begins a tagged list
143 The network interface name.
145 The number of packets received per second.
147 The number of bytes received per second.
149 The number of packets sent per second.
151 The number of bytes sent per second.
156 mode reports network device error statistics. The
157 following information is displayed for each interface.
159 .Bl -tag -width "Drops/s" \" Begins a tagged list
163 The input errors per second.
165 The output errors per second.
167 The collisions that occurred per second.
169 The number of dropped packets per second.
174 mode must be specified in order to display ppp connections
175 in the network statistics. This will also turn on the PPP modify
178 (8) when sampling data is not being read from a file.
179 By default, both the collection and reporting of ppp
180 statistics is turned off. See
186 Report CPU activity (default)
188 %usr, %sys, and %idle
190 These report the percentage of time running in user mode,
191 system mode and idle.
193 .Sh FILES \" File used or created by the topic of the man page
194 .Bl -tag -width "/var/log/sa/sadd" -compact
195 .It Pa /var/log/sa/sadd
196 Default daily activity file that holds the binary sampling data.
198 are digits that represent the day of the month.
201 .\" List links in ascending order by section, alphabetically within a section.
211 .\" .Sh BUGS \" Document known, unremedied bugs