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
41 .Op Fl b | c | e | f | i | j | k | l | L | r | s | S | t | v | x
42 .Op Fl a | Ar pid | Ar core ...
46 utility displays detailed information about the processes identified by the
50 flag is used, all processes.
51 It can also display information extracted from a process core file, if
52 the core file is specified as the argument.
54 By default, basic process statistics are printed; one of the following
55 options may be specified in order to select more detailed process information
57 .Bl -tag -width indent
61 in a selection of different human and machine readable formats.
64 for details on command line arguments.
66 Display binary information for the process.
68 Display command line arguments for the process.
70 Display environment variables for the process.
72 Display file descriptor information for the process.
74 Display signal pending and disposition information for the process.
76 Display signal pending and blocked information for the process's threads.
78 Display the stacks of kernel threads in the process, excluding stacks of
79 threads currently running on a CPU and threads with stacks swapped to disk.
80 If the flag is repeated, function offsets as well as function names are
83 Display resource limits for the process.
85 Display LWP info for the process pertaining to it's signal driven exit.
87 Display resource usage information for the process.
89 Display security credential information for the process.
91 Display the cpuset information for the thread.
93 Display thread information for the process.
95 Display virtual memory mappings for the process.
97 Display ELF auxiliary vector for the process.
100 All options generate output in the format of a table, the first field of
101 which is the process ID to which the row of information corresponds.
104 flag may be used to suppress table headers.
108 flag may be used to specify a wait interval at which to repeat the printing
109 of the requested process information.
112 flag is not specified, the output will not repeat.
116 flag requests the printing of additional capability information in the file
121 flag may be used to request per-thread statistics rather than per-process
122 statistics for some options.
123 For those options, the second field in the table will list the thread ID
124 to which the row of information corresponds.
127 flag is implied for the
131 Information for VM, file descriptor, and cpuset options is available
132 only to the owner of a process or the superuser.
133 A cpuset value displayed as -1 means that the information is either invalid
135 .Ss Binary Information
136 Display the process ID, command, and path to the process binary:
138 .Bl -tag -width indent -compact
144 osreldate for process binary
146 path to process binary (if available)
148 .Ss Command Line Arguments
149 Display the process ID, command, and command line arguments:
151 .Bl -tag -width indent -compact
157 command line arguments (if available)
159 .Ss Environment Variables
160 Display the process ID, command, and environment variables:
162 .Bl -tag -width "ENVIRONMENT" -compact
168 environment variables (if available)
171 Display detailed information about each file descriptor referenced by a
172 process, including the process ID, command, file descriptor number, and
173 per-file descriptor object information, such as object type and file system
175 By default, the following information will be printed:
177 .Bl -tag -width indent -compact
183 file descriptor number or cwd/root/jail
189 file descriptor flags
191 file descriptor reference count
193 file descriptor offset
197 file path or socket addresses (if available)
200 The following file descriptor types may be displayed:
202 .Bl -tag -width X -compact
222 pseudo-terminal master
227 The following vnode types may be displayed:
229 .Bl -tag -width X -compact
250 The following file descriptor flags may be displayed:
252 .Bl -tag -width X -compact
273 flag is specified, the vnode type, reference count, and offset fields will be
274 omitted, and a new capabilities field will be included listing capabilities,
276 .Xr cap_rights_limit 2 ,
277 present for each capability descriptor.
279 The following network protocols may be displayed (grouped by address family):
284 .Bl -tag -width indent -compact
315 .Bl -tag -width indent -compact
328 .Bl -tag -width indent -compact
330 unknown address family.
332 .Ss Signal Disposition Information
333 Display signal pending and disposition for a process:
335 .Bl -tag -width indent -compact
343 process signal disposition details, three symbols
344 .Bl -tag -width X -compact
346 if signal is pending in the global process queue; - otherwise.
348 if signal delivery disposition is
352 if the signal will be caught; - otherwise.
358 switch is given, the signal numbers are shown instead of signal names.
359 .Ss Thread Signal Information
360 Display signal pending and blocked for a process's threads:
362 .Bl -tag -width indent -compact
372 thread signal delivery status, two symbols
373 .Bl -tag -width X -compact
375 if signal is pending for the thread, - otherwise
377 if signal is blocked in the thread signal mask, - if not blocked
383 switch has the same effect as for the
385 switch: the signal numbers are shown instead of signal names.
386 .Ss Kernel Thread Stacks
387 Display kernel thread stacks for a process, allowing further interpretation
388 of thread wait channels.
391 flag is repeated, function offsets, not just function names, are printed.
393 This feature requires
397 to be compiled into the kernel.
399 .Bl -tag -width indent -compact
409 kernel thread call stack
412 Display resource limits for a process:
414 .Bl -tag -width indent -compact
427 Display resource usage for a process.
431 resource usage for individual threads is displayed instead.
433 .Bl -tag -width "RESOURCE" -compact
450 .Ss Security Credentials
451 Display process credential information:
453 .Bl -tag -width indent -compact
471 file creation mode mask
478 The following credential flags may be displayed:
480 .Bl -tag -width X -compact
484 .Ss Thread Information
485 Display per-thread information, including process ID, per-thread ID, name,
486 CPU, and execution state:
488 .Bl -tag -width indent -compact
498 current or most recent CPU run on
506 .Ss Virtual Memory Mappings
507 Display process virtual memory mappings, including addresses, mapping
508 meta-data, and mapped object information:
510 .Bl -tag -width indent -compact
514 starting address of mapping
516 ending address of mapping
522 private resident pages
533 The following protection flags may be displayed:
535 .Bl -tag -width X -compact
544 The following VM object types may be displayed:
546 .Bl -tag -width XX -compact
556 device with managed pages
568 The following mapping flags may be displayed:
570 .Bl -tag -width X -compact
576 one or more superpage mappings are used
578 grows down (top-down stack)
580 grows up (bottom-up stack)
582 .Ss ELF Auxiliary Vector
583 Display ELF auxiliary vector values:
585 .Bl -tag -width indent -compact
591 auxiliary vector name
593 auxiliary vector value
602 .Xr cap_rights_limit 2 ,
606 .Xr xo_parse_args 3 ,
616 .An Robert N M Watson Aq Mt rwatson@FreeBSD.org .
622 .Aq Mt allanjude@FreeBSD.org .
624 The display of open file or memory mapping pathnames is implemented using the
626 If a file system does not use the name cache, or the path to a file is not in
627 the cache, a path will not be displayed.
630 currently supports extracting data only from a live kernel, and not from