<?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: Getting detailed process info in C program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039656#M491163</link>
    <description>&lt;P&gt;I'll have to look into the tusc utility.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the pstat_*() system calls is exactly what I was looking for.&amp;nbsp; Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2019 22:29:52 GMT</pubDate>
    <dc:creator>savage54</dc:creator>
    <dc:date>2019-03-25T22:29:52Z</dc:date>
    <item>
      <title>Getting detailed process info in C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039612#M491159</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;First post here, so if I'm in the wrong location, please redirect me to the correct one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our system is an older PA-RISC 9000/800 rp4440 running 64 bit HP-UX 11.31.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to locate the system calls that provide access to the detailed process information that 'ps' displays.&amp;nbsp; I have found the getpid() and getppid() calls, but those only provide PID and parent PID.&amp;nbsp; I'm wanting to see additional information such as the userid associated with the PID and/or PPID, as well as the extended command line that a process, or its parent, or its grandparent is executing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that some (all?) of these calls might require elevated privileges.&amp;nbsp; That is not a problem, the C program that I'm writing will be able to do setresuid() to root if necessary prior to executing the calls to get this information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know the correct system calls must be out there somewhere, probably in section 2 or maybe section 3 of the man pages, but I haven't spotted them yet.&amp;nbsp; Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 16:33:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039612#M491159</guid>
      <dc:creator>savage54</dc:creator>
      <dc:date>2019-03-25T16:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Getting detailed process info in C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039615#M491160</link>
      <description>&lt;P&gt;I think the pstat(2) man page will help.&lt;/P&gt;&lt;P&gt;You can also use the "tusc" command to trace the system calls of a process.&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g. "tusc -o /tmp/ps_tusc.txt ps"&lt;/P&gt;&lt;P&gt;This will run "ps" and trace the system-calls into /tmp/ps_tusc.txt".&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 16:46:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039615#M491160</guid>
      <dc:creator>Bertram Stoeckler</dc:creator>
      <dc:date>2019-03-25T16:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting detailed process info in C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039623#M491161</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I will look into the pstat() family of calls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And thank you also for the tusc command. I was familiar with strace on Linux and was surprised that I couldn't find an equivalent in HP-UX.&amp;nbsp; I tried to run 'man tusc' and got a 'No manual entry for tusc.'&amp;nbsp; Can you tell me what section of man it would normally be in?&amp;nbsp; Or where I might find it on the system?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 17:27:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039623#M491161</guid>
      <dc:creator>savage54</dc:creator>
      <dc:date>2019-03-25T17:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Getting detailed process info in C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039624#M491162</link>
      <description>&lt;P&gt;I think the tusc-tool was never part of the official OS. Not sure.&lt;/P&gt;&lt;P&gt;You can download it from :&lt;/P&gt;&lt;P&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-8.1/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-8.1/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 17:38:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039624#M491162</guid>
      <dc:creator>Bertram Stoeckler</dc:creator>
      <dc:date>2019-03-25T17:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting detailed process info in C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039656#M491163</link>
      <description>&lt;P&gt;I'll have to look into the tusc utility.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the pstat_*() system calls is exactly what I was looking for.&amp;nbsp; Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 22:29:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-detailed-process-info-in-c-program/m-p/7039656#M491163</guid>
      <dc:creator>savage54</dc:creator>
      <dc:date>2019-03-25T22:29:52Z</dc:date>
    </item>
  </channel>
</rss>

