Files, Processes, and Threads Dcmds
-
process
::fdfd-num -
Print the
file_taddress corresponding to the file descriptor fd-num associated with the specified process. The process is specified using the virtual address of itsproc_tstructure. -
thread
::findstack[ command ] -
Print the stack trace associated with the given kernel thread, identified by the virtual address of its
kthread_tstructure. 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. -
::pgrep[-x] [-n|-o] regexp -
Display process information for processes whose name matches the regexp regular expression pattern. The
::pgrepdcmd is similar to thepgrep(1) command. The::pgrepdcmd is used to pattern match against all processes. When the-noption is used, display only the newest process that matches the pattern. When the-ooption is used, display only the oldest process that matches the pattern. When the-xoption is used, display only those processes whose names are exactly the same as the search pattern.In
kmdb(1), the regexp used with::pgrepmust be a plain alpha-numeric text string. -
pid
::pid2proc -
Print the
proc_taddress corresponding to the specified PID. Recall that MDB's default base is hexadecimal, so decimal PIDs obtained usingpgrep(1) orps(1) should be prefixed with0t. -
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-qoption 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-foption is specified, the full command name and initial arguments are printed. If the-loption is specified, the LWPs associated with each process are printed. If the-toption is specified, the kernel threads associated with each process LWP are printed. If the-Toption is specified, the task ID associated with each process is displayed. If the-Poption 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_tstructure. If nokthread_taddress 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-ioption is enabled by default. If the-boption is present, information relating to the thread's turnstile and blocking synchronization object is shown. If the-doption is present, the thread's dispatcher priority, binding, and last dispatch time is shown. If the-foption is present, threads whose state is TS_FREE are elided from the output. If the-ioption is present (the default), thread state, flags, priority, and interrupt information is shown. If the-moption is present, all of the other output options are merged together on to a single output line. If the-poption is present, the thread's process, LWP, and credential pointers are displayed. If the-soption is present, the thread's signal queue and masks of pending and held signals are shown. -
vnode
::whereopen -
Given a
vnode_taddress, print theproc_taddresses of all processes that have this vnode currently open in their file table.