PROCENV(1)

πŸ“¦
version 0.60 Β· 2 versions
, in epel 10, epel 9, fedora 43, fedora 44

πŸŽ€ 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. See dl_iterate_phdr(3).
  • -B, --libc β€” shows standard library details. See feature_test_macros(7) (Linux).
  • -c, --cgroups β€” shows cgroup details (Linux only). See proc(5).
  • -C, --cpu β€” shows CPU and scheduler details. See kvm_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. See cpp(1), cc(1) and feature_test_macros(7) (Linux).
  • -e, --environment β€” shows environment variables. See environ(7).
  • -E, --semaphores β€” shows semaphore details (not queryable on BSD). See semctl(2).
  • --exec (*) β€” treat non-option arguments as the program to execute after running procenv. See exec(3).
  • -f, --fds β€” shows file descriptor details. Under FreeBSD, file descriptor capabilities will also be displayed assuming the kernel has Capsicum support. See cap_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). See proc(5).
  • --file=FILE (*) β€” send output to file FILE (this implies --output=file).
  • --file-append (*) β€” if --file is 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. 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).
  • --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. See uname(2).
  • -k, --clocks β€” shows clock details. See clock_getres(2).
  • -l, --limits β€” shows limits. See getrlimit(2).
  • -L, --locale β€” shows locale details. See setlocale(3) and locale(7).
  • -m, --mounts β€” shows mount details. See getmntent(3) and statfs(2) (Linux), and getmntinfo(3) (BSD).
  • -M, --message-queues β€” shows message queue details (not queryable on BSD). See msgctl(2).
  • -n, --confstr β€” shows confstr details. See confstr(5).
  • -N, --network β€” shows network details. See getifaddrs(3), getnameinfo(3), ip(7), netdevice(7), and ioctl(2) (Linux).
  • -o, --oom β€” shows out-of-memory manager details (Linux only). See proc(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. 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 β€” shows platform details.
  • -q, --time β€” shows time details. See clock_gettime(2), localtime(3) and asctime(3).
  • -r, --ranges β€” shows range of data types. See limits.h(P).
  • -s, --signals β€” shows signal details. See sigaction(2).
  • -S, --shared-memory β€” shows shared memory details (not queryable on BSD). See shmctl(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. See tcgetattr(3) and tty_ioctl(4) (Linux).
  • -T, --threads β€” shows thread details. See pthread_attr_getstacksize(3), pthread_attr_getstacksize(3) and pthread_attr_getguardsize(3).
  • -u, --stat β€” shows stat details. See stat(2).
  • -U, --rusage β€” shows rusage details. See getrusage(2).
  • -v, --version β€” shows version details.
  • -w, --capabilities β€” shows Linux capability details. For FreeBSD file descriptor capabilities, see --fds. See prctl(2) (Linux), libcap(3) (Linux).
  • -x, --pathconf β€” shows pathconf details. See pathconf(3).
  • -y, --sysconf β€” shows sysconf details. See sysconf(3) and posixoptions(7) (Linux).
  • -Y, --memory β€” shows memory details. See getpagesize(2), numa(3) (Linux) and numa(7) (Linux), sysinfo(3).
  • -z, --timezone β€” shows timezone details. See tzset(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 --output should 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-char are literal except '\t', 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.
  • 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 --exec is 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, --semaphores and --shared-memory options 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_EXEC are 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 Β© 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