.TH PROCENV "1" "2013-07-16" "User Commands" .\" .SH NAME procenv \- display process environment details .\" Macros .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" .SH SYNOPSIS .B procenv [\fIOPTION\fR] .\" .SH DESCRIPTION Display details of the process environment in a parseable format. .\" .SH OPTIONS .\" .TP \fB\-a\fR, \fB\-\-meta\fR Display meta details. .\" .TP \fB\-A\fR, \fB\-\-arguments\fR Display program arguments. .\" .TP \fB\-b\fR, \fB\-\-libs\fR Display library details. See .BR dl_iterate_phdr (3) "" . .\" .TP \fB\-c\fR, \fB\-\-cgroup[s]\fR Display cgroup details (Linux only). See .BR proc (5) "" . .HP \fB\-d\fR, \fB\-\-compiler\fR Display compiler details. See .BR cpp (1) "" ", " cc (1) "" " and " feature_test_macros (7) "" " (Linux)." .\" .TP \fB\-e\fR, \fB\-\-env[ironment]\fR Display environment variables. See .BR environ (7) "" . .\" .TP \fB\-\-exec\fR Treat non-option arguments as program to execute after running \fBprocenv\fR. See .BR exec (3) "" . .\" .TP \fB\-f\fR, \fB\-\-fds\fR Display file descriptor details. See .BR fcntl (2) "" " and " isatty (5) "" . .\" .TP \fB\-\-file=\fR\fIFILE\fR Send output to file \fIFILE\fR (implies \fB\-\-output=file\fR). .PP .\" .TP \fB\-g\fR, \fB\-\-sizeof\fR Display sizes of data types. .\" .TP \fB\-h\fR, \fB\-\-help\fR This help text. .\" .TP \fB\-i\fR, \fB\-\-misc\fR Display miscellaneous details. See .BR umask (P) "" ", " .BR getcwd (3) "" ", " .BR proc (5) "" ", " .BR prctl (2) "" ", " .BR aa_getcon (2) "" " (Linux), " .BR getpidcon (3) "" " (Linux), " .BR sched_getcpu (3) "" " (Linux), " .BR sysconf (3) "" ", " .BR kvm_getprocs (3) "" " (BSD), " .BR getpriority (2) "" " and " .BR getpagesize (2) "" . .\" .TP \fB\-j\fR, \fB\-\-uname\fR Display uname details. See .BR uname (2) "" . .\" .TP \fB\-k\fR, \fB\-\-clock[s]\fR Display clock details. See .BR clock_getres (2) "" . .\" .TP \fB\-l\fR, \fB\-\-limits\fR Display limits. See .BR getrlimit (2) "" . .\" .TP \fB\-L\fR, \fB\-\-locale\fR Display locale details. See .BR setlocale (3) "" " and " locale (7) "" . .\" .TP \fB\-m\fR, \fB\-\-mount[s]\fR Display mount details. See .BR getmntent (3) "" " and " statfs (2) "" " (Linux), and " getmntinfo (3) "" " (BSD)." .PP .\" .TP \fB\-n\fR, \fB\-\-confstr\fR Display confstr details. See .BR confstr (5) "" . .PP .\" .TP \fB\-N\fR, \fB\-\-network\fR Display network details. See .BR getifaddrs (3) "" ", " getnameinfo (3) "" ", and " ioctl (2) " (Linux)" . .PP .\" .TP \fB\-o\fR, \fB\-\-oom\fR Display out-of-memory manager details (Linux only). See .BR proc (5) "" . .PP .\" .TP \fB\-\-output=\fR\fITYPE\fR Send output to alternative location. \fITYPE\fR can be one of: .RS .IP \(bu 4 \fIfile\fR (send output to a file). .IP \(bu 4 \fIstderr\fR (write to standard error). .IP \(bu 4 \fIstdout\fR (write to standard output (default)). .IP \(bu 4 \fIsyslog\fR (write to the system log file). .IP \(bu 4 \fIterminal\fR (write to terminal). .RE .PP .\" .TP \fB\-p\fR, \fB\-\-proc[ess]\fR Display process details. See .BR getpid (2) "" ", " .BR getppid (2) "" ", " .BR getresuid (2) "" ", " .BR getresgid (2) "" ", " .BR getuid (2) "" ", " .BR geteuid (2) "" ", " .BR getgid (2) "" ", " .BR getegid (2) "" ", " .BR getsid (2) "" ", " .BR getlogin (3) "" ", " .BR getpgrp (2) "" ", " .BR ctermid (3) "" ", " .BR tcgetpgrp (3) "" ", " .BR tcgetsid (3) "" ", " .BR getpwuid (3) "" " and " .BR getgroups (2) "" . .PP .\" .TP \fB\-P\fR, \fB\-\-platform\fR Display platform details. .\" .TP \fB\-q\fR, \fB\-\-time\fR Display time details. See .BR clock_gettime (2) "" ", " .BR localtime (3) "" " and " .BR asctime (3) "" . .PP .\" .TP \fB\-r\fR, \fB\-\-range[s]\fR Display range of data types. See .BR limits.h (P) "" . .PP .\" .TP \fB\-s\fR, \fB\-\-signal[s]\fR Display signal details. See .BR sigaction (2) "" . .PP .\" .TP \fB\-t\fR, \fB\-\-tty\fR Display terminal details. On Linux, will also show if any attributes are locked when running as .IR root "." See .BR tcgetattr (3) "" " and " "" " " tty_ioctl (4) "" " (Linux)." .PP .\" .TP \fB\-T\fR, \fB\-\-thread[s]\fR Display thread details. See .BR pthread_attr_getstacksize (3) "" ", " .BR pthread_attr_getstacksize (3) "" " and " .BR pthread_attr_getguardsize (3) "" . .PP .\" .TP \fB\-u\fR, \fB\-\-stat\fR Display stat details. See .BR stat (2) "" . .PP .\" .TP \fB\-U\fR, \fB\-\-rusage\fR Display rusage details. See .BR getrusage (2) "" . .PP .\" .TP \fB\-v\fR, \fB\-\-version\fR Display version details. .PP .\" .TP \fB\-w\fR, \fB\-\-capabilities\fR Display capability details (Linux only). See .BR prctl (2) "" . .PP .\" .TP \fB\-x\fR, \fB\-\-pathconf\fR Display pathconf details. See .BR pathconf (3) "" . .PP .\" .TP \fB\-y\fR, \fB\-\-sysconf\fR Display sysconf details. See .BR sysconf (3) "" " and " posixoptions (7) "" " (Linux)." .PP .\" .TP \fB\-z\fR, \fB\-\-timezone\fR Display timezone details. See .BR tzset (3) "" . .PP .\" .SH ENVIRONMENT VARIABLES .\" The following environment variables may be used as aliases to their command-line counterparts: .\" .TP \fBPROCENV_FILE\fR Alternative to \fB\-\-file\fR. .PP .\" .TP \fBPROCENV_EXEC\fR Alternative to \fB\-\-exec\fR. .PP .\" .TP \fBPROCENV_OUTPUT\fR Alternative to \fB\-\-output\fR. .PP .\" .SH NOTES .IP \(bu 4 Options are considered in order, so \fB\-\-output\fR should precede any other option. .IP \(bu 4 Excluding \fB\-\-exec\fR, \fB\-\-file\fR and \fB\-\-output\fR, up to one option may be provided. .IP \(bu If no option that restricts output is provided, all available information is displayed. .IP \(bu Command-line options take priority over environment variables. .IP \(bu If \fB\-\-exec\fR is specified, atleast one non-option argument must also be specified. .sp 1 .\" .SH EXAMPLES .\" .Vb \& # Show limits \& procenv \-l \& \& # Send compiler information to syslog (note the order of the options). \& procenv \-\-output=syslog \-\-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" .Ve .\" .SH LIMITATIONS .IP \(bu 4 Spaces within the value of \fBPROCENV_EXEC\fR are treated as delimiters meaning that any spaces within a string argument for example will result in incorrect behaviour. .\" .SH AUTHORS Written by James Hunt .RB < james.hunt@ubuntu.com > and Kees Cook .RB < kees@ubuntu.com > "" "." .\" .SH COPYRIGHT Copyright \(co 2012-2013 James Hunt .RB < james.hunt@ubuntu.com > and Kees Cook .RB < kees@ubuntu.com > "" "." .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .\" .SH LICENSE GNU GPL version 3 or later . .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .\" .SH SEE ALSO .BR capabilities (7) "" , .BR cc (1) "" , .BR credentials (7) "" , .BR date (1) "" , .BR env (1) "" , .BR exec (P) "" , .BR getconf (1) "" , .BR groups (1) "" , .BR ifconfig (8) "" , .BR ip (9) "" , .BR kill (1) "" , .BR ldd (1) "" , .BR locale (1) "" , .BR ls (1) "" , .BR mount (1) "" , .BR proc (5) "" , .BR ps (1) "" , .BR sh (1) "" , .BR stat (1) "" , .BR stty (1) "" , .BR umask (P) "" , .BR uname (1)