Go to main content

Managing System Information, Processes, and Performance in Oracle® Solaris 11.3

Exit Print View

Updated: January 2019
 
 

Displaying System Performance Information

This section describes the tasks for monitoring and displaying system performance information.

Displaying Virtual Memory Statistics

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 5  Output From the vmstat Command
Category
Field Name
Description
kthr
Reports the number of kernel threads in the following states
r
The number of kernel threads in the dispatch queue
b
The number of blocked kernel threads that are waiting for resources
w
The number of swapped-out LWPs that are waiting for processing resources to finish
memory
Reports on usage of real memory and virtual memory
swap
Available swap space
free
Size of the free list
page
Reports on page faults and paging activity, in units per second
re
Pages reclaimed
mf
Minor faults and major faults
pi
Kilobytes paged in
po
Kilobytes paged out
fr
Kilobytes freed
de
Anticipated memory that is needed by recently swapped-in processes
sr
Pages scanned by the page daemon not currently in use. If sr does not equal zero, the page daemon has been running.
disk
Reports the number of disk operations per second, showing data on up to four disks
faults
Reports the trap/interrupt rates per second
in
Interrupts per second
sy
System calls per second
cs
CPU context switch rate
cpu
Reports on the use of CPU time
us
User time
sy
System time
id
Idle time

To display virtual memory statistics, use the vmstat command with a time interval in seconds.

$ vmstat n

where n is the interval in seconds between reports.

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

For a more detailed description of this command, see the vmstat(1M) man page.

Displaying System Event Information

You can use the vmstat -s command to show how many system events have taken place since the last time the system was booted.

$ 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

Displaying Swapping Statistics

You can use the vmstat -S command to show swapping statistics.

$ 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 Figure 5, Table 5, Output From the vmstat Command.

si

Average number of LWPs that are swapped per second

so

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.

Displaying Interrupts Per Device

You can use the vmstat -i command to show the number of 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

Displaying Disk Utilization Information

You can 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, see the iostat(1M) man page.

Displaying Disk Utilization Information Using the iostat Command

You can display disk utilization information by using the iostat command with a time interval in seconds.

$ 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).

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.

Device Type
Field Name
Description
Terminal
tin
Number of characters in the terminal input queue
tout
Number of characters in the terminal output queue
Disk
bps
Blocks per second
tps
Transactions per second
serv
Average service time, in milliseconds
CPU
us
In user mode
sy
In system mode
wt
Waiting for I/O
id
Idle

Displaying Extended Disk Statistics

You can use the iostat −xt command to display extended disk statistics.

$ iostat −xt
device     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  tin tout
blkdev0    0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0    0    1
sd0        0.1   19.3    1.4   92.4  0.0  0.0    0.2    1.6   0   1
sd1        0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0
nfs9       0.0    0.0    0.0    0.0  0.0  0.0    0.0    1.0   0   0
nfs10      0.0    0.0    0.0    0.0  0.0  0.0    0.0    7.6   0   0
nfs11      0.0    0.0    0.0    0.0  0.0  0.0    0.0   15.6   0   0
nfs12      0.3    0.0    1.9    0.0  0.0  0.0    0.0   30.5   0   1 

The iostat −xt command displays a line of output for each disk. The output fields are as follows:

r/s

Reads per second

w/s

Writes per second

kr/s

Kilobytes read per second

kw/s

Kilobytes written per second

wait

Average number of transactions that are waiting for service (queue length)

actv

Average number of transactions that are actively being serviced

svc_t

Average service time, in milliseconds

%w

Percentage of time that the queue is not empty

%b

Percentage of time that the disk is busy

Displaying Disk Space Statistics

You can 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 because 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 can transfer files to a disk that is not as full by using the cp command. Alternately, you can transfer files to a tape by using the tar or cpio commands or you can remove the files.

You can use the df -k command to display disk space information in kilobytes.

$ df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t3d0s0     192807   40231  133296    24%    / 
Example 15  Displaying File System Information

The following example shows the output from the df -k command on a SPARC based system.

$ 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 output fields of the df -k command are as follows:

1024-blocks

Total size of usable space in the file system

Used

Amount of space used

Available

Amount of space available for use

Capacity

Amount of space used, as a percentage of the total capacity

Mounted on

Mount point

Example 16  Displaying File System Information by Using the df Command Without Any Options

The following example shows a list of all the mounted file systems, when the df command is used without any options or operands.

$ 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

For a detailed description of this command, see the df(1M) man page.

Displaying Data Analytics Accelerator Statistics

The daxstat command reports the utilization and performance statistics for Data Analytics Accelerator (DAX) on systems that have the SPARC M7, SPARC M8, SPARC T7, or SPARC T8 chip. To use the daxstat command, you should have the appropriate rights profile. This command reports DAX statistics per-DAX, per-CPU, and per-queue in a tabular form. The first table summarizes all activity since boot. Each subsequent table summarizes the activity for the preceding interval. The values are reported as rates (events per second), unless mentioned otherwise.

The daxstat command has the following syntax:

/usr/bin/daxstat [[-T u | d] [-c processor_id] | [-d dax_id [-q queue_id]]] \
        | [-[x]d dax_id]] [interval [count]]
/usr/bin/daxstat -a [[-T u | d] [-c] | [-d [-q ]]] [-[x]d]] [interval [count]]

The following attributes are supported by the daxstat command.

-a

The output is aggregated into a single value for all the CPUs, queues, and DAX units. Do not enter any processor_id, dax_id, or queue_id with this option.

-c

Displays CPU statistics for specified CPUs.

-d

Displays DAX statistics for specified DAX units.

-q

Displays queue statistics for specified queues in specified DAX units.

-x

Displays per-dax extended statistics for specified DAX units. This option is only valid when used with the –d option.

-T u|d

Prints a time stamp before each report, in either standard date format, d, or the internal representation of time, u. For more information, see the time(2) and date(1) man pages.

interval

Reports once each interval second.

count

Prints only count reports.

Example 17  Using the daxstat Command to Display per-DAX Statistics

The following example shows DAX statistics over a three-second interval in two reports.

$ daxstat -ad 3 2
DAX    commands fallbacks    input    output %busy
ALL      201757    194975    74.0M      0.0M     0
ALL       53388     52066     9.0G     31.0M     0

The output fields of the daxstat command for statistics per-DAX are as follows:

DAX

DAX ID

commands

Number of commands completed by DAX

fallbacks

Number of commands completed by the software but not completed by DAX

input

Total input processed by DAX in megabytes per second (M) or gigabytes per second (G)

output

Total output produced by DAX in megabytes per second (M) or gigabytes per second (G)

%busy

Percentage of DAX cycles spent processing a command

Example 18  Using the daxstat Command to Display per-CPU Statistics

The following example shows DAX statistics for CPUs 0 and 1 in one report.

$ daxstat -c 0-1
CPU      calls       time    success       fail
  0     129894  229452150     129894          0
  1     129073  227907405     129073         10

The output fields of the daxstat command for DAX statistics per-CPU are as follows:

CPU

CPU ID

calls

Number of dax_submit fast trap calls

time

Total kernel and hypervisor time in n seconds since boot, spent submitting DAX commands,

success

Number of ccb_submit hyper-calls that returned success

fail

Number of ccb_submit hyper-calls that returned fail

Example 19  Using the daxstat Command to Display per-queue Statistics

The following example shows DAX statistics for queues 0-3 in DAX unit 4.

$ daxstat -d 4 -q 0-3
DAX   QUEUE    commands
  4       0         105
          1         196
          2         496
          3         196

where QUEUE is the queue ID.

For more information about the daxstat command, see the daxstat(1M) man page.

For more information about DAX, see “Breaking New Ground with Software in Silicon site.

Displaying DAX Information

You can use the daxinfo command to display the static configuration of DAX hardware available on systems that have the SPARC M7, SPARC M8, SPARC T7, or SPARC T8 chip. Information available includes DAX version, DAX operation codes, and the number of DAX instances on the system.

Example 20  Displaying DAX Information

This example shows how to display information related to DAX by using the daxinfo command.

$ daxinfo
Version: DAX1
Opcodes: Extract Scan Select Translate
Enabled: 6
Disabled:0

where Version is the DAX version, Opcodes is the list of DAX operation codes that are supported, Enabled is the number of available DAX instances, and Disabled is the number of DAX instances with hardware error.

To display some of the selected fields, use –o and –p options with the daxinfo command as shown in the following example:

$ daxinfo -p -o version,enabled
DAX2:8

where –p displays the output in machine-readable format.

For more information, see the daxinfo (1M) man page.