×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

retrieve environment variables for an arbitrary process

retrieve environment variables for an arbitrary process

retrieve environment variables for an arbitrary process

(OP)
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.

RE: retrieve environment variables for an arbitrary process

(OP)
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.

RE: retrieve environment variables for an arbitrary process

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

RE: retrieve environment variables for an arbitrary process

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close