2 .\" Copyright (c) 2007-2009 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
40 .Op Fl b | c | e | f | i | j | k | l | s | t | v | x
41 .Op Fl a | Ar pid | Ar core ...
45 utility displays detailed information about the processes identified by the
49 flag is used, all processes.
50 It can also display information extracted from a process core file, if
51 the core file is specified as the argument.
53 By default, basic process statistics are printed; one of the following
54 options may be specified in order to select more detailed process information
56 .Bl -tag -width indent
58 Display binary information for the process.
60 Display command line arguments for the process.
62 Display environment variables for the process.
64 Display file descriptor information for the process.
66 Display signal pending and disposition information for the process.
68 Display signal pending and blocked information for the process threads.
70 Display the stacks of kernel threads in the process, excluding stacks of
71 threads currently running on a CPU and threads with stacks swapped to disk.
72 If the flag is repeated, function offsets as well as function names are
75 Display resource limits for the process.
77 Display security credential information for the process.
79 Display thread information for the process.
81 Display virtual memory mappings for the process.
83 Display ELF auxiliary vector for the process.
86 All options generate output in the format of a table, the first field of
87 which is the process ID to which the row of information corresponds.
90 flag may be used to suppress table headers.
94 flag may be used to specify a wait interval at which to repeat the printing
95 of the requested process information.
98 flag is not specified, the output will not repeat.
102 flag requests the printing of additional capability information in the file
105 Some information, such as VM and file descriptor information, is available
106 only to the owner of a process or the superuser.
107 .Ss Binary Information
108 Display the process ID, command, and path to the process binary:
110 .Bl -tag -width indent -compact
116 osreldate for process binary
118 path to process binary (if available)
120 .Ss Command Line Arguments
121 Display the process ID, command, and command line arguments:
123 .Bl -tag -width indent -compact
129 command line arguments (if available)
132 Display detailed information about each file descriptor referenced by a
133 process, including the process ID, command, file descriptor number, and
134 per-file descriptor object information, such as object type and file system
136 By default, the following information will be printed:
138 .Bl -tag -width indent -compact
144 file descriptor number or cwd/root/jail
150 file descriptor flags
152 file descriptor reference count
154 file descriptor offset
158 file path or socket addresses (if available)
161 The following file descriptor types may be displayed:
163 .Bl -tag -width X -compact
181 pseudo-terminal master
186 The following vnode types may be displayed:
188 .Bl -tag -width X -compact
209 The following file descriptor flags may be displayed:
211 .Bl -tag -width X -compact
229 descriptor is a capability
234 flag is specified, the vnode type, reference count, and offset fields will be
235 omitted, and a new capabilities field will be included listing capabilities,
238 present for each capability descriptor.
239 .Ss Signal Disposition Information
240 Display signal pending and disposition for a process:
242 .Bl -tag -width ident -compact
250 process signal disposition details, three symbols
251 .Bl -tag -width X -compact
253 if signal is pending in the global process queue, - otherwise
255 if signal delivery disposition is SIGIGN, - otherwise
257 if signal delivery is to catch it, - otherwise
263 switch is given, the signal numbers are shown instead of signal names.
264 .Ss Thread Signal Information
265 Display signal pending and blocked for a process threads:
267 .Bl -tag -width ident -compact
277 thread signal delivery status, two symbols
278 .Bl -tag -width X -compact
280 if signal is pending for the thread, - otherwise
282 if signal is blocked in the thread signal mask, - if not blocked
288 switch has the same effect as for the
290 switch, the signals numbers are shown instead of signal names.
291 .Ss Kernel Thread Stacks
292 Display kernel thread stacks for a process, allowing further interpretation
293 of thread wait channels.
296 flag is repeated, function offsets, not just function names, are printed.
298 This feature requires
302 to be compiled into the kernel.
304 .Bl -tag -width indent -compact
314 kernel thread call stack
316 .Ss Security Credentials
317 Display process credential information:
319 .Bl -tag -width indent -compact
337 file creation mode mask
344 The following credential flags may be displayed:
346 .Bl -tag -width X -compact
350 .Ss Thread Information
351 Display per-thread information, including process ID, per-thread ID, name,
352 CPU, and execution state:
354 .Bl -tag -width indent -compact
364 current or most recent CPU run on
372 .Ss Virtual Memory Mappings
373 Display process virtual memory mappings, including addresses, mapping
374 meta-data, and mapped object information:
376 .Bl -tag -width indent -compact
380 starting address of mapping
382 ending address of mapping
388 private resident pages
399 The following protection flags may be displayed:
401 .Bl -tag -width X -compact
410 The following VM object types may be displayed:
412 .Bl -tag -width XX -compact
422 device with managed pages
434 The following mapping flags may be displayed:
436 .Bl -tag -width X -compact
442 one or more superpage mappings are used
444 grows down (top-down stack)
446 grows up (bottom-up stack)
459 .An Robert N M Watson
461 Some field values may include spaces, which limits the extent to which the
464 may be mechanically parsed.
466 The display of open file or memory mapping pathnames is implemented using the
468 If a file system does not use the name cache, or the path to a file is not in
469 the cache, a path will not be displayed.
472 currently supports extracting data only from a live kernel, and not from