<?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: again my script! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071907#M140902</link>
    <description>to Mark Grant &lt;BR /&gt;thanks to you and all other !&lt;BR /&gt;&lt;BR /&gt;but i run it when i am root !&lt;BR /&gt;i set up the cron as root too !&lt;BR /&gt;as you said &lt;BR /&gt; should i change the root's .profile file &lt;BR /&gt;and add an entry &lt;BR /&gt;su - root -c "/script/rpcd/shell" ?&lt;BR /&gt;</description>
    <pubDate>Wed, 17 Sep 2003 07:59:36 GMT</pubDate>
    <dc:creator>leyearn</dc:creator>
    <dc:date>2003-09-17T07:59:36Z</dc:date>
    <item>
      <title>again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071888#M140883</link>
      <description>in order to check whether rpcd daemon is running on  my system &lt;BR /&gt;(os hpux 10.10)&lt;BR /&gt;&lt;BR /&gt;i write a script ,if it doesn't exist in my system ,start the rpcd daemon!&lt;BR /&gt;my script:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;RPCD=$(ps -ef|grep -v grep|grep -c rpcd)&lt;BR /&gt;if [ $RPCD -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;/opt/dce/sbin/rpcd &amp;gt;&amp;gt;/script/rpcd/error.log2&amp;gt;&amp;amp;1&lt;BR /&gt;date &amp;gt;&amp;gt;/script/rpcd/date&lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;my cron is set (ervery five minute to check):&lt;BR /&gt;&lt;BR /&gt;0,5,10,15,20,25,30,35,40,45,50,55 * * * * /script/rpcd/shell &amp;gt;&amp;gt;/script/rpcd/error.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i can execute the script manually,but cron can't &lt;BR /&gt;why?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 04:01:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071888#M140883</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T04:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071889#M140884</link>
      <description>the way that i start rpcd is right or not</description>
      <pubDate>Tue, 16 Sep 2003 04:04:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071889#M140884</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T04:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071890#M140885</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Firstly, you have two processes writing to the same file.  This won't stop it working but looks a bit odd.  Either re-direct the output to error.log in the script or in the crontab file but it probably isn't wise to do it in both.&lt;BR /&gt;&lt;BR /&gt;Secondly, ensure there is a space before the 2&amp;gt;&amp;amp;1 within the script.  There might actually be one already but it doesn't look like it in a web browser.&lt;BR /&gt;&lt;BR /&gt;It's not the normal way to start rpcd but it is perfectly valid so I wouldn't worry too much about that.&lt;BR /&gt;&lt;BR /&gt;Does your error.log provide any clue as to why cron is failing.  It looks OK from here.</description>
      <pubDate>Tue, 16 Sep 2003 04:16:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071890#M140885</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T04:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071891#M140886</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Yes, you are starting rpcd correctly.&lt;BR /&gt;There should be a script called /sbin/init.d/Rpcd that starts it at boot time which you could use.&lt;BR /&gt;&lt;BR /&gt;I'd guess your cron problem might be that it doesn't know the path to grep.  If grep doesn't reside in /usr/bin, then you need the full path name.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con</description>
      <pubDate>Tue, 16 Sep 2003 04:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071891#M140886</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-09-16T04:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071892#M140887</link>
      <description>but the date command can work ok!&lt;BR /&gt;i change the "opt/dce/sbin/rpcd &amp;gt;&amp;gt;/script/rpcd/error.log2&amp;gt;&amp;amp;1 "&lt;BR /&gt;to &lt;BR /&gt;&lt;BR /&gt;"opt/dce/sbin/rpcd &amp;gt;&amp;gt;/script/rpcd/error.log  2&amp;gt;&amp;amp;1 "&lt;BR /&gt;but the problem  still exist!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 05:07:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071892#M140887</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T05:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071893#M140888</link>
      <description>I have just noticed you are running 10.10 which explains why you don't have /sbin/init.d/Rpcd. I am not sure what shell /usr/bin/sh is on 10.10, is it still the posix shell?  I sort of remember that early 10.X versions of HP-UX had a really buggy shell.  &lt;BR /&gt;&lt;BR /&gt;In cases like this, simplify!&lt;BR /&gt;&lt;BR /&gt;try the following&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep -v grep | grep rpcd &amp;gt; /dev/null || {&lt;BR /&gt; /opt/dce/sbin/rpcd&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;See if it works&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 05:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071893#M140888</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T05:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071894#M140889</link>
      <description>i have viewed the /var/adm/cron/log file&lt;BR /&gt;the following is an entry :&lt;BR /&gt;&lt;BR /&gt;CMD:  /script/rpcd/shell &amp;gt;&amp;gt;/script/rpcd/error.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&amp;gt;  root 8847 c Tue Sep 16 14:25:00 EAT 2003&lt;BR /&gt;&amp;lt;  root 8847 c Tue Sep 16 14:25:00 EAT 2003&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i prove that the cron well!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 05:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071894#M140889</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T05:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071895#M140890</link>
      <description>i have viewed the /var/adm/cron/log file&lt;BR /&gt;the following is an entry :&lt;BR /&gt;&lt;BR /&gt;CMD:  /script/rpcd/shell &amp;gt;&amp;gt;/script/rpcd/error.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&amp;gt;  root 8847 c Tue Sep 16 14:25:00 EAT 2003&lt;BR /&gt;&amp;lt;  root 8847 c Tue Sep 16 14:25:00 EAT 2003&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;it prove that the cron well!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 05:43:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071895#M140890</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T05:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071896#M140891</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;there should be an error message in &lt;BR /&gt;/script/rpcd/error.log &lt;BR /&gt;saying what's wrong. Is that file empty?&lt;BR /&gt;&lt;BR /&gt;Is the crontab for the same user as the command line user?&lt;BR /&gt;&lt;BR /&gt;Check also /var/adm/cron/log for error messages.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 16 Sep 2003 05:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071896#M140891</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-09-16T05:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071897#M140892</link>
      <description>leyearn,&lt;BR /&gt;&lt;BR /&gt;Please let us know the contents of /script/rpcd/error.log it will show any errors that cron is giving.</description>
      <pubDate>Tue, 16 Sep 2003 05:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071897#M140892</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T05:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071898#M140893</link>
      <description>i have checked the file  /script/rpcd/error.log&lt;BR /&gt;but the file is empty!</description>
      <pubDate>Tue, 16 Sep 2003 06:42:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071898#M140893</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T06:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071899#M140894</link>
      <description>Have you tried this.  Make your script /script/rpcd/shell&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;ps -ef | grep -v grep | grep rpcd &amp;gt; /dev/null || {&lt;BR /&gt; /opt/dce/sbin/rpcd&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;With a cron entry of 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /script/rpcd/shell &amp;gt;&amp;gt; /script/rpcd/error.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 06:52:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071899#M140894</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T06:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071900#M140895</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;when you run the script manually, what happens? &lt;BR /&gt;Do you get any kind of messages?&lt;BR /&gt;The reason I ask is because that I think rpcd checks if it is already running, and if that is the case it will not start up another process. That could explain why apparently nothing happens in cron.&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 16 Sep 2003 07:13:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071900#M140895</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-09-16T07:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071901#M140896</link>
      <description>to john korterman&lt;BR /&gt;i ever killed rpcd daemon manually!&lt;BR /&gt;but the script didn't start the rpcd! &lt;BR /&gt;i  have test the &lt;BR /&gt;if [ $RPCD -eq 0 ]&lt;BR /&gt;was executed! &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 07:35:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071901#M140896</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-16T07:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071902#M140897</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;could you try to modify your script to this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo before first command&lt;BR /&gt;RPCD=$(ps -ef|grep -v grep|grep -c rpcd)&lt;BR /&gt;echo $?&lt;BR /&gt;echo after first command&lt;BR /&gt;if [ $RPCD -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo true&lt;BR /&gt;/opt/dce/sbin/rpcd &amp;gt;&amp;gt;/script/rpcd/error.log2&amp;gt;&amp;amp;1&lt;BR /&gt;echo $?&lt;BR /&gt;date &amp;gt;&amp;gt;/script/rpcd/date&lt;BR /&gt;fi&lt;BR /&gt;echo ended&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and then run it on the command line and from cron? Please post the output from both.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 16 Sep 2003 07:44:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071902#M140897</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-09-16T07:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071903#M140898</link>
      <description>leyearn,&lt;BR /&gt;&lt;BR /&gt;Running out of ideas here but try running your script from cron but reading the users .profile as in&lt;BR /&gt;&lt;BR /&gt;su - user -c "/script/rpcd/shell"</description>
      <pubDate>Tue, 16 Sep 2003 07:47:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071903#M140898</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T07:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071904#M140899</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try to create other script that calls to "shell" script, and put it on cron.&lt;BR /&gt;What happens?&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Zigor</description>
      <pubDate>Tue, 16 Sep 2003 08:37:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071904#M140899</guid>
      <dc:creator>Zigor Buruaga</dc:creator>
      <dc:date>2003-09-16T08:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071905#M140900</link>
      <description>my cron works well&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;my cron is set (ervery five minute to check): &lt;BR /&gt;&lt;BR /&gt;0,5,10,15,20,25,30,35,40,45,50,55 * * * * /script/rpcd/shell &amp;gt;&amp;gt;/script/rpcd/error.log 2&amp;gt;&amp;amp;1 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/var/adm/cron/log:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  CMD:  /script/rpcd/shell &amp;gt;&amp;gt;/script/rpcd/error.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&amp;gt;  root 15098 c Wed Sep 17 12:35:00 EAT 2003&lt;BR /&gt;&amp;lt;  root 15098 c Wed Sep 17 12:35:00 EAT 2003&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Sep 2003 06:25:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071905#M140900</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-17T06:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071906#M140901</link>
      <description>Hello again leyearn :)&lt;BR /&gt;&lt;BR /&gt;Cron is actually starting the job but the job it is running.&lt;BR /&gt;&lt;BR /&gt;That's why I want you to try doing the "su user - c" thing I mention in my last post.&lt;BR /&gt;&lt;BR /&gt;It will have the same environment as when you run your script from the command line.&lt;BR /&gt;&lt;BR /&gt;Also, check roots mail for output from cron.</description>
      <pubDate>Wed, 17 Sep 2003 06:33:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071906#M140901</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-17T06:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: again my script!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071907#M140902</link>
      <description>to Mark Grant &lt;BR /&gt;thanks to you and all other !&lt;BR /&gt;&lt;BR /&gt;but i run it when i am root !&lt;BR /&gt;i set up the cron as root too !&lt;BR /&gt;as you said &lt;BR /&gt; should i change the root's .profile file &lt;BR /&gt;and add an entry &lt;BR /&gt;su - root -c "/script/rpcd/shell" ?&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Sep 2003 07:59:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/again-my-script/m-p/3071907#M140902</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-17T07:59:36Z</dc:date>
    </item>
  </channel>
</rss>

