Skip Navigation Links | |
Exit Print View | |
Managing System Information, Processes, and Performance in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. Managing System Information (Tasks)
2. Managing System Processes (Tasks)
3. Monitoring System Performance (Tasks)
Where to Find System Performance Tasks
System Performance and System Resources
Processes and System Performance
About Monitoring System Performance
Displaying System Performance Information
Displaying System Performance Information (Task Map)
Displaying Virtual Memory Statistics (vmstat)
How to Display Virtual Memory Statistics (vmstat)
How to Display System Event Information (vmstat -s)
How to Display Swapping Statistics (vmstat -S)
How to Display Interrupts Per Device (vmstat -i)
Displaying Disk Utilization Information (iostat)
How to Display Disk Utilization Information (iostat)
How to Display Extended Disk Statistics (iostat -xtc)
Monitoring System Activities (Task Map)
Monitoring System Activities (sar)
How to Check File Access (sar -a)
How to Check Buffer Activity (sar -b)
How to Check System Call Statistics (sar -c)
How to Check Disk Activity (sar -d)
How to Check Page-Out and Memory (sar -g)
Checking Kernel Memory Allocation
How to Check Kernel Memory Allocation (sar -k)
How to Check Interprocess Communication (sar -m)
How to Check Page-In Activity (sar -p)
How to Check Queue Activity (sar -q)
How to Check Unused Memory (sar -r)
How to Check CPU Utilization (sar -u)
How to Check System Table Status (sar -v)
How to Check Swapping Activity (sar -w)
How to Check Terminal Activity (sar -y)
How to Check Overall System Performance (sar -A)
Collecting System Activity Data Automatically (sar)
Running the sadc Command When Booting
Running the sadc Command Periodically With the sa1 Script
Producing Reports With the sa2 Shell Script
Setting Up Automatic Data Collection (sar)
How to Set Up Automatic Data Collection
4. Scheduling System Tasks (Tasks)
5. Managing the System Console, Terminal Devices, and Power Services (Tasks)
This section describes the tasks for monitoring displaying system performance information.
|
You can use the vmstat command to report virtual memory statistics and information about system events such as CPU load, paging, number of context switches, device interrupts, and system calls. The vmstat command can also display statistics on swapping, cache flushing, and interrupts.
Table 3-4 Output From the vmstat Command
|
For a more detailed description of this command, see the vmstat(1M) man page.
$ vmstat n
where n is the interval in seconds between reports.
Example 3-1 Displaying Virtual Memory Statistics
The following example shows the vmstat display of statistics that were gathered at five-second intervals:
$ vmstat 5 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr dd f0 s1 -- in sy cs us sy id 0 0 0 863160 365680 0 3 1 0 0 0 0 0 0 0 0 406 378 209 1 0 99 0 0 0 765640 208568 0 36 0 0 0 0 0 0 0 0 0 479 4445 1378 3 3 94 0 0 0 765640 208568 0 0 0 0 0 0 0 0 0 0 0 423 214 235 0 0 100 0 0 0 765712 208640 0 0 0 0 0 0 0 3 0 0 0 412 158 181 0 0 100 0 0 0 765832 208760 0 0 0 0 0 0 0 0 0 0 0 402 157 179 0 0 100 0 0 0 765832 208760 0 0 0 0 0 0 0 0 0 0 0 403 153 182 0 0 100 0 0 0 765832 208760 0 0 0 0 0 0 0 0 0 0 0 402 168 177 0 0 100 0 0 0 765832 208760 0 0 0 0 0 0 0 0 0 0 0 402 153 178 0 0 100 0 0 0 765832 208760 0 18 0 0 0 0 0 0 0 0 0 407 165 186 0 0 100
$ vmstat -s 0 swap ins 0 swap outs 0 pages swapped in 0 pages swapped out 522586 total address trans. faults taken 17006 page ins 25 page outs 23361 pages paged in 28 pages paged out 45594 total reclaims 45592 reclaims from free list 0 micro (hat) faults 522586 minor (as) faults 16189 major faults 98241 copy-on-write faults 137280 zero fill page faults 45052 pages examined by the clock daemon 0 revolutions of the clock hand 26 pages freed by the clock daemon 2857 forks 78 vforks 1647 execs 34673885 cpu context switches 65943468 device interrupts 711250 traps 63957605 system calls 3523925 total name lookups (cache hits 99%) 92590 user cpu 65952 system cpu 16085832 idle cpu 7450 wait cpu
$ vmstat -S kthr memory page disk faults cpu r b w swap free si so pi po fr de sr dd f0 s1 -- in sy cs us sy id 0 0 0 862608 364792 0 0 1 0 0 0 0 0 0 0 0 406 394 213 1 0 99
The swapping statistics fields are described in the following list. For a description of the other fields, see Table 3-4.
Average number of LWPs that are swapped in per second
Number of whole processes that are swapped out
Note - The vmstat command truncates the output of si and so fields. Use the sar command to display a more accurate accounting of swap statistics.
Example 3-2 Displaying Interrupts Per Device
The following example shows output from the vmstat -i command.
$ vmstat -i interrupt total rate -------------------------------- clock 52163269 100 esp0 2600077 4 zsc0 25341 0 zsc1 48917 0 cgsixc0 459 0 lec0 400882 0 fdc0 14 0 bppc0 0 0 audiocs0 0 0 -------------------------------- Total 55238959 105
Use the iostat command to report statistics about disk input and output, and to produce measures of throughput, utilization, queue lengths, transaction rates, and service time. For a detailed description of this command, refer to the iostat(1M) man page.
$ iostat 5 tty fd0 sd3 nfs1 nfs31 cpu tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id 0 1 0 0 410 3 0 29 0 0 9 3 0 47 4 2 0 94
The first line of output shows the statistics since the last time the system was booted. Each subsequent line shows the interval statistics. The default is to show statistics for the terminal (tty), disks (fd and sd), and CPU (cpu).
Example 3-3 Displaying Disk Utilization Information
The following example shows disk statistics that were gathered every five seconds.
$ iostat 5 tty sd0 sd6 nfs1 nfs49 cpu tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id 0 0 1 0 49 0 0 0 0 0 0 0 0 15 0 0 0 100 0 47 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 44 6 132 0 0 0 0 0 0 0 0 0 0 0 1 99 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 3 1 23 0 0 0 0 0 0 0 0 0 0 0 1 99 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100
The following table describes the fields in the output of the iostat n command.
|
$ iostat -xtc extended device statistics tty cpu device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 0 0 0 100 sd0 0.0 0.0 0.4 0.4 0.0 0.0 49.5 0 0 sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs49 0.0 0.0 0.0 0.0 0.0 0.0 15.1 0 0 nfs53 0.0 0.0 0.4 0.0 0.0 0.0 24.5 0 0 nfs54 0.0 0.0 0.0 0.0 0.0 0.0 6.3 0 0 nfs55 0.0 0.0 0.0 0.0 0.0 0.0 4.9 0 0
The iostat -xtc command displays a line of output for each disk. The output fields are described in the following list.
Reads per second
Writes per second
Kbytes read per second
Kbytes written per second
Average number of transactions that are waiting for service (queue length)
Average number of transactions that are actively being serviced
Average service time, in milliseconds
Percentage of time that the queue is not empty
Percentage of time that the disk is busy
Use the df command to show the amount of free disk space on each mounted disk. The usable disk space that is reported by df reflects only 90 percent of full capacity, as the reporting statistics allows for 10 percent above the total available space. This head room normally stays empty for better performance.
The percentage of disk space actually reported by the df command is used space divided by usable space.
If the file system exceeds 90 percent capacity, you could transfer files to a disk that is not as full by using the cp command. Alternately, you could transfer files to a tape by using the tar or cpio commands. Or, you could remove the files.
For a detailed description of this command, see the df(1M) man page.
$ df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t3d0s0 192807 40231 133296 24% /
Example 3-4 Displaying File System Information
The following example shows the output from the df -k command.
$ df -k Filesystem 1024-blocks Used Available Capacity Mounted on rpool/ROOT/solaris-161 191987712 6004395 140577816 5% / /devices 0 0 0 0% /devices /dev 0 0 0 0% /dev ctfs 0 0 0 0% /system/contract proc 0 0 0 0% /proc mnttab 0 0 0 0% /etc/mnttab swap 4184236 496 4183740 1% /system/volatile objfs 0 0 0 0% /system/object sharefs 0 0 0 0% /etc/dfs/sharetab /usr/lib/libc/libc_hwcap1.so.1 146582211 6004395 140577816 5% /lib/libc.so.1 fd 0 0 0 0% /dev/fd swap 4183784 60 4183724 1% /tmp rpool/export 191987712 35 140577816 1% /export rpool/export/home 191987712 32 140577816 1% /export/home rpool/export/home/123 191987712 13108813 140577816 9% /export/home/123 rpool/export/repo 191987712 11187204 140577816 8% /export/repo rpool/export/repo2010_11 191987712 31 140577816 1% /export/repo2010_11 rpool 191987712 5238974 140577816 4% /rpool /export/home/123 153686630 13108813 140577816 9% /home/123
The following table describes the output of the df -k command.
|
Example 3-5 Displaying File System Information by Using the df Command Without Any Options
When the df command is used without operands or options, it reports on all mounted file systems, as shown in the following example:
$ df / (rpool/ROOT/solaris):100715496 blocks 100715496 files /devices (/devices ): 0 blocks 0 files /dev (/dev ): 0 blocks 0 files /system/contract (ctfs ): 0 blocks 2147483601 files /proc (proc ): 0 blocks 29946 files /etc/mnttab (mnttab ): 0 blocks 0 files /system/volatile (swap ):42257568 blocks 2276112 files /system/object (objfs ): 0 blocks 2147483441 files /etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files /dev/fd (fd ): 0 blocks 0 files /tmp (swap ):42257568 blocks 2276112 files /export (rpool/export ):100715496 blocks 100715496 files /export/home (rpool/export/home ):100715496 blocks 100715496 files /export/home/admin (rpool/export/home/admin):100715496 blocks 100715496 files /rpool (rpool ):100715496 blocks 100715496 files /export/repo2010_11(rpool/export/repo2010_11):281155639 blocks 281155639 files /rpool (rpool ):281155639 blocks 281155639 files