<?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 PID Number in the TOP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027189#M429962</link>
    <description>Hello experts!&lt;BR /&gt;&lt;BR /&gt;I'm using HPUX 11i.&lt;BR /&gt;&lt;BR /&gt;Please I would like to know how can I get the PID number in the TOP... For example&lt;BR /&gt;&lt;BR /&gt;host:&amp;gt; top -h&lt;BR /&gt;&lt;BR /&gt;CPU TTY     PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU&lt;BR /&gt; 3   ?    13538 oracle9i 154 20   643M  7764K sleep    0:40  4.98  4.97 oracledbscmdes&lt;BR /&gt; 1   ?     5819 root     154 20  9632K  2848K sleep 1514:55  3.17  3.16 cupsd&lt;BR /&gt; 0   ?     7125 root     154 20 12024K  3140K sleep  433:13  2.90  2.89 netmon&lt;BR /&gt; 0   ?    29685 oracle9i 154 20   800M  1788K sleep   33:15  2.36  2.36 oracledbslade1&lt;BR /&gt;&lt;BR /&gt;In this case I need the 13538 PID number!&lt;BR /&gt;By command line is it possible to get this PID number?&lt;BR /&gt;&lt;BR /&gt;Please, could someone give me a help?&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
    <pubDate>Wed, 07 Feb 2007 12:00:19 GMT</pubDate>
    <dc:creator>clefeitosa</dc:creator>
    <dc:date>2007-02-07T12:00:19Z</dc:date>
    <item>
      <title>PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027189#M429962</link>
      <description>Hello experts!&lt;BR /&gt;&lt;BR /&gt;I'm using HPUX 11i.&lt;BR /&gt;&lt;BR /&gt;Please I would like to know how can I get the PID number in the TOP... For example&lt;BR /&gt;&lt;BR /&gt;host:&amp;gt; top -h&lt;BR /&gt;&lt;BR /&gt;CPU TTY     PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU&lt;BR /&gt; 3   ?    13538 oracle9i 154 20   643M  7764K sleep    0:40  4.98  4.97 oracledbscmdes&lt;BR /&gt; 1   ?     5819 root     154 20  9632K  2848K sleep 1514:55  3.17  3.16 cupsd&lt;BR /&gt; 0   ?     7125 root     154 20 12024K  3140K sleep  433:13  2.90  2.89 netmon&lt;BR /&gt; 0   ?    29685 oracle9i 154 20   800M  1788K sleep   33:15  2.36  2.36 oracledbslade1&lt;BR /&gt;&lt;BR /&gt;In this case I need the 13538 PID number!&lt;BR /&gt;By command line is it possible to get this PID number?&lt;BR /&gt;&lt;BR /&gt;Please, could someone give me a help?&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 07 Feb 2007 12:00:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027189#M429962</guid>
      <dc:creator>clefeitosa</dc:creator>
      <dc:date>2007-02-07T12:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027190#M429963</link>
      <description>You can use top -f filename to output to a file and then use awk to extract the PID's.</description>
      <pubDate>Wed, 07 Feb 2007 12:09:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027190#M429963</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-02-07T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027191#M429964</link>
      <description>Thanks for reply!&lt;BR /&gt;&lt;BR /&gt;Sorry, but could you show an example because my problem is exactly this... I'm not obtaining to extract the first PID on the TOP...&lt;BR /&gt;&lt;BR /&gt;Thanks!!!!</description>
      <pubDate>Wed, 07 Feb 2007 12:28:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027191#M429964</guid>
      <dc:creator>clefeitosa</dc:creator>
      <dc:date>2007-02-07T12:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027192#M429965</link>
      <description>Unless I'm missing something, the -f switch adds nothing  to the normal display, it just redirects the output to a file.  The only way I know of to get the parent is to select the process you are interested in from the top output and then run ps against it:&lt;BR /&gt;&lt;BR /&gt;ps -ef |grep 13538&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 07 Feb 2007 12:33:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027192#M429965</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-02-07T12:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027193#M429966</link>
      <description>Ahhh, that's where the confusion is coming from.  I think the author means PPID of the PID in question!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 07 Feb 2007 12:36:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027193#M429966</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-02-07T12:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027194#M429967</link>
      <description>&lt;BR /&gt;Hi clefeitosa:&lt;BR /&gt;&lt;BR /&gt;You could open the file and remove all the lines until PID inclusive, save the file and then execute:&lt;BR /&gt;&lt;BR /&gt;cat &lt;RESULTS_FILE&gt; | awk -F" " '{print $2}'&lt;/RESULTS_FILE&gt;</description>
      <pubDate>Wed, 07 Feb 2007 12:37:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027194#M429967</guid>
      <dc:creator>Ignacio Javier</dc:creator>
      <dc:date>2007-02-07T12:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027195#M429968</link>
      <description>The other thing that -f does is NOT SEND terminal escape sequences that you definitely don't want in your output when you are trying to parse it.</description>
      <pubDate>Wed, 07 Feb 2007 12:52:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027195#M429968</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-02-07T12:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027196#M429969</link>
      <description>Or, 'ps -ef |grep 13538'</description>
      <pubDate>Wed, 07 Feb 2007 13:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027196#M429969</guid>
      <dc:creator>Scot Bean</dc:creator>
      <dc:date>2007-02-07T13:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027197#M429970</link>
      <description>Instead of using grep with ps, you can do it directly:  ps -fp 13538&lt;BR /&gt;&lt;BR /&gt;But grep will find the children of that PID.</description>
      <pubDate>Thu, 08 Feb 2007 02:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027197#M429970</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-08T02:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027198#M429971</link>
      <description>Hi,&lt;BR /&gt;top -h -f top.out&lt;BR /&gt;awk 'NF&amp;gt;12&amp;amp;&amp;amp;!/^CPU/ {print $3}' top.out &lt;BR /&gt;&lt;BR /&gt;This to have all the PID, if you want only the first:&lt;BR /&gt;awk 'NF&amp;gt;12&amp;amp;&amp;amp;!/^CPU/ {print $3}' top.out|head -1&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 08 Feb 2007 04:50:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027198#M429971</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-02-08T04:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027199#M429972</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;Thanks everbody for all answers!!!&lt;BR /&gt;&lt;BR /&gt;Arturo,&lt;BR /&gt;&lt;BR /&gt;I liked your tips but happens:&lt;BR /&gt;&lt;BR /&gt;host:~&amp;gt;  top -h -f top.out&lt;BR /&gt;host:~&amp;gt;awk 'NF&amp;gt;12&amp;amp;&amp;amp;!/^CPU/ {print $3}' top.out | head -1&lt;BR /&gt;/: Event not found.&lt;BR /&gt;&lt;BR /&gt;Do you know why this happens (Event not found)&lt;BR /&gt;&lt;BR /&gt;Please, could you explain what means the parameters "NF&amp;gt;12&amp;amp;&amp;amp;!/^CPU/" because I didn't understand.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!</description>
      <pubDate>Thu, 08 Feb 2007 05:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027199#M429972</guid>
      <dc:creator>clefeitosa</dc:creator>
      <dc:date>2007-02-08T05:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027200#M429973</link>
      <description>&amp;gt;Do you know why this happens (Event not found)&lt;BR /&gt;&lt;BR /&gt;Is this in the file top.out?  Or from awk?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;could you explain what means the parameters "NF&amp;gt;12&amp;amp;&amp;amp;!/^CPU/"&lt;BR /&gt;&lt;BR /&gt;For all lines that have more than 12 fields and don't have the string "CPU" starting in column 1.</description>
      <pubDate>Thu, 08 Feb 2007 06:08:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027200#M429973</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-08T06:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027201#M429974</link>
      <description>&amp;gt;Do you know why this happens (Event not found)&lt;BR /&gt;&lt;BR /&gt;Ah!  Are you using the scummy C shell?&lt;BR /&gt;&lt;BR /&gt;This occurs because of the !/, even in single quotes.  You can suppress it by going to a real shell or in this case by adding a space between ! and /.  Or you can quote it:&lt;BR /&gt;% echo '\!/'&lt;BR /&gt;!/</description>
      <pubDate>Thu, 08 Feb 2007 06:13:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027201#M429974</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-08T06:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027202#M429975</link>
      <description>Very nice!!!!&lt;BR /&gt;&lt;BR /&gt;Success using the command:&lt;BR /&gt;awk 'NF&amp;gt;12&amp;amp;&amp;amp; ! / ^CPU / {print $3}' top.out | head -1 (Thanks Arturo e Dennis)&lt;BR /&gt;&lt;BR /&gt;One last question... Using the above command I received the result:&lt;BR /&gt;PID&lt;BR /&gt;&lt;BR /&gt;If I use with ... | head -2 I receive the result:&lt;BR /&gt;PID&lt;BR /&gt;13538&lt;BR /&gt;&lt;BR /&gt;How can I get only 13538?? Is it possible?&lt;BR /&gt;&lt;BR /&gt;Sorry for many questions....&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Thu, 08 Feb 2007 06:34:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027202#M429975</guid>
      <dc:creator>clefeitosa</dc:creator>
      <dc:date>2007-02-08T06:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027203#M429976</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;you could add to the sentence, "| grep -v PID"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 08 Feb 2007 06:41:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027203#M429976</guid>
      <dc:creator>Ignacio Javier</dc:creator>
      <dc:date>2007-02-08T06:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027204#M429977</link>
      <description>&amp;gt;Using the above command I received the result:&lt;BR /&gt;PID&lt;BR /&gt;&lt;BR /&gt;You added too many spaces.  You should not have fiddled with the /^CPU/.  Treat that if it was in quotes.  (That is a regular expression matching expression.)&lt;BR /&gt;% awk 'NF&amp;gt;12 &amp;amp;&amp;amp; ! /^CPU/ {print $3}' top.out | head -1</description>
      <pubDate>Thu, 08 Feb 2007 06:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027204#M429977</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-08T06:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: PID Number in the TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027205#M429978</link>
      <description>Dennis,&lt;BR /&gt;&lt;BR /&gt;Thank you very much!!!!!&lt;BR /&gt;You all right...&lt;BR /&gt;&lt;BR /&gt;Thanks everbody!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;clefeitosa!</description>
      <pubDate>Thu, 08 Feb 2007 07:33:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pid-number-in-the-top/m-p/5027205#M429978</guid>
      <dc:creator>clefeitosa</dc:creator>
      <dc:date>2007-02-08T07:33:33Z</dc:date>
    </item>
  </channel>
</rss>

