2 .\" Copyright (c) 2007-2008 Robert N. M. Watson
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd get detailed process information
38 .Op Fl b | c | f | k | s | t | v
43 utility displays detailed information about the processes identified by the
47 flag is used, all processes.
49 By default, basic process statistics are printed; one of the following
50 options may be specified in order to select more detailed process information
52 .Bl -tag -width indent
54 Display binary information for the process.
56 Display command line arguments for the process.
58 Display file descriptor information for the process.
60 Display the stacks of kernel threads in the process, excluding stacks of
61 threads currently running on a CPU and threads with stacks swapped to disk.
62 If the flag is repeated, function offsets as well as function names are
65 Display security credential information for the process.
67 Display thread information for the process.
69 Display virtual memory mappings for the process.
72 All options generate output in the format of a table, the first field of
73 which is the process ID to which the row of information corresponds.
76 flag may be used to suppress table headers.
80 flag may be used to specify a wait interval at which to repeat the printing
81 of the requested process information.
84 flag is not specified, the output will not repeat.
86 Some information, such as VM and file descriptor information, is available
87 only to the owner of a process or the superuser.
88 .Ss Binary Information
89 Display the process ID, command, and path to the process binary:
91 .Bl -tag -width indent -compact
97 path to process binary (if available)
99 .Ss Command Line Arguments
100 Display the process ID, command, and command line arguments:
102 .Bl -tag -width indent -compact
108 command line arguments (if available)
111 Display detailed information about each file descriptor referenced by a
112 process, including the process ID, command, file descriptor number, and
113 per-file descriptor object information, such as object type and file system
116 .Bl -tag -width indent -compact
122 file descriptor number or cwd/root/jail
128 file descriptor flags
130 file descriptor reference count
132 file descriptor offset
136 file path or socket addresses (if available)
139 The following file descriptor types may be displayed:
141 .Bl -tag -width X -compact
158 The following vnode types may be displayed:
160 .Bl -tag -width X -compact
177 The following file descriptor flags may be displayed:
179 .Bl -tag -width X -compact
197 .Ss Kernel Thread Stacks
198 Display kernel thread stacks for a process, allowing further interpretation
199 of thread wait channels.
202 flag is reeated, function offsets, not just function names, are printed.
204 This feature requires
208 to be compiled into the kernel.
210 .Bl -tag -width indent -compact
220 kernel thread call stack
222 .Ss Security Credentials
223 Display process credential information:
225 .Bl -tag -width indent -compact
245 .Ss Thread Information
246 Display per-thread information, including process ID, per-thread ID, name,
247 CPU, and execution state:
249 .Bl -tag -width indent -compact
259 current or most recent CPU run on
267 .Ss Virtual Memory Mappings
268 Display process virtual memory mappings, including addresses, mapping
269 meta-data, and mapped object information:
271 .Bl -tag -width indent -compact
275 starting address of mapping
277 ending address of mapping
283 private resident pages
294 The following protection flags may be displayed:
296 .Bl -tag -width X -compact
305 The following VM object types may be displayed:
307 .Bl -tag -width XX -compact
324 The following mapping flags may be displayed:
326 .Bl -tag -width X -compact
341 .An Robert N M Watson
343 Some field values may include spaces, which limits the extent to which the
346 may be mechanically parsed.
348 The display of open file or memory mapping pathnames is implemented using the
350 It therefore does not work for file systems
351 that do not use the name cache, such as
353 or if the name is not present in the cache due to removal.
356 currently supports extracting data only from a live kernel, and not from