Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
7.  Kernel Debugging Modules Generic Kernel Debugging Support (genunix) Networking dcmds  Previous   Contents   Next 
   
 

Walkers

ar

Given the address of an ar, this walker walks all ar objects from the given ar to the final ar. If no address is specified, all ar objects are walked.

icmp

Given the address of an icmp, this walker walks all icmp objects from the given icmp to the final icmp. If no address is specified, all icmp objects are walked.

ill

Given the address of an interface link layer structure (ill), this walker walks all ill objects from the given ill to the final. If no address is specified, all ill objects are walked.

ipc

Given the address of an ipc, this walker walks all ipc objects from the given ipc to the final ipc. If no address is specified, all ipc objects are walked.

mi

Given the address of a MI_O, walk all the MI_O's in this MI.

sonode

Given the address of a AF_UNIX sonode, walk the associated list of AF_UNIX sonodes beginning with the given sonode. If no address is specified, this walker walks the list of all AF_UNIX sockets.

tcpb

Given the address of a tcpb, this walker walks all TCP connections from the given tcpb to the final TCP connection. If no address is specified, all tcpb objects are walked.

udp

Given the address of a udp, this walker walks all udp objects from the given udp to the final udp. If no address is specified, all udp objects are walked.

Files, Processes, and Threads

This section describes dcmds and walkers used to format and examine various fundamental file, process, and thread structures in the Solaris kernel.

dcmds

process ::fd fd-num

Print the file_t address corresponding to the file descriptor fd-num associated with the specified process. The process is specified using the virtual address of its proc_t structure.

thread ::findstack [ command ]

Print the stack trace associated with the given kernel thread, identified by the virtual address of its kthread_t structure. The dcmd employs several different algorithms to locate the appropriate stack backtrace. If an optional command string is specified, the dot variable is reset to the frame pointer address of the topmost stack frame, and the specified command is evaluated as if it had been typed at the command line. The default command string is "<.$C0"; that is, print a stack trace including frame pointers but no arguments.

pid ::pid2proc

Print the proc_t address corresponding to the specified PID. Recall that MDB's default base is hexadecimal, so decimal PIDs obtained using pgrep(1) or ps(1) should be prefixed with 0t.

process ::pmap [-q]

Print the memory map of the process indicated by the given process address. The dcmd displays output using a format similar to pmap(1). If the -q option is present, the dcmd displays an abbreviated form of its output that requires less processing time.

[ address ] ::ps [-fltTP]

Print a summary of the information related to the specified process, or all active system processes, similar to ps(1). If the -f option is specified, the full command name and initial arguments are printed. If the -l option is specified, the LWPs associated with each process are printed. If the -t option is specified, the kernel threads associated with each process LWP are printed. If the -T option is specified, the task ID associated with each process is displayed. If the -P option is specified, the project ID associated with each process is displayed.

::ptree

Print a process tree, with child processes indented from their respective parent processes. The dcmd displays output using a format similar to ptree(1).

address ::task

Print a list of the active kernel task structures and their associated ID numbers and attributes. The process task ID is described in more detail in settaskid(2).

[ address ] ::thread [-bdfimps]

Display properties of the specified kernel kthread_t structure. If no kthread_t address is specified, the properties of all kernel threads are displayed. The dcmd options are used to control which output columns are shown. If no options are present, the -i option is enabled by default. If the -b option is present, information relating to the thread's turnstile and blocking synchronization object is shown. If the -d option is present, the thread's dispatcher priority, binding, and last dispatch time is shown. If the -f option is present, threads whose state is TS_FREE are elided from the output. If the -i option is present (the default), thread state, flags, priority, and interrupt information is shown. If the -m option is present, all of the other output options are merged together on to a single output line. If the -p option is present, the thread's process, LWP, and credential pointers are displayed. If the -s option is present, the thread's signal queue and masks of pending and held signals are shown.

vnode ::whereopen

Given a vnode_t address, print the proc_t addresses of all processes that have this vnode currently open in their file table.

Walkers

file

Given the address of a proc_t structure as a starting point, iterate over the set of open files (file_t structures) associated with the specified process. The file_t structure is defined in <sys/file.h>.

proc

Iterate over the active process (proc_t) structures. This structure is defined in <sys/proc.h>.

task

Given a task pointer, iterate over the list of proc_t structures for processes that are members of the given task

thread

Iterate over a set of kernel thread (kthread_t) structures. If the global walk is invoked, all kernel threads are returned by the walker. If a local walk is invoked using a proc_t address as the starting point, the set of threads associated with the specified process is returned. The kthread_t structure is defined in <sys/thread.h>.

Synchronization Primitives

This section describes dcmds and walkers used to examine particular kernel synchronization primitives. The semantics of each primitive are discussed in the corresponding (9f) section of the manual pages.

dcmds

rwlock ::rwlock

Given the address of a readers-writers lock (see rwlock(9F)), display the current state of the lock and the list of waiting threads.

address ::sobj2ts

Convert the address of a synchronization object to the address of the corresponding turnstile and print the turnstile address.

[ address ] ::turnstile

Display the properties of the specified turnstile_t. If no turnstile_t address is specified, the dcmd displays the properties of all turnstiles.

[ address ] ::wchaninfo [-v]

Given the address of a condition variable (see condvar(9F)) or semaphore (see semaphore(9F)), display the current number of waiters on this object. If no explicit address is specified, display all such objects that have waiting threads. If the -v option is specified, display the list of threads that are blocked on each object.

Walkers

blocked

Given the address of a synchronization object (such as a mutex(9F) or rwlock(9F)), iterate over the list of blocked kernel threads.

wchan

Given the address of a condition variable (see condvar(9F)) or semaphore (see semaphore(9F)), iterate over the list of blocked kernel threads.

Cyclics

The cyclic subsystem is a low-level kernel subsystem that provides high resolution, per-CPU interval timer facilities to other kernel services and programming interfaces.

dcmds

::cycinfo [-vV]

Display the cyclic subsystem per-CPU state for each CPU. If the -v option is present, a more verbose display is shown. If the -V option is present, an even more verbose display than -v is shown.

address ::cyclic

Format and display the cyclic_t at the specified address.

::cyccover

Display cyclic subsystem code coverage information. This information is available only in a DEBUG kernel.

::cyctrace

Display cyclic subsystem trace information. This information is available only in a DEBUG kernel.

Walkers

cyccpu

Iterate over the per-CPU cyc_cpu_t structures. This structure is defined in <sys/cyclic_impl.h>.

cyctrace

Iterate over the cyclic trace buffer structures. This information is only available in a DEBUG kernel.

Task Queues

The task queue subsystem provides general-purpose asynchronous task scheduling for a variety of clients in the kernel.

dcmds

address ::taskq_entry

Print the contents of the specified struct taskq_entry.

Walkers

taskq_entry

Given the addresss of a taskq structure, iterate over the list of taskq_entry structures.

Error Queues

The error queue subsystem provides general-purpose asynchronous error event processing for platform-specific error handling code.

dcmds

[ address ] ::errorq

Display a summary of information relating to the specified error queue. If no address is given, display information relating to all system error queues. The address, name, queue length, and data element size for each queue are displayed, along with various queue statistics.

Walkers

errorq

Walk the list of system error queues and return the address of each individual error queue.

errorq_data

Given the address of an error queue, return the address of each pending error event data buffer.

 
 
 
  Previous   Contents   Next