Go Back    

Recursive Search Engine for Linux and Unix Man Pages by Neo
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

PROCSTAT(1)			   BSD General Commands Manual			      PROCSTAT(1)

     procstat -- get detailed process information

     procstat [-h] [-w interval] [-b | -c | -f | -k | -s | -t | -v] [-a | pid ...]

     The procstat utility displays detailed information about the processes identified by the pid
     arguments, or if the -a flag is used, all processes.

     By default, basic process statistics are printed; one of the following options may be speci-
     fied in order to select more detailed process information for printing:

     -b      Display binary information for the process.

     -c      Display command line arguments for the process.

     -f      Display file descriptor information for the process.

     -k      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.  If the flag is
	     repeated, function offsets as well as function names are printed.

     -s      Display security credential information for the process.

     -t      Display thread information for the process.

     -v      Display virtual memory mappings for the process.

     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.

     Some information, such as VM and file descriptor information, is available only to the owner
     of a process or the superuser.

   Binary Information
     Display the process ID, command, and path to the process binary:

     PID     process ID
     COMM    command
     PATH    path to process binary (if available)

   Command Line Arguments
     Display the process ID, command, and command line arguments:

     PID     process ID
     COMM    command
     ARGS    command line arguments (if available)

   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 path:

     PID     process ID
     COMM    command
     FD      file descriptor number or cwd/root/jail
     T	     file descriptor type
     V	     vnode type
     FLAGS   file descriptor flags
     REF     file descriptor reference count
     OFFSET  file descriptor offset
     PRO     network protocol
     NAME    file path or socket addresses (if available)

     The following file descriptor types may be displayed:

     c	crypto
     f	fifo
     h	shared memory
     k	kqueue
     m	message queue
     p	pipe
     s	socket
     t	pseudo-terminal master
     v	vnode

     The following vnode types may be displayed:

     -	not a vnode
     b	block device
     c	character device
     f	fifo
     l	symbolic link
     s	socket
     x	revoked device

     The following file descriptor flags may be displayed:

     r	read
     w	write
     a	append
     s	async
     f	fsync
     n	non-blocking
     d	direct I/O
     l	lock held

   Kernel Thread Stacks
     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

     This feature requires options STACK or options DDB to be compiled into the kernel.

     PID     process ID
     TID     thread ID
     COMM    command
     TDNAME  thread name
     KSTACK  kernel thread call stack

   Security Credentials
     Display process credential information:

     PID     process ID
     COMM    command
     EUID    effective user ID
     RUID    real user ID
     SVUID   saved user ID
     EGID    effective group ID
     RGID    real group ID
     SVGID   saved group ID
     GROUPS  group set

   Thread Information
     Display per-thread information, including process ID, per-thread ID, name, CPU, and execu-
     tion state:

     PID     process ID
     TID     thread ID
     COMM    command
     TDNAME  thread name
     CPU     current or most recent CPU run on
     PRI     thread priority
     STATE   thread state
     WCHAN   thread wait channel

   Virtual Memory Mappings
     Display process virtual memory mappings, including addresses, mapping meta-data, and mapped
     object information:

     PID     process ID
     START   starting address of mapping
     END     ending address of mapping
     PRT     protection flags
     RES     resident pages
     PRES    private resident pages
     REF     reference count
     SHD     shadow page count
     FL      mapping flags
     TP      VM object type

     The following protection flags may be displayed:

     r	read
     w	write
     x	execute

     The following VM object types may be displayed:

     --  none
     dd  dead
     df  default
     dv  device
     ph  physical
     sw  swap
     vn  vnode

     The following mapping flags may be displayed:

     C	copy-on-write
     N	needs copy

     The procstat utility exits 0 on success, and >0 if an error occurs.

     fstat(1), ps(1), sockstat(1), ddb(4), stack(9)

     Robert N M Watson

     Some field values may include spaces, which limits the extent to which the output of
     procstat may be mechanically parsed.

     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.

BSD					 August 20, 2008				      BSD
The UNIX and Linux Forums Man Pages : 2014 The UNIX and Linux Forums

All times are GMT -4. The time now is 12:18 PM.