Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  PROCENV (1)


procenv - display process environment details


Environment Variables
See Also


procenv [OPTION]


Display details of the process environment in a parseable format.


-a, --meta Display meta details.
-A, --arguments
  Display program arguments.
-b, --libs Display library details. See dl_iterate_phdr(3)
-c, --cgroups
  Display cgroup details (Linux only). See proc(5)
-C, --cpu Display CPU and scheduler details. See kvm_getprocs(3)
(BSD), pthread_getaffinity_np(3) , sched_getcpu(3)
  Specify string str as alternate delimiter for crumb format output (default=\(aq:\(aq).
-d, --compiler
  Display compiler details. See cpp(1)
, cc(1)
and feature_test_macros(7)
-e, --environment
  Display environment variables. See environ(7)
-E, --semaphores
  Display semaphore details (not queryable on BSD). See semctl(2)
--exec Treat non-option arguments as program to execute after running procenv. See exec(3)
-f, --fds Display file descriptor details. Under FreeBSD, file descriptor capabilities will also be displayed assuming the kernel has Capsicum support. See cap_getmode(2)
, cap_rights_get(2)
, cap_rights_is_set(3)
, fcntl(2)
, isatty(5)
  Send output to file FILE (implies --output=file).
  Specify output format. FORMAT may be one of:
o crumb ("breadcrumbs").
o json (JavaScript Object Notation).
o text (plain ASCII text) [default].
o xml (Extensible Markup Language).
-g, --sizeof
  Display sizes of data types.
-h, --help This help text.
-i, --misc Display miscellaneous details. See umask(P), getcwd(3)
, personality(2)
(Linux), proc(5)
, prctl(2)
, aa_getcon(2)
(Linux), getpidcon(3)
(Linux), sysconf(3)
, kvm_getprocs(3)
(BSD), getpriority(2)
  Number of indent characters to use for each indent (default=2).
  Use character c for indenting (default=\(aq \(aq (space)).
-j, --uname
  Display uname details. See uname(2)
-k, --clocks
  Display clock details. See clock_getres(2)
-l, --limits
  Display limits. See getrlimit(2)
-L, --locale
  Display locale details. See setlocale(3)
and locale(7)
-m, --mounts
  Display mount details. See getmntent(3)
and statfs(2)
(Linux), and getmntinfo(3)
-M, --message-queues
  Display message queue details (not queryable on BSD). See msgctl(2)
-n, --confstr
  Display confstr details. See confstr(5)
-N, --network
  Display network details. See getifaddrs(3)
, getnameinfo(3)
, and ioctl(2)
(Linux) .
-o, --oom Display out-of-memory manager details (Linux only). See proc(5)
  Send output to alternative location. TYPE can be one of:
o file (send output to a file).
o stderr (write to standard error).
o stdout (write to standard output (default)).
o syslog (write to the system log file).
o terminal (write to terminal).
-p, --process
  Display process details. See getpid(2)
, getppid(2)
, getresuid(2)
, getresgid(2)
, getuid(2)
, geteuid(2)
, getgid(2)
, getegid(2)
, getsid(2)
, getlogin(3)
, getpgrp(2)
, ctermid(3)
, tcgetpgrp(3)
, tcgetsid(3)
, getpwuid(3)
and getgroups(2)
-P, --platform
  Display platform details.
-q, --time Display time details. See clock_gettime(2)
, localtime(3)
and asctime(3)
-r, --ranges
  Display range of data types. See limits.h(P).
-s, --signals
  Display signal details. See sigaction(2)
  Specify string str as alternate delimiter for text format output (default=\(aq: \(aq).
-S, --shared-memory
  Display shared memory details (not queryable on BSD). See shmctl(2)
-t, --tty Display terminal details. On Linux, will also show if any attributes are locked when running as root. See tcgetattr(3)
-T, --threads
  Display thread details. See pthread_attr_getstacksize(3)
, pthread_attr_getstacksize(3)
and pthread_attr_getguardsize(3)
-u, --stat Display stat details. See stat(2)
-U, --rusage
  Display rusage details. See getrusage(2)
-v, --version
  Display version details.
-w, --capabilities
  Display Linux capability details. For FreeBSD file descriptor capabilities, see --file-descriptors. See prctl(2)
, libcap(3)
-x, --pathconf
  Display pathconf details. See pathconf(3)
-y, --sysconf
  Display sysconf details. See sysconf(3)
and posixoptions(7)
-Y, --memory
  Display memory details. See getpagesize(2)
, numa(3)
(Linux) and numa(7)
-z, --timezone
  Display timezone details. See tzset(3)


The following environment variables may be used as aliases to their command-line counterparts:
  Alternative to --crumb-separator.
  Alternative to --exec.
  Alternative to --file.
  Alternative to --format.
  Alternative to --indent.
  Alternative to --indent-char.
  Alternative to --separator.
  Alternative to --output.


o Options are considered in order, so --output should precede any other option.
o If no display option is specified, all details are displayed.
o Only one display option may be specified.
o Command-line options take priority over environment variables.
o All values for --indent-char are literal except \(aq\t\(aq which can be used to specify a tab character. The same is true for --separator-char and --crumb-separator but only if it is the first character specified.
o Specifying a visible indent-char is only (vaguely) meaningful for text output.
o If --exec is specified, atleast one non-option argument must also be specified.
o Any long option name may be shortened as long as it remains unique.
o The crumb output format is designed for easy parsing: it displays the data in a flattened format with each value on a separate line preceded by all appropriate headings which are separated by the current separator.
o The --message-queues, --semaphores and --shared-memory options are not available on BSD since although the values are queryable, there is no documented method to do so.


 # Show limits
 procenv -l

 # Send compiler information to syslog (note the order of the options).
 procenv --output=syslog --compiler

 # Write compiler details direct to the terminal
 procenv --output=terminal --compiler

 # Run a command (’mycmd --arg1 --foo=bar’) without creating a new
 # process, but have procenv run first and log its output to a
 # regular file.
 exec procenv --file=/tmp/procenv.log --exec -- mycmd --arg1 --foo=bar

 # The following kernel command-line snippet will cause procenv to
 # write output to first serial tty device and then execute init(8)
 # in debug mode to allow early boot environment to be examined.
 init=/usr/bin/procenv PROCENV_FILE=/dev/ttyS0 PROCENV_EXEC="/sbin/init --debug"

 # Display all data in JSON format using an indent of 4 spaces
 procenv --format=json --indent=4

 # Display all data in XML format using tabs for indents
 procenv --format=xml --indent-char="\t"

 # Display signal details in XML format
 procenv --format=xml --signals

 # Display resource limits in easily-parseable format
 procenv --format=crumb --limits

 # Produce output suitable for importing into a spreadsheet
 procenv --format=crumb --crumb-separator=\(aq,\(aq --separator=\(aq,\(aq --limits

 # Produce stylised output
 procenv --format=crumb --crumb-separator=\(aq\(aq --separator=\(aq=\(aq


o Spaces within the value of PROCENV_EXEC are treated as delimiters meaning that any spaces within a string argument for example will result in incorrect behaviour.
o The separator character must be chosen carefully since no check is performed on the data to see if it itself contains instances of the separator character.


Written by James Hunt <> and Kees Cook <>.


Copyright © 2012-2014 James Hunt <> and Kees Cook <>.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


GNU GPL version 3 or later <>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


(Linux), capsicum(4)
, cc(1)
, credentials(7)
, date(1)
, env(1)
, exec(P), getconf(1)
, groups(1)
, ifconfig(8)
, ip(9)
, ipcs(1)
, kill(1)
, ldd(1)
, locale(1)
, ls(1)
, mount(1)
, proc(5)
, ps(1)
, rights(4)
(BSD), sh(1)
, stat(1)
, stty(1)
, umask(P), uname(1)
Search for    or go to Top of page |  Section 1 |  Main Index

User Commands PROCENV (1) 2014-08-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.