<?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: Trap the process id in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531174#M869161</link>
    <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Let me take an example and state out the question clearly.&lt;BR /&gt;If I bring up Informix database by command oninit, it will fork several oninit processes as well. Can I capture the process id of those child processes.&lt;BR /&gt;&lt;BR /&gt;informix  5182     1 28 16:49:18 ? 0:00 oninit&lt;BR /&gt;informix  5183  5182  0 16:49:18 ? 0:00 oninit&lt;BR /&gt;informix  5184  5182 76 16:49:18 ? 0:01 oninit&lt;BR /&gt;informix  5185  5184  0 16:49:18 ? 0:00 oninit&lt;BR /&gt;informix  5186  5184  0 16:49:19 ? 0:00 oninit&lt;BR /&gt;informix  5187  5182  0 16:49:20 ? 0:00 oninit&lt;BR /&gt;informix  5188  5184  0 16:49:21 ? 0:00 oninit&lt;BR /&gt;informix  5189  5184  0 16:49:22 ? 0:00 oninit&lt;BR /&gt;&lt;BR /&gt;In this example, how can I get the process id 5182 to 5189.&lt;BR /&gt;&lt;BR /&gt;Many thanks,&lt;BR /&gt;Patrick</description>
    <pubDate>Wed, 23 May 2001 05:28:44 GMT</pubDate>
    <dc:creator>Patrick Chim</dc:creator>
    <dc:date>2001-05-23T05:28:44Z</dc:date>
    <item>
      <title>Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531170#M869157</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;For example, if I run a script that will bring up the application, how can I do to capture all the processes id of the daemons which is brought up by that script ?&lt;BR /&gt;&lt;BR /&gt;Many thanks,&lt;BR /&gt;Patrick</description>
      <pubDate>Tue, 22 May 2001 07:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531170#M869157</guid>
      <dc:creator>Patrick Chim</dc:creator>
      <dc:date>2001-05-22T07:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531171#M869158</link>
      <description>&lt;BR /&gt;A properly written deamon will parent itself to PID=1 so thats not going to help you. But check anyway, with luck they will have a PPID (parent pid number) matching the process you used to start them.&lt;BR /&gt;&lt;BR /&gt;Other ways to trap them are to a date command before you start the deamons, then another at the end, and note the times, then do a ps and check the start times of all processes (STIME) belonging to that userid, and you will see those that sarted with the timeframe of your date commands.</description>
      <pubDate>Tue, 22 May 2001 07:59:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531171#M869158</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-05-22T07:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531172#M869159</link>
      <description>If you try to get PIDs you run in background:&lt;BR /&gt;&lt;BR /&gt;/tmp/prg1 &amp;amp;&lt;BR /&gt;PRG1_PID=$!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 May 2001 08:32:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531172#M869159</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-05-22T08:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531173#M869160</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;A quick-and-dirty method is just to call "grep" and then "awk" out the PID. E.g:&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep mydeamon | grep -v grep | awk '{print $2}'&lt;BR /&gt;&lt;BR /&gt;Its not beautiful, but it does the trick. Won't solve the PPID of 1 problem though. Some deamons also create ".PID" files when they are run.</description>
      <pubDate>Wed, 23 May 2001 05:11:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531173#M869160</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2001-05-23T05:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531174#M869161</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Let me take an example and state out the question clearly.&lt;BR /&gt;If I bring up Informix database by command oninit, it will fork several oninit processes as well. Can I capture the process id of those child processes.&lt;BR /&gt;&lt;BR /&gt;informix  5182     1 28 16:49:18 ? 0:00 oninit&lt;BR /&gt;informix  5183  5182  0 16:49:18 ? 0:00 oninit&lt;BR /&gt;informix  5184  5182 76 16:49:18 ? 0:01 oninit&lt;BR /&gt;informix  5185  5184  0 16:49:18 ? 0:00 oninit&lt;BR /&gt;informix  5186  5184  0 16:49:19 ? 0:00 oninit&lt;BR /&gt;informix  5187  5182  0 16:49:20 ? 0:00 oninit&lt;BR /&gt;informix  5188  5184  0 16:49:21 ? 0:00 oninit&lt;BR /&gt;informix  5189  5184  0 16:49:22 ? 0:00 oninit&lt;BR /&gt;&lt;BR /&gt;In this example, how can I get the process id 5182 to 5189.&lt;BR /&gt;&lt;BR /&gt;Many thanks,&lt;BR /&gt;Patrick</description>
      <pubDate>Wed, 23 May 2001 05:28:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531174#M869161</guid>
      <dc:creator>Patrick Chim</dc:creator>
      <dc:date>2001-05-23T05:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531175#M869162</link>
      <description>&lt;BR /&gt;Perhaps informix set process group, Try :&lt;BR /&gt;&lt;BR /&gt;ps -fg 5182&lt;BR /&gt;&lt;BR /&gt;See man ps.</description>
      <pubDate>Wed, 23 May 2001 06:12:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531175#M869162</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-05-23T06:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531176#M869163</link>
      <description>Carlos,&lt;BR /&gt;&lt;BR /&gt;It works fine. But how can I know the pid is 5182. Can I grep this pid after I issue the command ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Patrick</description>
      <pubDate>Wed, 23 May 2001 06:36:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531176#M869163</guid>
      <dc:creator>Patrick Chim</dc:creator>
      <dc:date>2001-05-23T06:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trap the process id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531177#M869164</link>
      <description>MASTER=$(ps -aef | grep oninit | awk ' $3 == 1 { print $2; exit}')&lt;BR /&gt;&lt;BR /&gt;ps -fg $MASTER &lt;BR /&gt;&lt;BR /&gt;?????</description>
      <pubDate>Wed, 23 May 2001 06:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trap-the-process-id/m-p/2531177#M869164</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-05-23T06:56:49Z</dc:date>
    </item>
  </channel>
</rss>

