<?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: Kill process PID using cron in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891923#M402525</link>
    <description>ps -ef | grep perl | awk '{ print $2 ; } '&lt;BR /&gt;| xargs kill -9&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"xrags" command takes all the stdin and sends it as arguments to the command, in this case "kill -9".</description>
    <pubDate>Sat, 19 Mar 2005 04:57:39 GMT</pubDate>
    <dc:creator>Alex Lavrov.</dc:creator>
    <dc:date>2005-03-19T04:57:39Z</dc:date>
    <item>
      <title>Kill process PID using cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891922#M402524</link>
      <description>On my server , perl process is utilising high cpu and memory.&lt;BR /&gt;&lt;BR /&gt;I need to kill this perl process at a predefine time using cron.&lt;BR /&gt;&lt;BR /&gt;I am able to find  PID using &lt;BR /&gt;ps -ef | grep perl | awk '{ print $2 ; } '&lt;BR /&gt;&lt;BR /&gt;how to use this value , to kill process.&lt;BR /&gt;&lt;BR /&gt;What will be the correct syntax of script.&lt;BR /&gt;&lt;BR /&gt;Abhijeet</description>
      <pubDate>Sat, 19 Mar 2005 04:39:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891922#M402524</guid>
      <dc:creator>Abhijeet_3</dc:creator>
      <dc:date>2005-03-19T04:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Kill process PID using cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891923#M402525</link>
      <description>ps -ef | grep perl | awk '{ print $2 ; } '&lt;BR /&gt;| xargs kill -9&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"xrags" command takes all the stdin and sends it as arguments to the command, in this case "kill -9".</description>
      <pubDate>Sat, 19 Mar 2005 04:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891923#M402525</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-03-19T04:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Kill process PID using cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891924#M402526</link>
      <description>You might want to modify it a little as this:&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep perl | grep -v grep | awk '{print $2}' | xargs kill -9&lt;BR /&gt;&lt;BR /&gt;The middle "grep -v grep" is to make sure that your&lt;BR /&gt;"grep perl" process does not show up in the input to&lt;BR /&gt;perl.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Sat, 19 Mar 2005 13:20:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891924#M402526</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-03-19T13:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Kill process PID using cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891925#M402527</link>
      <description>Hi Abhijeet, &lt;BR /&gt;&lt;BR /&gt;is better to create e file called killperlpid.sh which will be executed to Kill the process you need.&lt;BR /&gt;&lt;BR /&gt;#cat killperlpid.sh &lt;BR /&gt;!/usr/bin/sh&lt;BR /&gt;kill -9 `ps -ef | grep perl | awk '{print $2}'`&lt;BR /&gt;&lt;BR /&gt;Put it in crontab like below:&lt;BR /&gt;you can choose how ofeten do you want to run the script.&lt;BR /&gt;For example if you want it to be excecuted every 10 minutes.&lt;BR /&gt;&lt;BR /&gt;00 10 20 30 40 50 * * * * /killperlpid.sh  2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*****&lt;BR /&gt;1-st star is for minutes *=every min&lt;BR /&gt;2-nd star is for hours   *=every hour&lt;BR /&gt;3-rd star is for days    *=every day or specific day 0,1,2,3,4,5,6 From Sunday - Saturday&lt;BR /&gt;4-th star is for month   *=every month or specific month 1,2, ... , 12&lt;BR /&gt;5-th star is for year    *=every year or for specific &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Taulant</description>
      <pubDate>Sun, 20 Mar 2005 06:23:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891925#M402527</guid>
      <dc:creator>Taulant Shamo</dc:creator>
      <dc:date>2005-03-20T06:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Kill process PID using cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891926#M402528</link>
      <description>Thx everyone.</description>
      <pubDate>Sun, 20 Mar 2005 23:17:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process-pid-using-cron/m-p/4891926#M402528</guid>
      <dc:creator>Abhijeet_3</dc:creator>
      <dc:date>2005-03-20T23:17:34Z</dc:date>
    </item>
  </channel>
</rss>

