<?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: about my script ! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070816#M140604</link>
    <description>Firstly you should change your grep -c line to grep -v grep or else or you will ocasionally pick up your own grep command instead of checking if rpcd is running;&lt;BR /&gt;&lt;BR /&gt;RPCD=$(ps -ef|grep -v grep|grep -c rpcd)&lt;BR /&gt;&lt;BR /&gt;The way to restart rpcd is;&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/Rpcd start&lt;BR /&gt;&lt;BR /&gt;Give that a try.&lt;BR /&gt;</description>
    <pubDate>Mon, 15 Sep 2003 07:07:19 GMT</pubDate>
    <dc:creator>Stefan Farrelly</dc:creator>
    <dc:date>2003-09-15T07:07:19Z</dc:date>
    <item>
      <title>about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070815#M140603</link>
      <description>my net has been infected by the virus!&lt;BR /&gt;so the process of rpcd(on my hp workstation) is often be killed by the virus on the windows systems!&lt;BR /&gt;because of my 10.10 os ,there is no patch for it&lt;BR /&gt;so  i write a script:&lt;BR /&gt;&lt;BR /&gt;RPCD=$(ps -ef |grep -c rpcd)&lt;BR /&gt;if [ $RPCD -eq 0 ]&lt;BR /&gt;then &lt;BR /&gt;/opt/dce/sbin/rpcd&lt;BR /&gt;date &amp;gt; /script/rpcd/date&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;it can be run manually&lt;BR /&gt;but when i put it into cron&lt;BR /&gt;i will not be execute!&lt;BR /&gt;why?&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 07:01:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070815#M140603</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-15T07:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070816#M140604</link>
      <description>Firstly you should change your grep -c line to grep -v grep or else or you will ocasionally pick up your own grep command instead of checking if rpcd is running;&lt;BR /&gt;&lt;BR /&gt;RPCD=$(ps -ef|grep -v grep|grep -c rpcd)&lt;BR /&gt;&lt;BR /&gt;The way to restart rpcd is;&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/Rpcd start&lt;BR /&gt;&lt;BR /&gt;Give that a try.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 07:07:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070816#M140604</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2003-09-15T07:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070817#M140605</link>
      <description>You can reduce the nb of process being run&lt;BR /&gt;&lt;BR /&gt;RPCD=$(ps -ef|grep -c [r]pcd) &lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;JL&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 07:16:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070817#M140605</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2003-09-15T07:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070818#M140606</link>
      <description>I'm a small bit rusty on my scripting, but what shell do you run it in when you run it manually?  Cron scripts are run in an sh shell, and I'm not sure about the if [ ] syntax works in sh...&lt;BR /&gt;&lt;BR /&gt;You might want to try test instead, like:&lt;BR /&gt;if (test $RPCD = 0)&lt;BR /&gt;&lt;BR /&gt;hope that helps,&lt;BR /&gt;Kevin.</description>
      <pubDate>Mon, 15 Sep 2003 10:35:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070818#M140606</guid>
      <dc:creator>Kevin O'Donovan</dc:creator>
      <dc:date>2003-09-15T10:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070819#M140607</link>
      <description>Actually you can probably scratch that, think test and [ ] are the same and both work in Bourne shell...&lt;BR /&gt;&lt;BR /&gt;Have you checked the output from the cron, to see what exactly the error is?</description>
      <pubDate>Mon, 15 Sep 2003 10:40:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070819#M140607</guid>
      <dc:creator>Kevin O'Donovan</dc:creator>
      <dc:date>2003-09-15T10:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070820#M140608</link>
      <description>to Stefan Farrelly&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i  didn't find /sbin/init.d/Rpcd  on my system&lt;BR /&gt;&lt;BR /&gt;my os is hpux 10.10&lt;BR /&gt;&lt;BR /&gt;i found /sbin/init.d/dce &lt;BR /&gt;can i use /sbin/init.d/dce start instead?&lt;BR /&gt;&lt;BR /&gt;thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 10:43:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070820#M140608</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-15T10:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070821#M140609</link>
      <description>Something to understand about cron.&lt;BR /&gt;&lt;BR /&gt;The environment is minimal.&lt;BR /&gt;&lt;BR /&gt;No TERM, limited PATH.&lt;BR /&gt;&lt;BR /&gt;To avoid this, I make sure any scripts called by cron either have a complete PATH or each command has the full path of the binries you are calling.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 15 Sep 2003 10:47:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070821#M140609</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-15T10:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070822#M140610</link>
      <description>i have test the script&lt;BR /&gt;the problem may be the way that i start the rpcd daemon!&lt;BR /&gt;&lt;BR /&gt;but i have use the absolute path : /opt/dce/sbin/rpcd&lt;BR /&gt;&lt;BR /&gt;but in this situation &lt;BR /&gt;i  can execute the script manually!&lt;BR /&gt;&lt;BR /&gt;but cron can't!&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 10:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070822#M140610</guid>
      <dc:creator>leyearn</dc:creator>
      <dc:date>2003-09-15T10:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070823#M140611</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The first line of your script should specify which shell to use, e.g.:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;When you execute your script on the command line it is executed in your current shell - and that is probably not the same as the cron default shell. Therefore, specify the shell.&lt;BR /&gt;Anyway, what error do you get from cron?&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 11:21:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070823#M140611</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-09-15T11:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070824#M140612</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try to redirect the output from your cron job to a log file and see if you get any error messages.&lt;BR /&gt;&lt;BR /&gt;0,15,30,45 * * * * &amp;lt;script&amp;gt; &amp;gt;&amp;gt;/tmp/abc.log 2&amp;gt;1&lt;BR /&gt;&lt;BR /&gt;Another solution for this may be to start rpcd from inittab with the respawn option.</description>
      <pubDate>Mon, 15 Sep 2003 11:23:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070824#M140612</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-09-15T11:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: about my script !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070825#M140613</link>
      <description>Hi again&lt;BR /&gt;&lt;BR /&gt;I would suggest that you change &lt;BR /&gt;2&amp;gt;1&lt;BR /&gt;in Leif Halvarsson's suggestion to&lt;BR /&gt;2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;but if the output from a cron script is not redirected to a file, it is mailed to the crontab user; check also the mail messages.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 12:23:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-my-script/m-p/3070825#M140613</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-09-15T12:23:08Z</dc:date>
    </item>
  </channel>
</rss>

