<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading shared libraries using pstat_getprocvm() call in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149867#M90622</link>
    <description>Yes, you can use pstat_getprocvm() to get the virtual objects affiliated with a process... that's rather what it is there for, after all.&lt;BR /&gt;&lt;BR /&gt;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().</description>
    <pubDate>Mon, 25 Feb 2008 12:07:35 GMT</pubDate>
    <dc:creator>Don Morris_1</dc:creator>
    <dc:date>2008-02-25T12:07:35Z</dc:date>
    <item>
      <title>Reading shared libraries using pstat_getprocvm() call</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149866#M90621</link>
      <description>&lt;!--!*#--&gt;
&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S.This thread has been moved from HP-UX&amp;gt;System Administration to HP-UX &amp;gt; languages- HP Forums Moderator&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jan 2013 03:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149866#M90621</guid>
      <dc:creator>sanjay khuntia</dc:creator>
      <dc:date>2013-01-02T03:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shared libraries using pstat_getprocvm() call</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149867#M90622</link>
      <description>Yes, you can use pstat_getprocvm() to get the virtual objects affiliated with a process... that's rather what it is there for, after all.&lt;BR /&gt;&lt;BR /&gt;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().</description>
      <pubDate>Mon, 25 Feb 2008 12:07:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149867#M90622</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-25T12:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shared libraries using pstat_getprocvm() call</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149868#M90623</link>
      <description>Firstly I want to get the address space of the process (may be a file) and then I want the offset where the dynamically linked libraries are listed.</description>
      <pubDate>Mon, 25 Feb 2008 13:01:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149868#M90623</guid>
      <dc:creator>sanjay khuntia</dc:creator>
      <dc:date>2008-02-25T13:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shared libraries using pstat_getprocvm() call</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149869#M90624</link>
      <description>Ok, and that's what pstat_getprocvm() *does*. It walks the virtual objects in the process virtual address space and returns properties for each one. You have to iterate to find the shared libraries -- there may not be any particular offset they start from [MPAS processes], and they will almost certainly be mixed in with other shared objects. Just note the virtual addresses [aka offset within the process virtual address space] as needed when you encounter the shared libraries on the iteration.&lt;BR /&gt;&lt;BR /&gt;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].</description>
      <pubDate>Mon, 25 Feb 2008 16:39:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149869#M90624</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-25T16:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading shared libraries using pstat_getprocvm() call</title>
      <link>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149870#M90625</link>
      <description>&lt;P&gt;&amp;gt;I'm trying to write a program similar to the ldd command.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Of course on 11.31, pstack(1) handles this fine.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;then I want the offset where the dynamically linked libraries are listed.&lt;BR /&gt;&lt;BR /&gt;This is not available. Only dld knows where this is. You would have to use dlmodinfo(3C) and ttrace(2).&lt;BR /&gt;See your other topics:&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/sl-listing-per-process/m-p/4148219" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/sl-listing-per-process/m-p/4148219&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/listing-all-sl-files-related-to-a-process/m-p/4148866" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/listing-all-sl-files-related-to-a-process/m-p/4148866&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 20:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/reading-shared-libraries-using-pstat-getprocvm-call/m-p/4149870#M90625</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-07-30T20:47:36Z</dc:date>
    </item>
  </channel>
</rss>

