2007-12-02 23:31:45 +00:00
|
|
|
.\"-
|
2011-08-14 00:42:09 +00:00
|
|
|
.\" Copyright (c) 2007-2009 Robert N. M. Watson
|
2007-12-02 23:31:45 +00:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2019-03-05 19:45:37 +00:00
|
|
|
.Dd March 4, 2019
|
2007-12-02 23:31:45 +00:00
|
|
|
.Dt PROCSTAT 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm procstat
|
|
|
|
.Nd get detailed process information
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2015-09-05 17:02:01 +00:00
|
|
|
.Op Fl -libxo
|
2017-10-14 18:38:36 +00:00
|
|
|
.Op Fl h
|
2017-05-26 21:10:01 +00:00
|
|
|
.Op Fl M Ar core
|
|
|
|
.Op Fl N Ar system
|
2007-12-02 23:31:45 +00:00
|
|
|
.Op Fl w Ar interval
|
2017-10-14 18:38:36 +00:00
|
|
|
.Ar command
|
|
|
|
.Op Ar pid ... | Ar core ...
|
|
|
|
.Nm
|
|
|
|
.Op Fl -libxo
|
|
|
|
.Fl a
|
|
|
|
.Op Fl h
|
|
|
|
.Op Fl M Ar core
|
|
|
|
.Op Fl N Ar system
|
|
|
|
.Op Fl w Ar interval
|
|
|
|
.Ar command
|
|
|
|
.Nm
|
|
|
|
.Op Fl -libxo
|
|
|
|
.Op Fl h
|
|
|
|
.Op Fl M Ar core
|
|
|
|
.Op Fl N Ar system
|
|
|
|
.Op Fl w Ar interval
|
|
|
|
.Oo
|
|
|
|
.Fl b |
|
|
|
|
.Fl c |
|
|
|
|
.Fl e |
|
|
|
|
.Fl f Oo Fl C Oc |
|
|
|
|
.Fl i Oo Fl n Oc |
|
|
|
|
.Fl j Oo Fl n Oc |
|
|
|
|
.Fl k Oo Fl k Oc |
|
|
|
|
.Fl l |
|
|
|
|
.Fl r Oo Fl H Oc |
|
|
|
|
.Fl s |
|
|
|
|
.Fl S |
|
|
|
|
.Fl t |
|
|
|
|
.Fl v |
|
|
|
|
.Fl x
|
|
|
|
.Oc
|
|
|
|
.Op Ar pid ... | Ar core ...
|
|
|
|
.Nm
|
|
|
|
.Op Fl -libxo
|
|
|
|
.Fl a
|
|
|
|
.Op Fl h
|
|
|
|
.Op Fl M Ar core
|
|
|
|
.Op Fl N Ar system
|
|
|
|
.Op Fl w Ar interval
|
|
|
|
.Oo
|
|
|
|
.Fl b |
|
|
|
|
.Fl c |
|
|
|
|
.Fl e |
|
|
|
|
.Fl f Oo Fl C Oc |
|
|
|
|
.Fl i Oo Fl n Oc |
|
|
|
|
.Fl j Oo Fl n Oc |
|
|
|
|
.Fl k Oo Fl k Oc |
|
|
|
|
.Fl l |
|
|
|
|
.Fl r Oo Fl H Oc |
|
|
|
|
.Fl s |
|
|
|
|
.Fl S |
|
|
|
|
.Fl t |
|
|
|
|
.Fl v |
|
|
|
|
.Fl x
|
|
|
|
.Oc
|
|
|
|
.Nm
|
|
|
|
.Op Fl -libxo
|
|
|
|
.Fl L
|
|
|
|
.Op Fl h
|
|
|
|
.Op Fl M Ar core
|
|
|
|
.Op Fl N Ar system
|
|
|
|
.Op Fl w Ar interval
|
|
|
|
.Ar core ...
|
2007-12-02 23:31:45 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
utility displays detailed information about the processes identified by the
|
|
|
|
.Ar pid
|
|
|
|
arguments, or if the
|
|
|
|
.Fl a
|
|
|
|
flag is used, all processes.
|
2013-04-20 08:22:09 +00:00
|
|
|
It can also display information extracted from a process core file, if
|
|
|
|
the core file is specified as the argument.
|
2007-12-02 23:31:45 +00:00
|
|
|
.Pp
|
2017-10-14 18:38:36 +00:00
|
|
|
If the
|
|
|
|
.Fl -libxo
|
|
|
|
flag is specified the output is generated via
|
2015-09-05 17:02:01 +00:00
|
|
|
.Xr libxo 3
|
|
|
|
in a selection of different human and machine readable formats.
|
|
|
|
See
|
|
|
|
.Xr xo_parse_args 3
|
|
|
|
for details on command line arguments.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
The following commands are available:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Ar basic
|
|
|
|
Print basic process statistics (this is the default).
|
|
|
|
.It Ar binary | Fl b
|
2007-12-02 23:31:45 +00:00
|
|
|
Display binary information for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
Substring commands are accepted.
|
|
|
|
.It Ar argument(s) | Fl c
|
2007-12-02 23:31:45 +00:00
|
|
|
Display command line arguments for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
Substring commands are accepted.
|
|
|
|
.It Ar environment | Fl e
|
2011-11-22 20:59:52 +00:00
|
|
|
Display environment variables for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
Substring commands are accepted.
|
|
|
|
.It Ar file(s) | Ar fd(s) | Fl f
|
2007-12-02 23:31:45 +00:00
|
|
|
Display file descriptor information for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl C
|
|
|
|
subcommand flag is used then additional capability information is printed.
|
|
|
|
.It Ar signal(s) | Fl i
|
2010-03-08 20:44:22 +00:00
|
|
|
Display signal pending and disposition information for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl n
|
|
|
|
subcommand option is used, the signal numbers are shown instead of signal
|
|
|
|
names.
|
|
|
|
.Pp
|
|
|
|
Substring commands are accepted.
|
|
|
|
.It Ar tsignal(s) | Fl j
|
2014-05-17 04:06:54 +00:00
|
|
|
Display signal pending and blocked information for the process's threads.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl n
|
|
|
|
subcommand option is used, the signal numbers are shown instead of signal
|
|
|
|
names.
|
|
|
|
.Pp
|
|
|
|
Substring commands are accepted.
|
|
|
|
.It Ar kstack | Fl k
|
2007-12-02 23:31:45 +00:00
|
|
|
Display the stacks of kernel threads in the process, excluding stacks of
|
|
|
|
threads currently running on a CPU and threads with stacks swapped to disk.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl v
|
|
|
|
subcommand option is used (or the command flag is repeated), function
|
|
|
|
offsets as well as function names are printed.
|
|
|
|
.It Ar rlimit | Fl l
|
2011-11-24 20:54:06 +00:00
|
|
|
Display resource limits for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.It Ar ptlwpinfo | Fl L
|
2017-05-11 06:24:57 +00:00
|
|
|
Display LWP info for the process pertaining to its signal driven exit.
|
2017-10-14 18:38:36 +00:00
|
|
|
.It Ar rusage | Fl r
|
2014-05-17 03:54:51 +00:00
|
|
|
Display resource usage information for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl v
|
|
|
|
.Pq or Fl H
|
|
|
|
subcommand flag
|
|
|
|
is used then per-thread statistics are printed, rather than per-process
|
|
|
|
statistics.
|
|
|
|
The second field in the table will list the thread ID to which the row of
|
|
|
|
information corresponds.
|
|
|
|
.It Ar credential(s) | Fl s
|
2007-12-02 23:31:45 +00:00
|
|
|
Display security credential information for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.Pp
|
|
|
|
Substring commands are accepted.
|
|
|
|
.It Ar cpuset | Ar cs | Fl S
|
2015-03-10 09:41:48 +00:00
|
|
|
Display the cpuset information for the thread.
|
2017-10-14 18:38:36 +00:00
|
|
|
.It Ar thread(s) | Fl t
|
2007-12-02 23:31:45 +00:00
|
|
|
Display thread information for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.It Ar vm | Fl v
|
2007-12-02 23:31:45 +00:00
|
|
|
Display virtual memory mappings for the process.
|
2017-10-14 18:38:36 +00:00
|
|
|
.It Ar auxv | Fl x
|
2011-11-22 20:59:52 +00:00
|
|
|
Display ELF auxiliary vector for the process.
|
2007-12-02 23:31:45 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
All options generate output in the format of a table, the first field of
|
|
|
|
which is the process ID to which the row of information corresponds.
|
|
|
|
The
|
|
|
|
.Fl h
|
|
|
|
flag may be used to suppress table headers.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl w
|
|
|
|
flag may be used to specify a wait interval at which to repeat the printing
|
|
|
|
of the requested process information.
|
|
|
|
If the
|
|
|
|
.Fl w
|
|
|
|
flag is not specified, the output will not repeat.
|
|
|
|
.Pp
|
2015-03-10 09:41:48 +00:00
|
|
|
Information for VM, file descriptor, and cpuset options is available
|
2007-12-02 23:31:45 +00:00
|
|
|
only to the owner of a process or the superuser.
|
2015-03-10 09:41:48 +00:00
|
|
|
A cpuset value displayed as -1 means that the information is either invalid
|
|
|
|
or not available.
|
2008-04-19 13:40:42 +00:00
|
|
|
.Ss Binary Information
|
|
|
|
Display the process ID, command, and path to the process binary:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
2012-03-23 20:09:21 +00:00
|
|
|
.It OSREL
|
|
|
|
osreldate for process binary
|
2008-04-19 13:40:42 +00:00
|
|
|
.It PATH
|
|
|
|
path to process binary (if available)
|
|
|
|
.El
|
|
|
|
.Ss Command Line Arguments
|
|
|
|
Display the process ID, command, and command line arguments:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It ARGS
|
|
|
|
command line arguments (if available)
|
|
|
|
.El
|
2014-05-17 16:12:50 +00:00
|
|
|
.Ss Environment Variables
|
|
|
|
Display the process ID, command, and environment variables:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width "ENVIRONMENT" -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It ENVIRONMENT
|
|
|
|
environment variables (if available)
|
|
|
|
.El
|
2008-04-19 13:40:42 +00:00
|
|
|
.Ss File Descriptors
|
|
|
|
Display detailed information about each file descriptor referenced by a
|
|
|
|
process, including the process ID, command, file descriptor number, and
|
|
|
|
per-file descriptor object information, such as object type and file system
|
2011-08-14 00:42:09 +00:00
|
|
|
path.
|
|
|
|
By default, the following information will be printed:
|
2008-04-19 13:40:42 +00:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It FD
|
|
|
|
file descriptor number or cwd/root/jail
|
|
|
|
.It T
|
|
|
|
file descriptor type
|
|
|
|
.It V
|
|
|
|
vnode type
|
|
|
|
.It FLAGS
|
|
|
|
file descriptor flags
|
|
|
|
.It REF
|
|
|
|
file descriptor reference count
|
|
|
|
.It OFFSET
|
|
|
|
file descriptor offset
|
|
|
|
.It PRO
|
|
|
|
network protocol
|
|
|
|
.It NAME
|
|
|
|
file path or socket addresses (if available)
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following file descriptor types may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It c
|
|
|
|
crypto
|
2010-02-06 11:29:06 +00:00
|
|
|
.It e
|
|
|
|
POSIX semaphore
|
2008-04-19 13:40:42 +00:00
|
|
|
.It f
|
|
|
|
fifo
|
|
|
|
.It h
|
|
|
|
shared memory
|
|
|
|
.It k
|
|
|
|
kqueue
|
|
|
|
.It m
|
2008-07-28 08:01:24 +00:00
|
|
|
message queue
|
2017-10-03 11:45:24 +00:00
|
|
|
.It P
|
|
|
|
process descriptor
|
2008-04-19 13:40:42 +00:00
|
|
|
.It p
|
|
|
|
pipe
|
|
|
|
.It s
|
|
|
|
socket
|
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
2008-08-20 08:31:58 +00:00
|
|
|
.It t
|
|
|
|
pseudo-terminal master
|
2008-04-19 13:40:42 +00:00
|
|
|
.It v
|
|
|
|
vnode
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following vnode types may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It -
|
|
|
|
not a vnode
|
|
|
|
.It b
|
|
|
|
block device
|
|
|
|
.It c
|
|
|
|
character device
|
2010-02-06 11:29:06 +00:00
|
|
|
.It d
|
|
|
|
directory
|
2008-04-19 13:40:42 +00:00
|
|
|
.It f
|
|
|
|
fifo
|
|
|
|
.It l
|
|
|
|
symbolic link
|
2010-02-06 11:29:06 +00:00
|
|
|
.It r
|
|
|
|
regular file
|
2008-04-19 13:40:42 +00:00
|
|
|
.It s
|
|
|
|
socket
|
|
|
|
.It x
|
|
|
|
revoked device
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following file descriptor flags may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It r
|
|
|
|
read
|
|
|
|
.It w
|
|
|
|
write
|
|
|
|
.It a
|
|
|
|
append
|
|
|
|
.It s
|
|
|
|
async
|
|
|
|
.It f
|
|
|
|
fsync
|
|
|
|
.It n
|
|
|
|
non-blocking
|
|
|
|
.It d
|
|
|
|
direct I/O
|
|
|
|
.It l
|
|
|
|
lock held
|
|
|
|
.El
|
2011-08-14 00:42:09 +00:00
|
|
|
.Pp
|
|
|
|
If the
|
|
|
|
.Fl C
|
|
|
|
flag is specified, the vnode type, reference count, and offset fields will be
|
|
|
|
omitted, and a new capabilities field will be included listing capabilities,
|
|
|
|
as described in
|
2013-09-19 10:56:36 +00:00
|
|
|
.Xr cap_rights_limit 2 ,
|
2011-08-14 00:42:09 +00:00
|
|
|
present for each capability descriptor.
|
2017-05-11 07:55:38 +00:00
|
|
|
.Pp
|
|
|
|
The following network protocols may be displayed (grouped by address family):
|
|
|
|
.Pp
|
|
|
|
.Dv AF_INET ,
|
|
|
|
.Dv AF_INET6
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It ICM
|
|
|
|
.Dv IPPROTO_ICMP ;
|
|
|
|
see
|
|
|
|
.Xr icmp 4 .
|
|
|
|
.It IPD
|
|
|
|
.Dv IPPROTO_DIVERT ;
|
|
|
|
see
|
|
|
|
.Xr divert 4 .
|
2018-01-23 20:07:51 +00:00
|
|
|
.It IP?
|
2017-05-11 07:55:38 +00:00
|
|
|
unknown protocol.
|
|
|
|
.It RAW
|
|
|
|
.Dv IPPROTO_RAW ;
|
|
|
|
see
|
|
|
|
.Xr ip 4 .
|
|
|
|
.It SCT
|
|
|
|
.Dv IPPROTO_SCTP ;
|
|
|
|
see
|
|
|
|
.Xr sctp 4 .
|
|
|
|
.It TCP
|
|
|
|
.Dv IPPROTO_TCP ;
|
|
|
|
see
|
|
|
|
.Xr tcp 4 .
|
|
|
|
.It UDP
|
|
|
|
.Dv IPPROTO_UDP ;
|
|
|
|
see
|
|
|
|
.Xr udp 4 .
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.Dv AF_LOCAL
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It UDD
|
|
|
|
.Dv IPPROTO_UDP ;
|
|
|
|
see
|
|
|
|
.Xr udp 4 .
|
|
|
|
.It UDS
|
|
|
|
.Dv IPPROTO_TCP ;
|
|
|
|
see
|
|
|
|
.Xr tcp 4 .
|
2018-01-23 20:07:51 +00:00
|
|
|
.It UD?
|
2017-05-11 07:55:38 +00:00
|
|
|
unknown protocol.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
2018-01-23 20:07:51 +00:00
|
|
|
.It ?
|
2017-05-11 07:55:38 +00:00
|
|
|
unknown address family.
|
|
|
|
.El
|
2010-03-08 20:44:22 +00:00
|
|
|
.Ss Signal Disposition Information
|
|
|
|
Display signal pending and disposition for a process:
|
|
|
|
.Pp
|
2014-05-17 16:12:50 +00:00
|
|
|
.Bl -tag -width indent -compact
|
2010-03-08 20:44:22 +00:00
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It SIG
|
|
|
|
signal name
|
|
|
|
.It FLAGS
|
|
|
|
process signal disposition details, three symbols
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It P
|
2017-05-11 06:35:23 +00:00
|
|
|
if signal is pending in the global process queue; - otherwise.
|
2010-03-08 20:44:22 +00:00
|
|
|
.It I
|
2017-05-11 06:35:23 +00:00
|
|
|
if signal delivery disposition is
|
|
|
|
.Dv SIG_IGN;
|
|
|
|
- otherwise.
|
2010-03-08 20:44:22 +00:00
|
|
|
.It C
|
2017-05-11 06:35:23 +00:00
|
|
|
if the signal will be caught; - otherwise.
|
2010-03-08 20:44:22 +00:00
|
|
|
.El
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Fl n
|
|
|
|
switch is given, the signal numbers are shown instead of signal names.
|
|
|
|
.Ss Thread Signal Information
|
2014-05-17 04:06:54 +00:00
|
|
|
Display signal pending and blocked for a process's threads:
|
2010-03-08 20:44:22 +00:00
|
|
|
.Pp
|
2014-05-17 16:12:50 +00:00
|
|
|
.Bl -tag -width indent -compact
|
2010-03-08 20:44:22 +00:00
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It TID
|
|
|
|
thread ID
|
2014-05-17 04:06:54 +00:00
|
|
|
.It COMM
|
|
|
|
command
|
2010-03-08 20:44:22 +00:00
|
|
|
.It SIG
|
|
|
|
signal name
|
|
|
|
.It FLAGS
|
|
|
|
thread signal delivery status, two symbols
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It P
|
|
|
|
if signal is pending for the thread, - otherwise
|
|
|
|
.It B
|
|
|
|
if signal is blocked in the thread signal mask, - if not blocked
|
|
|
|
.El
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl n
|
|
|
|
switch has the same effect as for the
|
|
|
|
.Fl i
|
2014-05-17 04:06:54 +00:00
|
|
|
switch: the signal numbers are shown instead of signal names.
|
2008-04-19 13:40:42 +00:00
|
|
|
.Ss Kernel Thread Stacks
|
|
|
|
Display kernel thread stacks for a process, allowing further interpretation
|
|
|
|
of thread wait channels.
|
|
|
|
If the
|
|
|
|
.Fl k
|
2008-12-19 16:56:49 +00:00
|
|
|
flag is repeated, function offsets, not just function names, are printed.
|
2008-04-19 13:40:42 +00:00
|
|
|
.Pp
|
|
|
|
This feature requires
|
|
|
|
.Cd "options STACK"
|
|
|
|
or
|
|
|
|
.Cd "options DDB"
|
|
|
|
to be compiled into the kernel.
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It TID
|
|
|
|
thread ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It TDNAME
|
|
|
|
thread name
|
|
|
|
.It KSTACK
|
|
|
|
kernel thread call stack
|
|
|
|
.El
|
2014-05-17 16:12:50 +00:00
|
|
|
.Ss Resource Limits
|
|
|
|
Display resource limits for a process:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It RLIMIT
|
|
|
|
resource limit name
|
|
|
|
.It SOFT
|
|
|
|
soft limit
|
|
|
|
.It HARD
|
|
|
|
hard limit
|
|
|
|
.El
|
|
|
|
.Ss Resource Usage
|
|
|
|
Display resource usage for a process.
|
|
|
|
If the
|
|
|
|
.Fl H
|
|
|
|
flag is specified,
|
|
|
|
resource usage for individual threads is displayed instead.
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width "RESOURCE" -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It TID
|
|
|
|
thread ID
|
|
|
|
.Po
|
|
|
|
if
|
|
|
|
.Fl H
|
|
|
|
is specified
|
|
|
|
.Pc
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It RESOURCE
|
|
|
|
resource name
|
|
|
|
.It VALUE
|
|
|
|
current usage
|
|
|
|
.El
|
2008-04-19 13:40:42 +00:00
|
|
|
.Ss Security Credentials
|
|
|
|
Display process credential information:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It EUID
|
|
|
|
effective user ID
|
|
|
|
.It RUID
|
|
|
|
real user ID
|
|
|
|
.It SVUID
|
|
|
|
saved user ID
|
|
|
|
.It EGID
|
|
|
|
effective group ID
|
|
|
|
.It RGID
|
|
|
|
real group ID
|
|
|
|
.It SVGID
|
|
|
|
saved group ID
|
2012-02-29 15:06:40 +00:00
|
|
|
.It UMASK
|
|
|
|
file creation mode mask
|
2011-08-14 00:42:09 +00:00
|
|
|
.It FLAGS
|
|
|
|
credential flags
|
2008-04-19 13:40:42 +00:00
|
|
|
.It GROUPS
|
|
|
|
group set
|
|
|
|
.El
|
2011-08-14 00:42:09 +00:00
|
|
|
.Pp
|
|
|
|
The following credential flags may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It C
|
|
|
|
capability mode
|
|
|
|
.El
|
2008-04-19 13:40:42 +00:00
|
|
|
.Ss Thread Information
|
|
|
|
Display per-thread information, including process ID, per-thread ID, name,
|
|
|
|
CPU, and execution state:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It TID
|
|
|
|
thread ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It TDNAME
|
|
|
|
thread name
|
|
|
|
.It CPU
|
|
|
|
current or most recent CPU run on
|
|
|
|
.It PRI
|
|
|
|
thread priority
|
|
|
|
.It STATE
|
|
|
|
thread state
|
|
|
|
.It WCHAN
|
|
|
|
thread wait channel
|
|
|
|
.El
|
|
|
|
.Ss Virtual Memory Mappings
|
|
|
|
Display process virtual memory mappings, including addresses, mapping
|
|
|
|
meta-data, and mapped object information:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It START
|
|
|
|
starting address of mapping
|
|
|
|
.It END
|
|
|
|
ending address of mapping
|
|
|
|
.It PRT
|
|
|
|
protection flags
|
|
|
|
.It RES
|
|
|
|
resident pages
|
|
|
|
.It PRES
|
|
|
|
private resident pages
|
|
|
|
.It REF
|
|
|
|
reference count
|
|
|
|
.It SHD
|
|
|
|
shadow page count
|
2014-07-20 20:11:34 +00:00
|
|
|
.It FLAG
|
2008-04-19 13:40:42 +00:00
|
|
|
mapping flags
|
|
|
|
.It TP
|
|
|
|
VM object type
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following protection flags may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It r
|
|
|
|
read
|
|
|
|
.It w
|
|
|
|
write
|
|
|
|
.It x
|
|
|
|
execute
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following VM object types may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width XX -compact
|
|
|
|
.It --
|
|
|
|
none
|
|
|
|
.It dd
|
|
|
|
dead
|
|
|
|
.It df
|
|
|
|
default
|
|
|
|
.It dv
|
|
|
|
device
|
2014-02-11 21:57:37 +00:00
|
|
|
.It md
|
|
|
|
device with managed pages
|
|
|
|
.Pq GEM/TTM
|
2008-04-19 13:40:42 +00:00
|
|
|
.It ph
|
|
|
|
physical
|
2012-10-02 00:30:20 +00:00
|
|
|
.It sg
|
|
|
|
scatter/gather
|
2008-04-19 13:40:42 +00:00
|
|
|
.It sw
|
|
|
|
swap
|
|
|
|
.It vn
|
|
|
|
vnode
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following mapping flags may be displayed:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width X -compact
|
|
|
|
.It C
|
|
|
|
copy-on-write
|
|
|
|
.It N
|
|
|
|
needs copy
|
2011-11-07 21:16:19 +00:00
|
|
|
.It S
|
|
|
|
one or more superpage mappings are used
|
2012-07-16 09:38:19 +00:00
|
|
|
.It D
|
|
|
|
grows down (top-down stack)
|
|
|
|
.It U
|
|
|
|
grows up (bottom-up stack)
|
2019-03-05 19:45:37 +00:00
|
|
|
.It W
|
|
|
|
pages in this range are locked by
|
|
|
|
.Xr mlock 2
|
|
|
|
or
|
|
|
|
.Xr mlockall 2
|
2008-04-19 13:40:42 +00:00
|
|
|
.El
|
2014-05-17 16:12:50 +00:00
|
|
|
.Ss ELF Auxiliary Vector
|
|
|
|
Display ELF auxiliary vector values:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It PID
|
|
|
|
process ID
|
|
|
|
.It COMM
|
|
|
|
command
|
|
|
|
.It AUXV
|
|
|
|
auxiliary vector name
|
|
|
|
.It VALUE
|
|
|
|
auxiliary vector value
|
|
|
|
.El
|
2007-12-02 23:31:45 +00:00
|
|
|
.Sh EXIT STATUS
|
|
|
|
.Ex -std
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr fstat 1 ,
|
|
|
|
.Xr ps 1 ,
|
|
|
|
.Xr sockstat 1 ,
|
2011-08-14 00:42:09 +00:00
|
|
|
.Xr cap_enter 2 ,
|
2013-09-19 10:56:36 +00:00
|
|
|
.Xr cap_rights_limit 2 ,
|
2019-03-05 19:45:37 +00:00
|
|
|
.Xr mlock 2 ,
|
|
|
|
.Xr mlockall 2 ,
|
2015-05-21 03:32:44 +00:00
|
|
|
.Xr libprocstat 3 ,
|
2015-09-05 17:02:01 +00:00
|
|
|
.Xr libxo 3 ,
|
2017-05-11 06:35:23 +00:00
|
|
|
.Xr signal 3 ,
|
2015-09-05 17:02:01 +00:00
|
|
|
.Xr xo_parse_args 3 ,
|
2008-04-21 17:09:53 +00:00
|
|
|
.Xr ddb 4 ,
|
2017-05-11 07:55:38 +00:00
|
|
|
.Xr divert 4 ,
|
2017-05-11 07:58:04 +00:00
|
|
|
.Xr icmp 4 ,
|
2017-05-11 07:55:38 +00:00
|
|
|
.Xr ip 4 ,
|
2017-05-11 07:58:04 +00:00
|
|
|
.Xr sctp 4 ,
|
2017-05-11 07:55:38 +00:00
|
|
|
.Xr tcp 4 ,
|
|
|
|
.Xr udp 4 ,
|
2007-12-02 23:31:45 +00:00
|
|
|
.Xr stack 9
|
|
|
|
.Sh AUTHORS
|
2015-09-05 17:02:01 +00:00
|
|
|
.An Robert N M Watson Aq Mt rwatson@FreeBSD.org .
|
|
|
|
.br
|
|
|
|
.Xr libxo 3
|
|
|
|
support was added by
|
|
|
|
.An -nosplit
|
|
|
|
Allan Jude
|
|
|
|
.Aq Mt allanjude@FreeBSD.org .
|
2007-12-02 23:31:45 +00:00
|
|
|
.Sh BUGS
|
|
|
|
The display of open file or memory mapping pathnames is implemented using the
|
|
|
|
kernel's name cache.
|
2009-08-12 10:41:37 +00:00
|
|
|
If a file system does not use the name cache, or the path to a file is not in
|
|
|
|
the cache, a path will not be displayed.
|
2008-04-19 12:39:15 +00:00
|
|
|
.Pp
|
|
|
|
.Nm
|
|
|
|
currently supports extracting data only from a live kernel, and not from
|
|
|
|
kernel crash dumps.
|