A service behaves differently from my shell, and I want to see the variables it was started with.
tr '\0' '\n' < /proc/$(pgrep -o nginx)/environ | sort
The environment is stored in /proc/PID/environ as entries separated by NUL bytes, so tr turns them into lines. You can read it for your own processes, and for others as root. The file shows the environment at the time the process started. Changes the program made later with setenv do not appear.
Further reading: proc_pid_environ manual page