Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve environment variables for an arbitrary process

Status
Not open for further replies.

goBoating

Programmer
Feb 8, 2000
1,606
0
0
US
More of a Perl programmer than HP-UX Sys Admin.

There are a few posts related to this, but, none of the answer work for me, yet.

I am in the situation of determining security compliance for a number of machines. The rule set I must check includes checking the environment variables for arbitrary processes. I don't know what process will be the target until the rule is read. So, I must collect the environment vars for a given process on the fly.

On other operating systems, this is trivial. I don't see a direct way to do it on HP-UX. I'm usually on 11.31, but, this chore needs to work on recent versions of HP-UX.

I hoped pstat_getproc would work, but, it does not return what would be considered the env vars.

Ideas?


'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Apparently, this is not possible without employing a tool like the Gnu Debugger or similar or rewriting that functionality.



'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
goBoating,
did you check out the unix scripting forum?
there may be some ideas there.
Been almost a decade since i was on an hp-ux box and don't have one at the moment to test on.
hth.
regards,
longhair
 
Thanks for the prompt, but, I've posted this same question to several HPUX specific fora (including on hp.com) and get the same answer. Have also spent a fair amount of time in white papers and man pages to no avail. HPUX doesn't do that trick with out something like GDB.

Thanks, anyway.


'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top