<?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: process info. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895189#M96543</link>
    <description>hi,&lt;BR /&gt;&lt;BR /&gt;you may also have a look at "lsof"&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeerah</description>
    <pubDate>Thu, 09 Nov 2006 04:01:09 GMT</pubDate>
    <dc:creator>Yogeeraj_1</dc:creator>
    <dc:date>2006-11-09T04:01:09Z</dc:date>
    <item>
      <title>process info.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895187#M96541</link>
      <description>Can any one tell how to get process name from process id in HP. which field give this information.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int main( argc, argv )&lt;BR /&gt;int     argc;&lt;BR /&gt;char**  argv;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;    struct pst_status   buf;&lt;BR /&gt;    size_t              psize;&lt;BR /&gt;    size_t              count;&lt;BR /&gt;    int                 index;&lt;BR /&gt;&lt;BR /&gt;    index = getppid();&lt;BR /&gt;    psize = sizeof( struct pst_status );&lt;BR /&gt;    count = 0;&lt;BR /&gt;&lt;BR /&gt;    if ( pstat_getproc( &amp;amp;buf, psize, 0, index ) &amp;lt; 0 ) {&lt;BR /&gt;&lt;BR /&gt;        perror( "pstat_getproc" );&lt;BR /&gt;        return -1;&lt;BR /&gt;&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;    printf( " Information  %s\n", buf.u_comm);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;    return 0;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;/SYS&gt;&lt;/SYS&gt;&lt;/UNISTD.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 09 Nov 2006 03:53:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895187#M96541</guid>
      <dc:creator>RobertClark</dc:creator>
      <dc:date>2006-11-09T03:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: process info.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895188#M96542</link>
      <description>Robert,&lt;BR /&gt;may I suggest you reward the efforts of the people helping with your questions:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Your profiles shows you have not allocated points to any of the answers to your questions!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This thread may help with your current question:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=195283" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=195283&lt;/A&gt;</description>
      <pubDate>Thu, 09 Nov 2006 03:58:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895188#M96542</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-11-09T03:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: process info.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895189#M96543</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;you may also have a look at "lsof"&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeerah</description>
      <pubDate>Thu, 09 Nov 2006 04:01:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895189#M96543</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2006-11-09T04:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: process info.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895190#M96544</link>
      <description>Looks like you mislabeled you name&lt;BR /&gt;buf.u_comm should be buf.pst_ucomm&lt;BR /&gt;&lt;BR /&gt;I made a few changes but not many, I was able to compile and run the following: &lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;&lt;BR /&gt;main(argc, argv)&lt;BR /&gt;int argc ;&lt;BR /&gt;char **argv ;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;        struct pst_status buf;&lt;BR /&gt;&lt;BR /&gt;        size_t psize;&lt;BR /&gt;        size_t count;&lt;BR /&gt;        int index;&lt;BR /&gt;&lt;BR /&gt;        index= (int) getppid();&lt;BR /&gt;        count=0;&lt;BR /&gt;        if  (pstat_getproc(&amp;amp;buf,sizeof(buf), (size_t)0,index) != -1)&lt;BR /&gt;        {&lt;BR /&gt;                (void) printf("Information Process id: %d Program Name:  %s\n", index, buf.pst_ucomm);&lt;BR /&gt;        }&lt;BR /&gt;        else {&lt;BR /&gt;        (void)  perror("pstat_getpoc");&lt;BR /&gt;                return -1;&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;        return(0) ;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SYS&gt;&lt;/SYS&gt;&lt;/UNISTD.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 10 Nov 2006 07:37:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-info/m-p/3895190#M96544</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2006-11-10T07:37:48Z</dc:date>
    </item>
  </channel>
</rss>

