Command-line utility to show process environment
C Makefile Shell M4 C++
Latest commit df74426 Feb 15, 2017 @jamesodhunt Add new feature test macros, sort list and bump format version.
Signed-off-by: James O. D. Hunt <>
Failed to load latest commit information.

README.rst Coverity Scan Build Status Donate via flattr Donate via Paypal

1   procenv

1.1   Overview

procenv is a simple command-line utility, written in C and licensed under the GPL, that dumps all attributes of the environment [1] in which it runs, in well-structured plain ASCII, JSON (YAML), XML or CSV.

It is useful as a test tool, to understand what environment a process runs in and for system comparison.

procenv runs on the following operating systems:

  • Android
  • FreeBSD
  • GNU Hurd
  • GNU Linux
  • Minix 3
  • NetBSD
  • OpenBSD
  • OSX

It unashamedly emulates a number of existing system utilities as it is attempting to be all-encompassing: I wrote it with the aim of being able to dump "everything" that a process may care about by simply running a single program (by default). Also, the line of demarcation between "process", "program" and "system" is slightly blurry in some aspects. For example sysconf(3) variables could arguably be considered system attributes, but procenv shows these too since they are obviously meant to be queryable by applications.

[1]If you find anything missing, please either raise a bug or send a patch :)

1.2   Results

procenv is extremely useful for learning about the environment software builds in. Often, such systems disallow login, but do allow access to log files. Handily, procenv runs a battery of tests on build including running itself so that the build environment gets captured in the builds logs themselves. Select a link below and drill down to the build log to see the procenv output:

1.2.1   Semaphore-CI

1.2.2   MagnumCI

1.2.3   Travis-CI

1.2.4   Open Build Service (OBS)

If you distro does not yet provide a procenv package, binary packages for RHEL, Fedora, Centos, SLES, and Arch Linux are available from here:

Click on your icon for your distro and follow the instructions.

Note that these packages are "bleeding edge" (generated directly from the github repository).

1.2.5   Ubuntu   build environment

Click the "twisty" triangle to the left of the release number under a release name, then click one of the build links (like "amd64)":   PPA environment   Ubuntu Autopkgtest (DEP-8) environment   The sbuild tool environment

procenv gets run from within sbuild via a DEP-8 test:   The pbuilder tool environment

procenv gets run from within pbuilder via a DEP-8 test:

1.2.6   Debian   buildd (and ports buildd) environment   Debian autopkgtest (DEP-8) environment

1.2.7   Fedora

1.2.8   FreeBSD

Logs used to be available, but sadly it appears has been taken offline (any replacement?)

1.3   Porting

Can you help port procenv to other platforms (AIX, HP-UX, Solaris, ...)? If so, please get in contact.

1.4   References


1.5   Author

procenv was written by James Hunt <>.

1.6   Home Page