<?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: script to monitor pid process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009926#M911251</link>
    <description>You /can/ express your thanks in a more forum appropriate way:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
    <pubDate>Fri, 27 Jun 2003 14:46:51 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2003-06-27T14:46:51Z</dc:date>
    <item>
      <title>script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009916#M911241</link>
      <description>My oracle instance is in a shared environemt.  I need a script to monitor the memory and cpu consumed by these processes.</description>
      <pubDate>Fri, 27 Jun 2003 12:55:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009916#M911241</guid>
      <dc:creator>Jim Gerken</dc:creator>
      <dc:date>2003-06-27T12:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009917#M911242</link>
      <description>This has been done.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x836cc1c4ceddd61190050090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x836cc1c4ceddd61190050090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;My Oracle scripts thread comes to mind.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4177ef70e827d711abdc0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4177ef70e827d711abdc0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It is in there somewhere.&lt;BR /&gt;&lt;BR /&gt;Lots of good scripts to think about using anyway.&lt;BR /&gt;&lt;BR /&gt;Good Luck,&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 27 Jun 2003 13:00:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009917#M911242</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-06-27T13:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009918#M911243</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would use a loop containing something like :&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -ef -o vsz,pcpu | grep list_of_process&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Fri, 27 Jun 2003 13:04:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009918#M911243</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-06-27T13:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009919#M911244</link>
      <description>Hi,&lt;BR /&gt;Tow solution:&lt;BR /&gt;1. If you have glance, a good option&lt;BR /&gt;is to use:&lt;BR /&gt;glance -adviser_only -syntaxe filename&lt;BR /&gt;where filename is a small glance script, you have really good example in:&lt;BR /&gt;/opt/perf/examples/adviser&lt;BR /&gt;&lt;BR /&gt;2. Or use this small script:&lt;BR /&gt;export UNIX95=1&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;  ps -o vsz,pcpu,comm -C cmd_name&lt;BR /&gt;  sleep 5&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Cheers.</description>
      <pubDate>Fri, 27 Jun 2003 13:05:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009919#M911244</guid>
      <dc:creator>Bruno Vidal</dc:creator>
      <dc:date>2003-06-27T13:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009920#M911245</link>
      <description>Hey you guys are right on it...&lt;BR /&gt;&lt;BR /&gt;I have the following script which seems to give me what I need.&lt;BR /&gt;&lt;BR /&gt;echo "PID USER CPU% MEM_SIZE COMMAND" &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;UNIX95= ps -eo "pid ruser pcpu vsz=Kbytes" -o comm | grep oracleT5751&lt;BR /&gt;sleep 1 &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;It returns something like this...&lt;BR /&gt;&lt;BR /&gt; 8532 ormesa    0.02   32832 oracleT5751&lt;BR /&gt;  536 ormesa    0.02   32832 oracleT5751&lt;BR /&gt;  524 ormesa    0.02   32832 oracleT5751&lt;BR /&gt;22005 ormesa    0.02   32832 oracleT5751&lt;BR /&gt; 8536 ormesa    0.02   40128 oracleT5751&lt;BR /&gt;&lt;BR /&gt;I need to graph this in excel to show the memory / cpu consumed by each pid.  I'm a little confused on how to setup the graph?  any ideas...</description>
      <pubDate>Fri, 27 Jun 2003 13:39:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009920#M911245</guid>
      <dc:creator>Jim Gerken</dc:creator>
      <dc:date>2003-06-27T13:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009921#M911246</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;You could add some formatting to your output like :&lt;BR /&gt;&lt;BR /&gt;echo "PID USER CPU% MEM_SIZE COMMAND"&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;UNIX95= ps -eo "pid ruser pcpu vsz=Kbytes" -o comm | grep oracleT5751&lt;BR /&gt;sleep 1&lt;BR /&gt;done | sort | tr ' ' ','&lt;BR /&gt;&lt;BR /&gt;Put this output into a file which can then be easily imported in Excel as a csv file (comma separated values).&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Fri, 27 Jun 2003 13:47:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009921#M911246</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-06-27T13:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009922#M911247</link>
      <description>How can I add a time stamp to this script?&lt;BR /&gt;&lt;BR /&gt;echo "PID USER CPU% MEM_SIZE COMMAND" &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;UNIX95= ps -eo "pid ruser pcpu vsz=Kbytes" -o comm | grep oracleT5751 &lt;BR /&gt;sleep 1 &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2003 14:09:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009922#M911247</guid>
      <dc:creator>Jim Gerken</dc:creator>
      <dc:date>2003-06-27T14:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009923#M911248</link>
      <description>echo "PID USER CPU% MEM_SIZE COMMAND"&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;UNIX95= ps -eo "pid ruser pcpu vsz=Kbytes" -o comm | grep oracleT5751&lt;BR /&gt;sleep 1&lt;BR /&gt;done | sed 's;^;'$(date +'%y%y%m%d%H%S')' ;'&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 27 Jun 2003 14:22:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009923#M911248</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2003-06-27T14:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009924#M911249</link>
      <description>#!/usr/bin/perl&lt;BR /&gt;$ENV{UNIX95} = " ";&lt;BR /&gt;print "Stamp   PID USER CPU% MEM_SIZE COMMAND\n";&lt;BR /&gt;while (1) {&lt;BR /&gt;my @t = localtime;&lt;BR /&gt;printf "%02d:%02d:%02d %s", @t[2,1,0], grep /oracleT5751/, `ps -eo "pid ruser pcpu vsz=Kbytes" -o comm`;&lt;BR /&gt;sleep 1 ;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;spaces get lost in forum traffic. Add to your own needs.&lt;BR /&gt;&lt;BR /&gt;Of course this should be done using Unix::Procestable, and plotted with Perl/Tk on the fly ...&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Fri, 27 Jun 2003 14:24:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009924#M911249</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-06-27T14:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009925#M911250</link>
      <description>Thanks you guys are all right....</description>
      <pubDate>Fri, 27 Jun 2003 14:38:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009925#M911250</guid>
      <dc:creator>Jim Gerken</dc:creator>
      <dc:date>2003-06-27T14:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009926#M911251</link>
      <description>You /can/ express your thanks in a more forum appropriate way:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x022718276953d61190040090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Fri, 27 Jun 2003 14:46:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009926#M911251</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-06-27T14:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009927#M911252</link>
      <description>&lt;BR /&gt;I put he following into a file called "CPU"&lt;BR /&gt;&lt;BR /&gt;echo "PID USER CPU% MEM_SIZE COMMAND" &lt;BR /&gt;while true &lt;BR /&gt;do &lt;BR /&gt;UNIX95= ps -eo "pid ruser pcpu vsz=Kbytes" -o comm | grep oracleD5751 &lt;BR /&gt;sleep 10&lt;BR /&gt;done | sed 's;^;'$(date +'%m%d%H%M%S')' ;' &lt;BR /&gt;&lt;BR /&gt;I execute this file to put the contents into a log.&lt;BR /&gt;&lt;BR /&gt;date &amp;gt; cpu.log ; cpu &amp;gt;&amp;gt; /tmp/junk/cpu.log&lt;BR /&gt;&lt;BR /&gt;However the date time stamp on the output never increments.  It prints the first date time and then repeats it with each interation?  Any thoughts...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Jun 2003 16:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009927#M911252</guid>
      <dc:creator>Jim Gerken</dc:creator>
      <dc:date>2003-06-27T16:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: script to monitor pid process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009928#M911253</link>
      <description>yes, re-read both my replies :)&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Fri, 27 Jun 2003 17:01:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-monitor-pid-process/m-p/3009928#M911253</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-06-27T17:01:07Z</dc:date>
    </item>
  </channel>
</rss>

