Sunday, 14 October 2007

How to get environment variables for a process

Ever wondered how to find out what environment variables the process is running with? Well, it is remarkably easy with pargs utility on Solaris, just give it a "-e" argument to force it to produce environment variables:

pargs -e
Comes handy when troubleshooting processes that rely on environment variables for various functions.