| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- system activity report package
/usr/lib/sa/sadc [tn] [ofile]
/usr/lib/sa/sa1 [tn]
/usr/lib/sa/sa2 [-aAbcdgkmpqruvwy] [-etime] [-ffilename] [-isec] [-stime]
System activity data can be accessed at the special request of auser (seesar(1)) and automatically, on a routine basis, as described here.The operating system contains several counters that are incremented as various system actionsoccur. These include counters for CPU utilization, buffer usage, disk and tapeI/O activity, TTY device activity, switching and system-call activity, file-access, queue activity, inter-processcommunications, and paging. For more general system statistics, useiostat(1M),sar(1), orvmstat(1M).
sadc and two shell procedures,sa1 andsa2, are used to sample,save, and process this data.
sadc, the data collector, samples system datan times, with an intervaloft seconds between samples, and writes in binary format toofileor to standard output. The sampling intervalt should be greater than5 seconds; otherwise, the activity ofsadc itself may affect the sample.Ift andn are omitted, a special record is written. Thisfacility can be used at system boot time, when booting to a multi-userstate, to mark the time at which the counters restart from zero.For example, when accounting is enabled, thesvc:/system/sar:default service writes the restartmark to the daily data file using the command entry:
su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa`date +%d`"
The shell scriptsa1, a variant ofsadc, is used to collectand store data in the binary file/var/adm/sa/sadd, wheredd is thecurrent day. The argumentst andn cause records to be writtenn times at an interval oft seconds, or once if omitted.The following entries in/var/spool/cron/crontabs/sys will produce records every 20 minutes duringworking hours and hourly otherwise:
0 * * * 0-6 /usr/lib/sa/sa120,40 8-17 * * 1-5 /usr/lib/sa/sa1
Seecrontab(1) for details.
The shell scriptsa2, a variant ofsar, writes a daily reportin the file/var/adm/sa/sardd. See theOPTIONS section insar(1) for anexplanation of the various options. The following entry in/var/spool/cron/crontabs/sys will reportimportant activities hourly during the working day:
5 18 * * 1-5 /usr/lib/sa/sa2-s 8:00-e 18:01-i 1200-A
address file
daily data file
daily report file
used for performance collection
Seeattributes(5) for descriptions of the following attributes:
|
crontab(1),sar(1),svcs(1),timex(1),iostat(1M),svcadm(1M),vmstat(1M),attributes(5),smf(5)
Oracle Solaris Administration: Common Tasks
Thesar service is managed by the service management facility,smf(5), underthe service identifier:
svc:/system/sar
Administrative actions on this service, such as enabling, disabling, or requesting restart,can be performed usingsvcadm(1M). The service's status can be queried using thesvcs(1) command.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |