<?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 Process type ! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782860#M77660</link>
    <description>How can I judge if a process is a background process or foreground process? (Suppose the process is run by others)&lt;BR /&gt;============================&lt;BR /&gt;For example "(sleep 20)&amp;amp;" is a background process, but "sleep 20" is foreground process. But I use "ps -ef |grep sleep" just get the same result.&lt;BR /&gt;============================&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;-Gerald-&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 09 Aug 2002 04:28:54 GMT</pubDate>
    <dc:creator>Fragon</dc:creator>
    <dc:date>2002-08-09T04:28:54Z</dc:date>
    <item>
      <title>Process type !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782860#M77660</link>
      <description>How can I judge if a process is a background process or foreground process? (Suppose the process is run by others)&lt;BR /&gt;============================&lt;BR /&gt;For example "(sleep 20)&amp;amp;" is a background process, but "sleep 20" is foreground process. But I use "ps -ef |grep sleep" just get the same result.&lt;BR /&gt;============================&lt;BR /&gt;Thanks a lot.&lt;BR /&gt;&lt;BR /&gt;-Gerald-&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Aug 2002 04:28:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782860#M77660</guid>
      <dc:creator>Fragon</dc:creator>
      <dc:date>2002-08-09T04:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Process type !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782861#M77661</link>
      <description>I assume you want to identify background processes from the process table.&lt;BR /&gt;The PPID of your sleep command should be the PID of the shell that forked the sleep.&lt;BR /&gt;But this doesn't really help much.&lt;BR /&gt;It is easy though to identify background processes from the shell (or script) that is the parent.&lt;BR /&gt;A &lt;BR /&gt;&lt;BR /&gt;ps -fp $(echo $!)&lt;BR /&gt;&lt;BR /&gt;should show the process.&lt;BR /&gt;But you'd better use the jobs command (provided your shell has "set -o monitor").&lt;BR /&gt;"jobs -l"&lt;BR /&gt;gives information including the backgrounded jobs' PIDs.</description>
      <pubDate>Fri, 09 Aug 2002 05:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782861#M77661</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2002-08-09T05:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Process type !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782862#M77662</link>
      <description>A background process is still connected to its parent and still connected to its TTY.&lt;BR /&gt;It will give priority to foreground jobs and it will return your command-prompt, nothing more.&lt;BR /&gt;&lt;BR /&gt;Use "jobs -l":&lt;BR /&gt;$&amp;gt; (sleep 2000)&amp;amp;&lt;BR /&gt;[1] + 17391  Running (sleep 2000)&amp;amp;&lt;BR /&gt;$&amp;gt; jobs&lt;BR /&gt;[1] + Running (sleep 2000)&amp;amp;&lt;BR /&gt;$&amp;gt; jobs -l&lt;BR /&gt;[1] + 17391 Running (sleep 2000)&amp;amp;&lt;BR /&gt;$&amp;gt; kill 17391&lt;BR /&gt;[1] + Terminated   (sleep 2000)&amp;amp;&lt;BR /&gt;$&amp;gt; ps -ef | grep 17391&lt;BR /&gt;$&amp;gt; .. not found&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ceesjan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Aug 2002 07:36:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782862#M77662</guid>
      <dc:creator>Ceesjan van Hattum</dc:creator>
      <dc:date>2002-08-09T07:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Process type !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782863#M77663</link>
      <description>Gerald,&lt;BR /&gt;&lt;BR /&gt;I'm looking for the nice value each job is running with. The standard nice value is 20 normally used for interactive jobs run by users. If a user puts a job into the background the nice value is higher. Using ksh the nice value is 24 for background jobs, using csh I think it is 22 (instead of 20).&lt;BR /&gt;&lt;BR /&gt;The nice values can be seen with 'ps -l' or 'top' in column NI.&lt;BR /&gt;&lt;BR /&gt;But, higher nice values are just a hint that the associated job is really a background job. Users can set the nice value by their own, but, I think only very few are aware of the nice(1) command and use it, regularly. The nice command was more familiar 10 or 20 years ago, when users run huge jobs in the background but having had comparatively poor resources. So, their jobs had to be very "nice" to interactive jobs or small jobs of other users.</description>
      <pubDate>Fri, 09 Aug 2002 07:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782863#M77663</guid>
      <dc:creator>Thomas Schler_1</dc:creator>
      <dc:date>2002-08-09T07:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Process type !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782864#M77664</link>
      <description>thanks for the points, gerald.&lt;BR /&gt;Nevertheless, you do not seem to be completely satisfied on our answers to your question.&lt;BR /&gt;Please explain what you want to know else then these answers?&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Aug 2002 10:19:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-type/m-p/2782864#M77664</guid>
      <dc:creator>Ceesjan van Hattum</dc:creator>
      <dc:date>2002-08-09T10:19:03Z</dc:date>
    </item>
  </channel>
</rss>

