<?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: Scripts Problems ... Please Help Me! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899780#M403884</link>
    <description>It's picking up your script execution of&lt;BR /&gt;&lt;BR /&gt;sh teste.sh ora_pmon_openview&lt;BR /&gt;&lt;BR /&gt;in ps -ef so you need to grep it out:&lt;BR /&gt;&lt;BR /&gt;grep -v -e grep -e teste.sh&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
    <pubDate>Wed, 04 May 2005 07:36:54 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2005-05-04T07:36:54Z</dc:date>
    <item>
      <title>Scripts Problems ... Please Help Me!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899779#M403883</link>
      <description>Hello guys!!!&lt;BR /&gt;I'm going bananas with a script here!!!&lt;BR /&gt;&lt;BR /&gt;The aim of the script is to check when a database process goes down.&lt;BR /&gt;The script is very simple... Like this one:&lt;BR /&gt;&lt;BR /&gt;#-----------------------------------------&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;# set path to prevent trojan horses&lt;BR /&gt;PATH=/usr/bin:/opt/OV/bin/OpC&lt;BR /&gt;&lt;BR /&gt;# Check the number of processes running  &lt;BR /&gt;&lt;BR /&gt;PROC=`ps -ef | grep -i $1 | grep -v grep | wc -l`&lt;BR /&gt;&lt;BR /&gt;echo $PROC&lt;BR /&gt;&lt;BR /&gt;#-------------------------------------------&lt;BR /&gt;&lt;BR /&gt;So the problem is the following:&lt;BR /&gt;&lt;BR /&gt;I call the script this way:&lt;BR /&gt;&lt;BR /&gt;sh teste.sh ora_pmon_openview&lt;BR /&gt;&lt;BR /&gt;Where ora_pmon_openview is the name of the process that I want to know if is running or not. This process runs once a time one my server, so the script should echo the number 1 on the screen alright?&lt;BR /&gt;&lt;BR /&gt;But that's the problem... The script is returning the number 2, but when I execute the command manualy "ps -ef |grep -i ora_pmon_openview |grep -v grep |wc -l" it returns me the right number (1).&lt;BR /&gt;&lt;BR /&gt;Did you see something wrong on the script?&lt;BR /&gt;&lt;BR /&gt;Please, I'm counting on you!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Rafael M. Braga</description>
      <pubDate>Wed, 04 May 2005 07:23:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899779#M403883</guid>
      <dc:creator>Rafael Mendonça Braga</dc:creator>
      <dc:date>2005-05-04T07:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts Problems ... Please Help Me!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899780#M403884</link>
      <description>It's picking up your script execution of&lt;BR /&gt;&lt;BR /&gt;sh teste.sh ora_pmon_openview&lt;BR /&gt;&lt;BR /&gt;in ps -ef so you need to grep it out:&lt;BR /&gt;&lt;BR /&gt;grep -v -e grep -e teste.sh&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 04 May 2005 07:36:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899780#M403884</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-05-04T07:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts Problems ... Please Help Me!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899781#M403885</link>
      <description>Thanks a lot!!!</description>
      <pubDate>Wed, 04 May 2005 07:45:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-problems-please-help-me/m-p/4899781#M403885</guid>
      <dc:creator>Rafael Mendonça Braga</dc:creator>
      <dc:date>2005-05-04T07:45:41Z</dc:date>
    </item>
  </channel>
</rss>

