1 .\" Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
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.
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.
18 .Dd Jul 25, 2003 \" DATE
19 .Dt sar 1 \" Program name and manual section number
21 .Sh NAME \" Section Header - required - don't modify
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
29 .Op Fl dgpu \" [-dgpu]
30 .Op Fl n Ar mode \" [-n mode]
31 .Op Fl o Ar filename \" [-o filename]
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
44 command is used to sample and report various cumulative statistic counters
45 maintained by the operating system. It can be invoked in two different ways.
47 In the first usage instance,
49 samples are reported at
54 is not specified, only one sample will be captured.
55 When the -o option is specified,
57 will write the binary sampling data to the output file specified by
60 In the second usage instance, there is no on-going sample interval to specify.
61 This is because the sampling input comes from a previously recorded, binary activity file.
62 The binary activity file can be specified using the -f
65 When the -f option isn't used,
67 attempts to open a default binary activity file,
68 /var/log/sa/sadd, where
70 represents the current day of the month.
71 The starting and ending time of the report can be restricted using the -e
72 and -s options. Here, the
74 field is specified in the form hh[:mm[:ss]].
75 Finally, the -i option can be used to select the sampling interval.
78 apart will be reported.
79 When the -i option is not used, all of the previously recorded
80 interval samples are reported.
82 Due to the nature of on-going sample collection, the data is reported in a
83 verbose mode when more than one sampling option is specified.
84 Column headers are printed at the beginning of the report and averages are
89 The following options restrict the sample set that
92 .Pp \" Inserts a space
93 .Bl -tag -width -indent \" Differs from above in tag removed
97 .Bl -tag -width -indent \" Begins a tagged list
99 The BSD name of the device.
101 The number of reads and writes per second.
103 Number of blocks (in device's default blocksize) transferred to a device per second.
106 Report page-out activity.
108 .Bl -tag -width -indent \" Begins a tagged list
110 The number of pages paged out per second.
113 Report page-in and page fault activity
115 .Bl -tag -width -indent \" Begins a tagged list
117 The number of pages paged in per second.
119 The number of faults that caused a page to be copied in per second.
121 The number of times vm_fault routine has been called.
124 Report network activity with modes
129 Multiple network modes can be specified.
131 .Bl -tag -width -indent \" Begins a tagged list
135 mode reports network device statistics. The following
136 information is displayed for each interface.
138 .Bl -tag -width "Obytes/s" \" Begins a tagged list
140 The network interface name.
142 The number of packets received per second.
144 The number of bytes received per second.
146 The number of packets sent per second.
148 The number of bytes sent per second.
153 mode reports network device error statistics. The
154 following information is displayed for each interface.
156 .Bl -tag -width "Drops/s" \" Begins a tagged list
160 The input errors per second.
162 The output errors per second.
164 The collisions that occurred per second.
166 The number of dropped packets per second.
171 mode must be specified in order to display ppp connections
172 in the network statistics. This will also turn on the PPP modify
175 (8) when sampling data is not being read from a file.
176 By default, both the collection and reporting of ppp
177 statistics is turned off. See
183 Report CPU activity (default)
185 %usr, %sys, and %idle
187 These report the percentage of time running in user mode,
188 system mode and idle.
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
193 Default daily activity file that holds the binary sampling data.
195 are digits that represent the day of the month.
198 .\" List links in ascending order by section, alphabetically within a section.
208 .\" .Sh BUGS \" Document known, unremedied bugs