<?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 system script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5355375#M639619</link>
    <description>&lt;P&gt;In my unix / linux server&amp;nbsp; , there are always many process running in high CPU and use much memory , it makes the system run very slow .&lt;/P&gt;&lt;P&gt;Can advise if I would like to find it out , find and kill the processes which are&lt;/P&gt;&lt;P&gt;1) running over 3 hours with 90% CPU .&lt;BR /&gt;2) the process run over 12 hours&lt;/P&gt;&lt;P&gt;Can advise how can I write it ? or I guess these are very useful unix admin script , can advise where I can find the similiar one ?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2011 06:26:15 GMT</pubDate>
    <dc:creator>2ne1</dc:creator>
    <dc:date>2011-10-07T06:26:15Z</dc:date>
    <item>
      <title>system script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5355375#M639619</link>
      <description>&lt;P&gt;In my unix / linux server&amp;nbsp; , there are always many process running in high CPU and use much memory , it makes the system run very slow .&lt;/P&gt;&lt;P&gt;Can advise if I would like to find it out , find and kill the processes which are&lt;/P&gt;&lt;P&gt;1) running over 3 hours with 90% CPU .&lt;BR /&gt;2) the process run over 12 hours&lt;/P&gt;&lt;P&gt;Can advise how can I write it ? or I guess these are very useful unix admin script , can advise where I can find the similiar one ?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2011 06:26:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5355375#M639619</guid>
      <dc:creator>2ne1</dc:creator>
      <dc:date>2011-10-07T06:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: system script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5355531#M639620</link>
      <description>&lt;P&gt;&amp;gt;there are always many process running in high CPU and use much memory, it makes the system run very slow.﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normally, it's your job to add more CPUs and memory to your machine, not kill arbitrary processes.&lt;/P&gt;&lt;P&gt;How do you know these processes are useless?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take a look at the ps(1) output for the processes:&lt;/P&gt;&lt;P&gt;ps -ef&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And look at the stime and time fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2011 09:45:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5355531#M639620</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-10-07T09:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: system script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5357339#M639621</link>
      <description>&lt;P&gt;thx reply , I am not familiar with writing shell script , can advise what can I do ? Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2011 08:06:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5357339#M639621</guid>
      <dc:creator>2ne1</dc:creator>
      <dc:date>2011-10-10T08:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: system script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5362851#M639622</link>
      <description>&lt;P&gt;&amp;gt;I am not familiar with writing shell script, can advise what can I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you execute the following ps(1) command you can get an entry for each process to make a decision.&amp;nbsp; Here is the&lt;/P&gt;&lt;P&gt;ps(1) output that may be helpful:&lt;/P&gt;&lt;P&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 34-08:49:31&amp;nbsp;&amp;nbsp;&amp;nbsp; 00:51 swapper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.02&lt;BR /&gt;UNIX95=EXTENDED_PS ps -e -opid= -ouid= -oetime= -otime= -opcpu= -ocomm= |&lt;BR /&gt;while read pid uid etime otime pcpu comm; do&lt;BR /&gt;&amp;nbsp;#&amp;nbsp; echo "$pid $pcpu"&amp;nbsp;&amp;nbsp; # debugging&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; pcpu=${pcpu%.*}&amp;nbsp; # strip fractions&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if [ $pcpu -ge 90 ]; then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "$pid is $pcpu %"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; fi&lt;BR /&gt;done&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2011 05:02:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-script/m-p/5362851#M639622</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-10-25T05:02:44Z</dc:date>
    </item>
  </channel>
</rss>

