PROCENV(1)
π PROCENV(1) β the manual, but make it cute π
okay bestie, welcome to procenv, from the General Commands Manual section 1, because we're being extra about process stuff today π
β¨ NAME β¨
procenv β display process environment details π«Ά
πΈ SYNOPSIS πΈ
procenv [OPTION]
π¦ DESCRIPTION π¦
It displays details of the process environment in a parseable format. That's it, that's the whole vibe. It's giving "tell me everything about yourself" but for your process π§
π OPTIONS π
okay so, listen up: options that have a bracketed asterisk (*) next to them are non-display options, and they have to come before any other (display) options. No cap, order matters here π
-a,--metaβ shows the meta details β¨-A,--argumentsβ shows the program arguments.-b,--libsβ shows details of linked libraries. Seedl_iterate_phdr(3).-B,--libcβ shows standard library details. Seefeature_test_macros(7)(Linux).-c,--cgroupsβ shows cgroup details (Linux only). Seeproc(5).-C,--cpuβ shows CPU and scheduler details. Seekvm_getprocs(3)(BSD),pthread_getaffinity_np(3),sched_getcpu(3)(Linux).--crumb-separator=str(*)β use the string str as the alternate delimiter for crumb format output (default=':').-d,--compilerβ shows compiler details. Seecpp(1),cc(1)andfeature_test_macros(7)(Linux).-e,--environmentβ shows environment variables. Seeenviron(7).-E,--semaphoresβ shows semaphore details (not queryable on BSD). Seesemctl(2).--exec(*)β treat non-option arguments as the program to execute after running procenv. Seeexec(3).-f,--fdsβ shows file descriptor details. Under FreeBSD, file descriptor capabilities will also be displayed assuming the kernel has Capsicum support. Seecap_getmode(2)(BSD),cap_rights_get(2)(BSD),cap_rights_is_set(3)(BSD),fcntl(2),isatty(5).-F,--namespacesβ shows namespace details (Linux only). Seeproc(5).--file=FILE(*)β send output to file FILE (this implies--output=file).--file-append(*)β if--fileis specified, append to it instead of overwriting it.--format=FORMAT(*)β pick your output format. FORMAT can be one of:crumb("breadcrumbs").json(JavaScript Object Notation).text(plain ASCII text) [default].xml(Extensible Markup Language).
-g,--sizeofβ shows sizes of data types.-h,--helpβ this help text.-i,--miscβ shows miscellaneous details. Seeumask(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).--indent(*)β number of indent characters to use for each indent (default=2).--indent-char=c(*)β use character c for indenting (default=' '(space)).-j,--unameβ shows uname details. Seeuname(2).-k,--clocksβ shows clock details. Seeclock_getres(2).-l,--limitsβ shows limits. Seegetrlimit(2).-L,--localeβ shows locale details. Seesetlocale(3)andlocale(7).-m,--mountsβ shows mount details. Seegetmntent(3)andstatfs(2)(Linux), andgetmntinfo(3)(BSD).-M,--message-queuesβ shows message queue details (not queryable on BSD). Seemsgctl(2).-n,--confstrβ shows confstr details. Seeconfstr(5).-N,--networkβ shows network details. Seegetifaddrs(3),getnameinfo(3),ip(7),netdevice(7), andioctl(2)(Linux).-o,--oomβ shows out-of-memory manager details (Linux only). Seeproc(5).--output=TYPE(*)β send output to an alternative location. TYPE can be one of:file(send output to a file).stderr(write to standard error).stdout(write to standard output (default)).syslog(write to the system log file).terminal(write to terminal).
-p,--processβ shows process details. Seegetpid(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)andgetgroups(2).-P,--platformβ shows platform details.-q,--timeβ shows time details. Seeclock_gettime(2),localtime(3)andasctime(3).-r,--rangesβ shows range of data types. Seelimits.h(P).-s,--signalsβ shows signal details. Seesigaction(2).-S,--shared-memoryβ shows shared memory details (not queryable on BSD). Seeshmctl(2).--separator=str(*)β use the string str as the alternate delimiter for text format output (default=': ').-t,--ttyβ shows terminal details. On Linux, it will also show if any attributes are locked when running as root. Seetcgetattr(3)andtty_ioctl(4)(Linux).-T,--threadsβ shows thread details. Seepthread_attr_getstacksize(3),pthread_attr_getstacksize(3)andpthread_attr_getguardsize(3).-u,--statβ shows stat details. Seestat(2).-U,--rusageβ shows rusage details. Seegetrusage(2).-v,--versionβ shows version details.-w,--capabilitiesβ shows Linux capability details. For FreeBSD file descriptor capabilities, see--fds. Seeprctl(2)(Linux),libcap(3)(Linux).-x,--pathconfβ shows pathconf details. Seepathconf(3).-y,--sysconfβ shows sysconf details. Seesysconf(3)andposixoptions(7)(Linux).-Y,--memoryβ shows memory details. Seegetpagesize(2),numa(3)(Linux) andnuma(7)(Linux),sysinfo(3).-z,--timezoneβ shows timezone details. Seetzset(3).
π ENVIRONMENT VARIABLES π
these env vars are literally just aliases for their command-line counterparts, iconic behavior honestly π
PROCENV_CRUMB_SEPARATORβ alternative to--crumb-separator.PROCENV_EXECβ alternative to--exec.PROCENV_FILEβ alternative to--file.PROCENV_FILE_APPENDβ alternative to--file-append.PROCENV_FORMATβ alternative to--format.PROCENV_INDENTβ alternative to--indent.PROCENV_INDENT_CHARβ alternative to--indent-char.PROCENV_SEPARATORβ alternative to--separator.PROCENV_OUTPUTβ alternative to--output.
π NOTES π
- options are considered in order, so
--outputshould precede any other option. yes this matters, i'm not being dramatic π - if no display option is specified, all details are displayed. go off, show everything.
- only one display option may be specified.
- command-line options take priority over environment variables.
- all values for
--indent-charare literal except'\t', which can be used to specify a tab character. The same is true for--separator-charand--crumb-separatorbut only if it is the first character specified. - specifying a visible indent-char is only (vaguely) meaningful for text output. yes, "(vaguely)", that's a direct quote, i'm not making this up π«
- if
--execis specified, at least one non-option argument must also be specified. - any long option name may be shortened as long as it remains unique. so you can be lazy, just not ambiguous lazy π
- 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.
- the
--message-queues,--semaphoresand--shared-memoryoptions are not available on BSD since although the values are queryable, there is no documented method to do so. tragic. anyway.
β EXAMPLES β
# 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
# run as PID 1 and write output to the first serial tty device. It will then
# execute the init daemon (specifying some arguments to show how this is possible).
# Note that since procenv re-executes, the init daemon will (also) be run as PID 1.
init=/usr/bin/procenv PROCENV_FILE=/dev/ttyS0 PROCENV_EXEC="/sbin/init --foo-bar --baz"
# 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=',' --separator=',' --limits
# Produce stylised output
procenv --format=crumb --crumb-separator=' β ' --separator='='
π LIMITATIONS π
- spaces within the value of
PROCENV_EXECare treated as delimiters, meaning that any spaces within a string argument for example will result in incorrect behaviour. yeah. that's a real one, be careful bestie π - 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. so like, pick wisely π
π«Ά AUTHORS π«Ά
Written by James Hunt <jamesodhunt@gmail.com> and Kees Cook <kees@ubuntu.com>. legends, honestly π
π COPYRIGHT π
Copyright Β© 2012-2021 James Hunt <jamesodhunt@gmail.com> and Kees Cook <kees@ubuntu.com>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
π§ LICENSE π§
GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
πΈ SEE ALSO πΈ
capabilities(7) (Linux), capsicum(4) (BSD), cc(1), clock_gettime(2) (Linux), 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)
and that's a wrap, bestie π this page is from the User Commands manual, dated 2016-03-10, and the command itself is procenv in section 1. go forth and inspect your process, you main character π¦β¨
π¦ where this page comes from
- epel 10: procenv 0.60-11.el10_1 Β· GPL-3.0-or-later
- epel 9: procenv 0.60-2.el9 Β· GPLv3+
- fedora 43: procenv 0.60-12.fc43 Β· GPL-3.0-or-later
- fedora 44: procenv 0.60-15.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms