- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Reading shared libraries using pstat_getprocvm() c...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО02-25-2008 02:14 AM - last edited on тАО01-01-2013 07:50 PM by Cathy_xu
тАО02-25-2008 02:14 AM - last edited on тАО01-01-2013 07:50 PM by Cathy_xu
Reading shared libraries using pstat_getprocvm() call
Hi All,
I m trying to write a program similar to the ldd command. I have a list of process ids and for each of that process, I need to retrieve the list of libraries loaded for that particular process. Can we use pstat_getprocvm() to get the virtual address space of the process? What is PS_SHARED_LIBRARY in pst_vm_status.pst_flags?
P.S.This thread has been moved from HP-UX>System Administration to HP-UX > languages- HP Forums Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2008 04:07 AM
тАО02-25-2008 04:07 AM
Re: Reading shared libraries using pstat_getprocvm() call
I find myself at a bit of a loss as to your other question: "What is PS_SHARED_LIBRARY in pst_vm_status.pst_flags?". It is a flag that means that this virtual object is a Shared Library [at least as far as VM knows]. (My puzzlement stems because this verges on the really obvious, so I'm wondering if I'm missing some deeper nuance to your question). Pulling the curtain back just a little, this gets lit whenever the VM metadata describing the object has a different flag (kernel internal) which signifies the object is a shared library. That flag gets lit by either explicit kernel internal use (exec path internals) or use of MAP_SHLIB via the original mmap().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2008 05:01 AM
тАО02-25-2008 05:01 AM
Re: Reading shared libraries using pstat_getprocvm() call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2008 08:39 AM
тАО02-25-2008 08:39 AM
Re: Reading shared libraries using pstat_getprocvm() call
And I have no idea what you meant by "the process (may be a file)". Certainly the process may be backed by a binary executable or a shell script file... most are other than kernel daemons [and you can argue they're backed by /stand/vmunix anyway].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2008 01:57 PM - edited тАО07-30-2014 01:47 PM
тАО02-25-2008 01:57 PM - edited тАО07-30-2014 01:47 PM
Re: Reading shared libraries using pstat_getprocvm() call
>I'm trying to write a program similar to the ldd command.
You're trying to write a program similar to the difficulty of glance or gdb, not ldd, if you want to look at other processes.
Of course on 11.31, pstack(1) handles this fine.
>then I want the offset where the dynamically linked libraries are listed.
This is not available. Only dld knows where this is. You would have to use dlmodinfo(3C) and ttrace(2).
See your other topics:
http://h30499.www3.hp.com/t5/System-Administration/sl-listing-per-process/m-p/4148219
- Tags:
- pstack