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
42 .Op Ar pid ... | Ar core ...
73 .Op Ar pid ... | Ar core ...
107 utility displays detailed information about the processes identified by the
111 flag is used, all processes.
112 It can also display information extracted from a process core file, if
113 the core file is specified as the argument.
117 flag is specified the output is generated via
119 in a selection of different human and machine readable formats.
122 for details on command line arguments.
124 The following commands are available:
125 .Bl -tag -width indent
127 Print basic process statistics (this is the default).
129 Display binary information for the process.
131 Substring commands are accepted.
132 .It Ar argument(s) | Fl c
133 Display command line arguments for the process.
135 Substring commands are accepted.
136 .It Ar environment | Fl e
137 Display environment variables for the process.
139 Substring commands are accepted.
140 .It Ar file(s) | Ar fd(s) | Fl f
141 Display file descriptor information for the process.
145 subcommand flag is used then additional capability information is printed.
146 .It Ar signal(s) | Fl i
147 Display signal pending and disposition information for the process.
151 subcommand option is used, the signal numbers are shown instead of signal
154 Substring commands are accepted.
155 .It Ar tsignal(s) | Fl j
156 Display signal pending and blocked information for the process's threads.
160 subcommand option is used, the signal numbers are shown instead of signal
163 Substring commands are accepted.
165 Display the stacks of kernel threads in the process, excluding stacks of
166 threads currently running on a CPU and threads with stacks swapped to disk.
170 subcommand option is used (or the command flag is repeated), function
171 offsets as well as function names are printed.
173 Display resource limits for the process.
174 .It Ar ptlwpinfo | Fl L
175 Display LWP info for the process pertaining to its signal driven exit.
177 Display resource usage information for the process.
183 is used then per-thread statistics are printed, rather than per-process
185 The second field in the table will list the thread ID to which the row of
186 information corresponds.
187 .It Ar credential(s) | Fl s
188 Display security credential information for the process.
190 Substring commands are accepted.
191 .It Ar cpuset | Ar cs | Fl S
192 Display the cpuset information for the thread.
193 .It Ar thread(s) | Fl t
194 Display thread information for the process.
196 Display virtual memory mappings for the process.
198 Display ELF auxiliary vector for the process.
201 All options generate output in the format of a table, the first field of
202 which is the process ID to which the row of information corresponds.
205 flag may be used to suppress table headers.
209 flag may be used to specify a wait interval at which to repeat the printing
210 of the requested process information.
213 flag is not specified, the output will not repeat.
215 Information for VM, file descriptor, and cpuset options is available
216 only to the owner of a process or the superuser.
217 A cpuset value displayed as -1 means that the information is either invalid
219 .Ss Binary Information
220 Display the process ID, command, and path to the process binary:
222 .Bl -tag -width indent -compact
228 osreldate for process binary
230 path to process binary (if available)
232 .Ss Command Line Arguments
233 Display the process ID, command, and command line arguments:
235 .Bl -tag -width indent -compact
241 command line arguments (if available)
243 .Ss Environment Variables
244 Display the process ID, command, and environment variables:
246 .Bl -tag -width "ENVIRONMENT" -compact
252 environment variables (if available)
255 Display detailed information about each file descriptor referenced by a
256 process, including the process ID, command, file descriptor number, and
257 per-file descriptor object information, such as object type and file system
259 By default, the following information will be printed:
261 .Bl -tag -width indent -compact
267 file descriptor number or cwd/root/jail
273 file descriptor flags
275 file descriptor reference count
277 file descriptor offset
281 file path or socket addresses (if available)
284 The following file descriptor types may be displayed:
286 .Bl -tag -width X -compact
306 pseudo-terminal master
311 The following vnode types may be displayed:
313 .Bl -tag -width X -compact
334 The following file descriptor flags may be displayed:
336 .Bl -tag -width X -compact
357 flag is specified, the vnode type, reference count, and offset fields will be
358 omitted, and a new capabilities field will be included listing capabilities,
360 .Xr cap_rights_limit 2 ,
361 present for each capability descriptor.
363 The following network protocols may be displayed (grouped by address family):
368 .Bl -tag -width indent -compact
399 .Bl -tag -width indent -compact
412 .Bl -tag -width indent -compact
414 unknown address family.
416 .Ss Signal Disposition Information
417 Display signal pending and disposition for a process:
419 .Bl -tag -width indent -compact
427 process signal disposition details, three symbols
428 .Bl -tag -width X -compact
430 if signal is pending in the global process queue; - otherwise.
432 if signal delivery disposition is
436 if the signal will be caught; - otherwise.
442 switch is given, the signal numbers are shown instead of signal names.
443 .Ss Thread Signal Information
444 Display signal pending and blocked for a process's threads:
446 .Bl -tag -width indent -compact
456 thread signal delivery status, two symbols
457 .Bl -tag -width X -compact
459 if signal is pending for the thread, - otherwise
461 if signal is blocked in the thread signal mask, - if not blocked
467 switch has the same effect as for the
469 switch: the signal numbers are shown instead of signal names.
470 .Ss Kernel Thread Stacks
471 Display kernel thread stacks for a process, allowing further interpretation
472 of thread wait channels.
475 flag is repeated, function offsets, not just function names, are printed.
477 This feature requires
481 to be compiled into the kernel.
483 .Bl -tag -width indent -compact
493 kernel thread call stack
496 Display resource limits for a process:
498 .Bl -tag -width indent -compact
511 Display resource usage for a process.
515 resource usage for individual threads is displayed instead.
517 .Bl -tag -width "RESOURCE" -compact
534 .Ss Security Credentials
535 Display process credential information:
537 .Bl -tag -width indent -compact
555 file creation mode mask
562 The following credential flags may be displayed:
564 .Bl -tag -width X -compact
568 .Ss Thread Information
569 Display per-thread information, including process ID, per-thread ID, name,
570 CPU, and execution state:
572 .Bl -tag -width indent -compact
582 current or most recent CPU run on
590 .Ss Virtual Memory Mappings
591 Display process virtual memory mappings, including addresses, mapping
592 meta-data, and mapped object information:
594 .Bl -tag -width indent -compact
598 starting address of mapping
600 ending address of mapping
606 private resident pages
617 The following protection flags may be displayed:
619 .Bl -tag -width X -compact
628 The following VM object types may be displayed:
630 .Bl -tag -width XX -compact
640 device with managed pages
652 The following mapping flags may be displayed:
654 .Bl -tag -width X -compact
660 one or more superpage mappings are used
662 grows down (top-down stack)
664 grows up (bottom-up stack)
666 pages in this range are locked by
671 .Ss ELF Auxiliary Vector
672 Display ELF auxiliary vector values:
674 .Bl -tag -width indent -compact
680 auxiliary vector name
682 auxiliary vector value
691 .Xr cap_rights_limit 2 ,
697 .Xr xo_parse_args 3 ,
707 .An Robert N M Watson Aq Mt rwatson@FreeBSD.org .
713 .Aq Mt allanjude@FreeBSD.org .
715 The display of open file or memory mapping pathnames is implemented using the
717 If a file system does not use the name cache, or the path to a file is not in
718 the cache, a path will not be displayed.
721 currently supports extracting data only from a live kernel, and not from