<?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 pstat_getproc() in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615880#M726058</link>
    <description>I have a C program that uses pstat_getproc to get process information of everything that is running on an HP-UX 11.00 system.  &lt;BR /&gt;&lt;BR /&gt;I am trying to convert this to run on Linux. Does anyone know what the equivelant is on Linux?  Or where I can find documentation on the API interface for the "ps" command.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;--Keith</description>
    <pubDate>Fri, 16 Nov 2001 20:02:08 GMT</pubDate>
    <dc:creator>Keith Curnow</dc:creator>
    <dc:date>2001-11-16T20:02:08Z</dc:date>
    <item>
      <title>pstat_getproc()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615880#M726058</link>
      <description>I have a C program that uses pstat_getproc to get process information of everything that is running on an HP-UX 11.00 system.  &lt;BR /&gt;&lt;BR /&gt;I am trying to convert this to run on Linux. Does anyone know what the equivelant is on Linux?  Or where I can find documentation on the API interface for the "ps" command.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;--Keith</description>
      <pubDate>Fri, 16 Nov 2001 20:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615880#M726058</guid>
      <dc:creator>Keith Curnow</dc:creator>
      <dc:date>2001-11-16T20:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: pstat_getproc()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615881#M726059</link>
      <description>I'm not sure how this helps:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://web.mit.edu/afs/sipb.mit.edu/project/sipbsrc/linux/skill-3.7/getproc.c" target="_blank"&gt;http://web.mit.edu/afs/sipb.mit.edu/project/sipbsrc/linux/skill-3.7/getproc.c&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Fri, 16 Nov 2001 20:23:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615881#M726059</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-11-16T20:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: pstat_getproc()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615882#M726060</link>
      <description>Most of that information is gathered by catting files in the /proc filesystem.  There is a LPK (Linux Porting Kit) on HP's Devresources site:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://devresource.hp.com/LPK/docs/portguideparisc.pdf" target="_blank"&gt;http://devresource.hp.com/LPK/docs/portguideparisc.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;which might be of some help.  I believe they talk about portin from Linux to HP but the information is probably relavent going the other way.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Fri, 16 Nov 2001 20:24:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615882#M726060</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-11-16T20:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: pstat_getproc()</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615883#M726061</link>
      <description>Here's an example from sendmail:&lt;BR /&gt;/*&lt;BR /&gt;**  Read /proc/loadavg for the load average.  This is assumed to be&lt;BR /&gt;**  in a format like "0.15 0.12 0.06".&lt;BR /&gt;**&lt;BR /&gt;**      Initially intended for Linux.  This has been in the kernel&lt;BR /&gt;**      since at least 0.99.15.&lt;BR /&gt;*/&lt;BR /&gt;&lt;BR /&gt;# ifndef _PATH_LOADAVG&lt;BR /&gt;#  define _PATH_LOADAVG "/proc/loadavg"&lt;BR /&gt;# endif&lt;BR /&gt;&lt;BR /&gt;int&lt;BR /&gt;getla()&lt;BR /&gt;{&lt;BR /&gt;        double avenrun;&lt;BR /&gt;        register int result;&lt;BR /&gt;        FILE *fp;&lt;BR /&gt;&lt;BR /&gt;        fp = fopen(_PATH_LOADAVG, "r");&lt;BR /&gt;        if (fp == NULL)&lt;BR /&gt;        {&lt;BR /&gt;                if (tTd(3, 1))&lt;BR /&gt;                        printf("getla: fopen(%s): %s\n",&lt;BR /&gt;                                _PATH_LOADAVG, errstring(errno));&lt;BR /&gt;                return -1;&lt;BR /&gt;        }&lt;BR /&gt;        result = fscanf(fp, "%lf", &amp;amp;avenrun);&lt;BR /&gt;        fclose(fp);&lt;BR /&gt;        if (result != 1)&lt;BR /&gt;        {&lt;BR /&gt;                if (tTd(3, 1))&lt;BR /&gt;                        printf("getla: fscanf() = %d: %s\n",&lt;BR /&gt;                                result, errstring(errno));&lt;BR /&gt;                return -1;&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;        if (tTd(3, 1))&lt;BR /&gt;                printf("getla(): %.2f\n", avenrun);&lt;BR /&gt;&lt;BR /&gt;        return ((int) (avenrun + 0.5));&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Nov 2001 22:30:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pstat-getproc/m-p/2615883#M726061</guid>
      <dc:creator>Christopher Caldwell</dc:creator>
      <dc:date>2001-11-16T22:30:33Z</dc:date>
    </item>
  </channel>
</rss>

