This section describes dcmds and walkers used to format and examine various fundamental file, process, and thread structures in the Oracle Solaris kernel.
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.
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.
Display process information for processes whose name matches the regexp regular expression pattern. The ::pgrep dcmd is similar to the pgrep(1) command. The ::pgrep dcmd is used to pattern match against all processes. When the -n option is used, display only the newest process that matches the pattern. When the -o option is used, display only the oldest process that matches the pattern. When the -x option is used, display only those processes whose names are exactly the same as the search pattern.
In kmdb(1), the regexp used with ::pgrep must be a plain alpha-numeric text string.
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.
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.
Print a process tree, with child processes indented from their respective parent processes. The dcmd displays output using a format similar to ptree(1).
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).
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.
Given a vnode_t address, print the proc_t addresses of all processes that have this vnode currently open in their file table.
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>.
Iterate over the active process (proc_t) structures. This structure is defined in <sys/proc.h>.
Given a task pointer, iterate over the list of proc_t structures for processes that are members of the given task.
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>.