<?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 Receive processes list from С code in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670693#M102746</link>
    <description>Hi.&lt;BR /&gt;How can i receive current processes list (like as 'ps') from my application. I know how use pstat() system call, but it not show info about all processes at one time.</description>
    <pubDate>Mon, 14 Nov 2005 00:44:22 GMT</pubDate>
    <dc:creator>Vadim Yezhakov</dc:creator>
    <dc:date>2005-11-14T00:44:22Z</dc:date>
    <item>
      <title>Receive processes list from С code</title>
      <link>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670693#M102746</link>
      <description>Hi.&lt;BR /&gt;How can i receive current processes list (like as 'ps') from my application. I know how use pstat() system call, but it not show info about all processes at one time.</description>
      <pubDate>Mon, 14 Nov 2005 00:44:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670693#M102746</guid>
      <dc:creator>Vadim Yezhakov</dc:creator>
      <dc:date>2005-11-14T00:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Receive processes list from С code</title>
      <link>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670694#M102747</link>
      <description>see pstat(2) man page. Several example are there with code in the man page itself.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Mon, 14 Nov 2005 00:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670694#M102747</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-14T00:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Receive processes list from С code</title>
      <link>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670695#M102748</link>
      <description>Thanks :)&lt;BR /&gt;&lt;BR /&gt;I thinked, that pstat_getproc() return info about process from with it was called.&lt;BR /&gt;&lt;BR /&gt;It was incorrect meaning.&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Nov 2005 02:52:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670695#M102748</guid>
      <dc:creator>Vadim Yezhakov</dc:creator>
      <dc:date>2005-11-14T02:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Receive processes list from С code</title>
      <link>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670696#M102749</link>
      <description>Vadim,&lt;BR /&gt;&lt;BR /&gt;Long time ago I cheated because the PS structure had changed between OS's. &lt;BR /&gt;So I used popen() and put the output into a structure. I then parsed the results.&lt;BR /&gt;Attached is sample program that walks the process tree showing parent and childern. &lt;BR /&gt;&lt;BR /&gt;pswalk PID&lt;BR /&gt;&lt;BR /&gt;try a couple PID's  if the Number is to low&lt;BR /&gt;like the parent PID of inetd, It would be able to walk up the very far. &lt;BR /&gt;&lt;BR /&gt;I see a problem with the one define:&lt;BR /&gt;#define CMD "ps -fe|grep -v STIME"  &lt;BR /&gt;&lt;BR /&gt;The ps and grep, should have a full path name.&lt;BR /&gt;&lt;BR /&gt;Rory&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Nov 2005 21:17:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/receive-processes-list-from-%D1%81-code/m-p/3670696#M102749</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2005-11-14T21:17:29Z</dc:date>
    </item>
  </channel>
</rss>

