HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to determine the environment of an already run...
Operating System - HP-UX
1842317
Members
2804
Online
110188
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2007 06:45 AM
07-12-2007 06:45 AM
How to determine the environment of an already running process?
Can be done with berkley ps on Solaris - how to do it on HP-UX?
Can't be truss - as that needs to be launched prior to the command.
Thanks...Geoff
Can't be truss - as that needs to be launched prior to the command.
Thanks...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2007 07:47 AM
07-12-2007 07:47 AM
Re: How to determine the environment of an already running process?
Geoff,
No real answer for you, but I remembered, and found, a similar thread from a couple of months ago.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1116594
Patrick
No real answer for you, but I remembered, and found, a similar thread from a couple of months ago.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1116594
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2007 08:22 AM
07-12-2007 08:22 AM
Re: How to determine the environment of an already running process?
This is one of those "it depends" questions. It depends upon whether you have gdb on your box and whether the executable has been stripped (of symbols).
Execute "nm /xxx/yyy/myprog
If you see "no symbols" then Stop. Go Directly to jail. Do not pass Go. Do not collect $200.
If you are still executing at this point then determine the PID (e.g. 12345) of the process (myprog):
gdb /xxx/yyy/myprog 12345
set variable $q = (char **) environ
while *$q
print *$q++
end
Execute "nm /xxx/yyy/myprog
If you see "no symbols" then Stop. Go Directly to jail. Do not pass Go. Do not collect $200.
If you are still executing at this point then determine the PID (e.g. 12345) of the process (myprog):
gdb /xxx/yyy/myprog 12345
set variable $q = (char **) environ
while *$q
print *$q++
end
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP