Chapter 23.  sysinfo Provider

Table of Contents

Probes
Arguments
Example
Stability

Probes

The sysinfo provider makes available probes that correspond to the fields in the sys named kernel statistic: a probe provided by sysinfo fires immediately before the corresponding sys value is incremented. The following example shows how to display both the names and the current values of the sys named kernel statistic using the kstat ( 1M ) command.

$ kstat -n sys
module: cpu                             instance: 0
name:   sys                             class:    misc
	bawrite                         123
	bread                           2899
	bwrite                          17995
	cpu_ticks_idle                  73743866
	cpu_ticks_kernel                2096277
	cpu_ticks_user                  1010122
	cpu_ticks_wait                  46413
...

The sysinfo probes are described in Table 23–1.

Table 23.1.  sysinfo Probes

bawrite

Probe that fires whenever a buffer is about to be asynchronously written out to a device.

bread

Probe that fires whenever a buffer is physically read from a device. bread fires after the buffer has been requested from the device, but before blocking pending its completion.

bwrite

Probe that fires whenever a buffer is about to be written out to a device, whether synchronously or asynchronously.

cpu_ticks_idle

Probe that fires when the periodic system clock has made the determination that a CPU is idle. Note that this probe fires in the context of the system clock and therefore fires on the CPU running the system clock. The cpu_t argument (arg2) indicates the CPU that has been deemed idle. See Arguments for details.

cpu_ticks_kernel

Probe that fires when the periodic system clock has made the determination that a CPU is executing in the kernel. This probe fires in the context of the system clock and therefore fires on the CPU running the system clock. The cpu_t argument (arg2) indicates the CPU that has been deemed to be executing in the kernel. See Arguments for details.

cpu_ticks_user

Probe that fires when the periodic system clock has made the determination that a CPU is executing in user mode. This probe fires in the context of the system clock and therefore fires on the CPU running the system clock. The cpu_t argument (arg2) indicates the CPU that has been deemed to be running in user-mode. See Arguments for details.

cpu_ticks_wait

Probe that fires when the periodic system clock has made the determination that a CPU is otherwise idle, but some threads are waiting for I/O on the CPU. This probe fires in the context of the system clock and therefore fires on the CPU running the system clock. The cpu_t argument (arg2) indicates the CPU that has been deemed waiting on I/O. See Arguments for details.

idlethread

Probe that fires whenever a CPU enters the idle loop.

intrblk

Probe that fires whenever an interrupt thread blocks.

inv_swtch

Probe that fires whenever a running thread is forced to involuntarily give up the CPU.

lread

Probe that fires whenever a buffer is logically read from a device.

lwrite

Probe that fires whenever a buffer is logically written to a device

modload

Probe that fires whenever a kernel module is loaded.

modunload

Probe that fires whenever a kernel module is unloaded.

msg

Probe that fires whenever a msgsnd ( 2 ) or msgrcv ( 2 ) system call is made, but before the message queue operations have been performed.

mutex_adenters

Probe that fires whenever an attempt is made to acquire an owned adaptive lock. If this probe fires, one of the lockstat provider's adaptive-block or adaptive-spin probes will also fire. See Chapter 18, lockstat Provider for details.

namei

Probe that fires whenever a name lookup is attempted in the filesystem.

nthreads

Probe that fires whenever a thread is created.

phread

Probe that fires whenever a raw I/O read is about to be performed.

phwrite

Probe that fires whenever a raw I/O write is about to be performed.

procovf

Probe that fires whenever a new process cannot be created because the system is out of process table entries.

pswitch

Probe that fires whenever a CPU switches from executing one thread to executing another.

readch

Probe that fires after each successful read, but before control is returned to the thread performing the read. A read may occur through the read ( 2 ) , readv ( 2 ) or pread ( 2 ) system calls. arg0 contains the number of bytes that were successfully read.

rw_rdfails

Probe that fires whenever an attempt is made to read-lock a readers/writer when the lock is either held by a writer, or desired by a writer. If this probe fires, the lockstat provider's rw-block probe will also fire. See Chapter 18, lockstat Provider for details.

rw_wrfails

Probe that fires whenever an attempt is made to write-lock a readers/writer lock when the lock is held either by some number of readers or by another writer. If this probe fires, the lockstat provider's rw-block probe will also fire. See Chapter 18, lockstat Provider for details.

sema

Probe that fires whenever a semop ( 2 ) system call is made, but before any semaphore operations have been performed.

sysexec

Probe that fires whenever an exec ( 2 ) system call is made.

sysfork

Probe that fires whenever a fork ( 2 ) system call is made.

sysread

Probe that fires whenever a read ( 2 ) , readv ( 2 ) , or pread ( 2 ) system call is made.

sysvfork

Probe that fires whenever a vfork ( 2 ) system call is made.

syswrite

Probe that fires whenever a write ( 2 ) , writev ( 2 ) , or pwrite ( 2 ) system call is made.

trap

Probe that fires whenever a processor trap occurs. Note that some processors, in particular UltraSPARC variants, handle some light-weight traps through a mechanism that does not cause this probe to fire.

ufsdirblk

Probe that fires whenever a directory block is read from the UFS file system. See ufs ( 7FS ) for details on UFS.

ufsiget

Probe that fires whenever an inode is retrieved. See ufs ( 7FS ) for details on UFS.

ufsinopage

Probe that fires after an in-core inode without any associated data pages has been made available for reuse. See ufs ( 7FS ) for details on UFS.

ufsipage

Probe that fires after an in-core inode with associated data pages has been made available for reuse. This probe fires after the associated data pages have been flushed to disk. See ufs ( 7FS ) for details on UFS.

wait_ticks_io

Probe that fires when the periodic system clock has made the determination that a CPU is otherwise idle but some threads are waiting for I/O on the CPU. This probe fires in the context of the system clock and therefore fires on the CPU running the system clock. The cpu_t argument (arg2) indicates the CPU that is described as waiting for I/O. See Arguments for details on arg2. No semantic difference between wait_ticks_io and cpu_ticks_wait; wait_ticks_io exists solely for historical reasons.

writech

Probe that fires after each successful write, but before control is returned to the thread performing the write. A write may occur through the write ( 2 ) , writev ( 2 ) or pwrite ( 2 ) system calls. arg0 contains the number of bytes that were successfully written.

xcalls

Probe that fires whenever a cross-call is about to be made. A cross-call is the operating system's mechanism for one CPU to request immediate work of another CPU.