Today I was trying to debug an issue where a process was not picking up the correct environmental variable. It took us hours before we realized that it wasn't picking up the correct variable.
I tried to list them using the solution here: https://serverfault.com/a/104175/90224 (ps eww [pid]
), but it seems to have a character limit of something like 3155 characters, which is not even close to enough for the particular application. (It's not even done printing the command line options at that point)
Is there another method I can use on AIX to find it?
I am a software developer, so I wouldn't mind a solution requiring a bit of code either.
Best Answer
Well, with one more
w
you should get it all according to the man page:That's a pretty big limit.
If you're looking at creating yourself tools for this, you should look into the
getevars
andgeteargs
functions whichps
uses for theewww
display.Here's a naïve usage of
getevars
, prints its own environment (limit ~1Mb):