procstat(1) | get detailed process information |
pargs, procstat(1) | get detailed process information |
penv, procstat(1) | get detailed process information |
pwdx, procstat(1) | get detailed process information |
PROCSTAT(1) | MidnightBSD General Commands Manual | PROCSTAT(1) |
procstat
— get
detailed process information
procstat |
[--libxo ] [-h ]
[-M core]
[-N system]
[-w interval]
command [pid ... |
core ...] |
procstat |
[--libxo ] -a
[-h ] [-M
core] [-N
system] [-w
interval] command |
procstat |
[--libxo ] [-h ]
[-M core]
[-N system]
[-w interval]
[-b | -c |
-e | -f
[-C ] | -i
[-n ] | -j
[-n ] | -k
[-k ] | -l |
-r [-H ] |
-s | -S |
-t | -v |
-x ] [pid ... |
core ...] |
procstat |
[--libxo ] -a
[-h ] [-M
core] [-N
system] [-w
interval] [-b |
-c | -e |
-f [-C ] |
-i [-n ] |
-j [-n ] |
-k [-k ] |
-l | -r
[-H ] | -s |
-S | -t |
-v | -x ] |
procstat |
[--libxo ] -L
[-h ] [-M
core] [-N
system] [-w
interval] core ... |
pargs |
[--libxo ] pid ... |
penv |
[--libxo ] pid ... |
pwdx |
[--libxo ] pid ... |
procstat
utility displays detailed
information about the processes identified by the pid
arguments, or if the -a
flag is used, all processes.
It can also display information extracted from a process core file, if the
core file is specified as the argument.
The pargs
, penv
and pwdx
utilities display the arguments,
environment, and current working directory, respectively of the process
specified by pid argument. They mimic the behavior of
Solaris utilities of the same names.
If the --libxo
flag is specified the
output is generated via
libxo(3) in a selection of
different human and machine readable formats. See
xo_parse_args(3)
for details on command line arguments.
The following commands are available for
procstat
:
-b
Substring commands are accepted.
-c
Substring commands are accepted.
-e
Substring commands are accepted.
-f
If the -C
subcommand flag is used then
additional capability information is printed.
-i
If the -n
subcommand option is used,
the signal numbers are shown instead of signal names.
Substring commands are accepted.
-j
If the -n
subcommand option is used,
the signal numbers are shown instead of signal names.
Substring commands are accepted.
-k
If the -v
subcommand option is used
(or the command flag is repeated), function offsets as well as function
names are printed.
-l
-L
-r
If the -v
(or
-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.
-s
Substring commands are accepted.
-S
-t
-v
-x
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 -h
flag may be used to suppress
table headers.
The -w
flag may be used to specify a wait
interval at which to repeat the printing of the requested process
information. If the -w
flag is not specified, the
output will not repeat.
Information for VM, file descriptor, and cpuset options is available only to the owner of a process or the superuser. A cpuset value displayed as -1 means that the information is either invalid or not available.
Display the process ID, command, and path to the process binary:
Display the process ID, command, and command line arguments:
Display the process ID, command, and environment variables:
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 path. By default, the following information will be printed:
The following file descriptor types may be displayed:
The following vnode types may be displayed:
The following file descriptor flags may be displayed:
If the -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
cap_rights_limit(2),
present for each capability descriptor.
The following network protocols may be displayed (grouped by address family):
AF_INET
,
AF_INET6
IPPROTO_ICMP
;
see icmp(4).IPPROTO_DIVERT
;
see divert(4).IPPROTO_RAW
;
see ip(4).IPPROTO_SCTP
;
see sctp(4).IPPROTO_TCP
;
see tcp(4).IPPROTO_UDP
;
see udp(4).AF_LOCAL
IPPROTO_UDP
;
see udp(4).IPPROTO_TCP
;
see tcp(4).Display signal pending and disposition for a process:
SIG_IGN
; -
otherwise.If -n
switch is given, the signal numbers
are shown instead of signal names.
Display signal pending and blocked for a process's threads:
The -n
switch has the same effect as for
the -i
switch: the signal numbers are shown instead
of signal names.
Display kernel thread stacks for a process, allowing further
interpretation of thread wait channels. If the -k
flag is repeated, function offsets, not just function names, are
printed.
This feature requires options STACK
or
options DDB
to be compiled into the kernel.
Display resource limits for a process:
Display resource usage for a process. If the
-H
flag is specified, resource usage for individual
threads is displayed instead.
-H
is specified)Display process credential information:
The following credential flags may be displayed:
Display per-thread information, including process ID, per-thread ID, name, CPU, and execution state:
Display process virtual memory mappings, including addresses, mapping meta-data, and mapped object information:
The following protection flags may be displayed:
The following VM object types may be displayed:
The following mapping flags may be displayed:
Display ELF auxiliary vector values:
The procstat
utility exits 0 on
success, and >0 if an error occurs.
fstat(1), ps(1), sockstat(1), cap_enter(2), cap_rights_limit(2), mlock(2), mlockall(2), libprocstat(3), libxo(3), signal(3), xo_parse_args(3), ddb(4), divert(4), icmp(4), ip(4), sctp(4), tcp(4), udp(4), stack(9)
Robert N M Watson
<rwatson@FreeBSD.org>.
libxo(3) support was added
by Allan Jude
<allanjude@FreeBSD.org>.
Juraj Lutter
<juraj@lutter.sk>
added the pargs, penv and pwdx functionality.
The display of open file or memory mapping pathnames is implemented using the kernel's name cache. 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.
procstat
currently supports extracting
data only from a live kernel, and not from kernel crash dumps.
February 13, 2021 | midnightbsd-3.1 |