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
38 .Op Fl b | c | e | f | i | j | k | l | r | s | S | t | v | x
39 .Op Fl a | Ar pid | Ar core ...
43 utility displays detailed information about the processes identified by the
47 flag is used, all processes.
48 It can also display information extracted from a process core file, if
49 the core file is specified as the argument.
51 By default, basic process statistics are printed; one of the following
52 options may be specified in order to select more detailed process information
54 .Bl -tag -width indent
56 Display binary information for the process.
58 Display command line arguments for the process.
60 Display environment variables for the process.
62 Display file descriptor information for the process.
64 Display signal pending and disposition information for the process.
66 Display signal pending and blocked information for the process's threads.
68 Display the stacks of kernel threads in the process, excluding stacks of
69 threads currently running on a CPU and threads with stacks swapped to disk.
70 If the flag is repeated, function offsets as well as function names are
73 Display resource limits for the process.
75 Display resource usage information for the process.
77 Display security credential information for the process.
79 Display the cpuset information for the thread.
81 Display thread information for the process.
83 Display virtual memory mappings for the process.
85 Display ELF auxiliary vector for the process.
88 All options generate output in the format of a table, the first field of
89 which is the process ID to which the row of information corresponds.
92 flag may be used to suppress table headers.
96 flag may be used to specify a wait interval at which to repeat the printing
97 of the requested process information.
100 flag is not specified, the output will not repeat.
104 flag requests the printing of additional capability information in the file
109 flag may be used to request per-thread statistics rather than per-process
110 statistics for some options.
111 For those options, the second field in the table will list the thread ID
112 to which the row of information corresponds.
115 flag is implied for the
119 Information for VM, file descriptor, and cpuset options is available
120 only to the owner of a process or the superuser.
121 A cpuset value displayed as -1 means that the information is either invalid
123 .Ss Binary Information
124 Display the process ID, command, and path to the process binary:
126 .Bl -tag -width indent -compact
132 osreldate for process binary
134 path to process binary (if available)
136 .Ss Command Line Arguments
137 Display the process ID, command, and command line arguments:
139 .Bl -tag -width indent -compact
145 command line arguments (if available)
147 .Ss Environment Variables
148 Display the process ID, command, and environment variables:
150 .Bl -tag -width "ENVIRONMENT" -compact
156 environment variables (if available)
159 Display detailed information about each file descriptor referenced by a
160 process, including the process ID, command, file descriptor number, and
161 per-file descriptor object information, such as object type and file system
163 By default, the following information will be printed:
165 .Bl -tag -width indent -compact
171 file descriptor number or cwd/root/jail
177 file descriptor flags
179 file descriptor reference count
181 file descriptor offset
185 file path or socket addresses (if available)
188 The following file descriptor types may be displayed:
190 .Bl -tag -width X -compact
208 pseudo-terminal master
213 The following vnode types may be displayed:
215 .Bl -tag -width X -compact
236 The following file descriptor flags may be displayed:
238 .Bl -tag -width X -compact
259 flag is specified, the vnode type, reference count, and offset fields will be
260 omitted, and a new capabilities field will be included listing capabilities,
262 .Xr cap_rights_limit 2 ,
263 present for each capability descriptor.
265 The following network protocols may be displayed (grouped by address family):
270 .Bl -tag -width indent -compact
301 .Bl -tag -width indent -compact
314 .Bl -tag -width indent -compact
316 unknown address family.
318 .Ss Signal Disposition Information
319 Display signal pending and disposition for a process:
321 .Bl -tag -width indent -compact
329 process signal disposition details, three symbols
330 .Bl -tag -width X -compact
332 if signal is pending in the global process queue; - otherwise.
334 if signal delivery disposition is
338 if the signal will be caught; - otherwise.
344 switch is given, the signal numbers are shown instead of signal names.
345 .Ss Thread Signal Information
346 Display signal pending and blocked for a process's threads:
348 .Bl -tag -width indent -compact
358 thread signal delivery status, two symbols
359 .Bl -tag -width X -compact
361 if signal is pending for the thread, - otherwise
363 if signal is blocked in the thread signal mask, - if not blocked
369 switch has the same effect as for the
371 switch: the signal numbers are shown instead of signal names.
372 .Ss Kernel Thread Stacks
373 Display kernel thread stacks for a process, allowing further interpretation
374 of thread wait channels.
377 flag is repeated, function offsets, not just function names, are printed.
379 This feature requires
383 to be compiled into the kernel.
385 .Bl -tag -width indent -compact
395 kernel thread call stack
398 Display resource limits for a process:
400 .Bl -tag -width indent -compact
413 Display resource usage for a process.
417 resource usage for individual threads is displayed instead.
419 .Bl -tag -width "RESOURCE" -compact
436 .Ss Security Credentials
437 Display process credential information:
439 .Bl -tag -width indent -compact
457 file creation mode mask
464 The following credential flags may be displayed:
466 .Bl -tag -width X -compact
470 .Ss Thread Information
471 Display per-thread information, including process ID, per-thread ID, name,
472 CPU, and execution state:
474 .Bl -tag -width indent -compact
484 current or most recent CPU run on
492 .Ss Virtual Memory Mappings
493 Display process virtual memory mappings, including addresses, mapping
494 meta-data, and mapped object information:
496 .Bl -tag -width indent -compact
500 starting address of mapping
502 ending address of mapping
508 private resident pages
519 The following protection flags may be displayed:
521 .Bl -tag -width X -compact
530 The following VM object types may be displayed:
532 .Bl -tag -width XX -compact
542 device with managed pages
554 The following mapping flags may be displayed:
556 .Bl -tag -width X -compact
562 one or more superpage mappings are used
564 grows down (top-down stack)
566 grows up (bottom-up stack)
568 .Ss ELF Auxiliary Vector
569 Display ELF auxiliary vector values:
571 .Bl -tag -width indent -compact
577 auxiliary vector name
579 auxiliary vector value
588 .Xr cap_rights_limit 2 ,
599 .An Robert N M Watson
601 Some field values may include spaces, which limits the extent to which the
604 may be mechanically parsed.
606 The display of open file or memory mapping pathnames is implemented using the
608 If a file system does not use the name cache, or the path to a file is not in
609 the cache, a path will not be displayed.
612 currently supports extracting data only from a live kernel, and not from