<?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: Does ps command capture process name with spacing in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849927#M93301</link>
    <description>Dear All,&lt;BR /&gt;&lt;BR /&gt;Still the same, cannot capture the process name with spacing. Any idea?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Loo</description>
    <pubDate>Fri, 22 Nov 2002 05:34:41 GMT</pubDate>
    <dc:creator>Loo Man Shong_1</dc:creator>
    <dc:date>2002-11-22T05:34:41Z</dc:date>
    <item>
      <title>Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849925#M93299</link>
      <description>I'm writing a shell script to monitor the process called 'remsh AUCSUBH1_p startfp dbs 7500' running on hpux 10.20 and using sendmail command to send the email to the administrator once the system detected the process is not running. The command that I used is &lt;BR /&gt;ps -u taucadm | grep 'remsh AUCSUBH1_p startfp dbs 7500' | grep -v grep&lt;BR /&gt;&lt;BR /&gt;and it doesn't seem to be running but if I replace the process 'remsh AUCSUBH1_p startfp dbs 7500' with sendmail process, it work fine. Any idea? is it because of the ps command cannot capture process name with spacing?  &lt;BR /&gt;&lt;BR /&gt;Here is the shell script that I used:&lt;BR /&gt;&lt;BR /&gt;startfp_dbs_7500=&lt;BR /&gt;startfp_dbs_7500=`ps -u taucadm | grep 'remsh AUCSUBH1_p startfp dbs 7500' | grep -v grep`&lt;BR /&gt;  if [ -z "$startfp_dbs_7500" ]&lt;BR /&gt;    then&lt;BR /&gt;echo "startfp_dbs_7500 process not running"| mailx -s "Notification Message" ms_loo@yahoo.com&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Loo</description>
      <pubDate>Fri, 22 Nov 2002 04:28:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849925#M93299</guid>
      <dc:creator>Loo Man Shong_1</dc:creator>
      <dc:date>2002-11-22T04:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849926#M93300</link>
      <description>Hey !!&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;startfp_dbs_7500= &lt;BR /&gt;startfp_dbs_7500=`ps -u taucadm | grep 'remsh AUCSUBH1_p startfp dbs 7500' | grep -v grep` &lt;BR /&gt;if [ "_$startfp_dbs_7500" = "_$startfp_dbs_7500" ] &lt;BR /&gt;then &lt;BR /&gt;echo "startfp_dbs_7500 process not running"| mailx -s "Notification Message" ms_loo@yahoo.com &lt;BR /&gt;&lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Nov 2002 05:15:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849926#M93300</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-11-22T05:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849927#M93301</link>
      <description>Dear All,&lt;BR /&gt;&lt;BR /&gt;Still the same, cannot capture the process name with spacing. Any idea?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Loo</description>
      <pubDate>Fri, 22 Nov 2002 05:34:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849927#M93301</guid>
      <dc:creator>Loo Man Shong_1</dc:creator>
      <dc:date>2002-11-22T05:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849928#M93302</link>
      <description>Hi,&lt;BR /&gt;try this (with space after equal sign):&lt;BR /&gt;# UNIX95= ps -u taucadm -eo args | grep "remsh AUCSUBH1_p startfp dbs 750[0]" &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Nov 2002 09:03:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849928#M93302</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2002-11-22T09:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849929#M93303</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;It is not problem with 'spaces in names', as in both cases you don't use names with spaces.&lt;BR /&gt;&lt;BR /&gt;The command name is remsh and as this it is showed by 'ps'.&lt;BR /&gt;&lt;BR /&gt;What do you need is to get commandline, instead of simple command name. John suggests option 'ps -o args', however it is not accepted on my machine, so it can be also on yours.&lt;BR /&gt;&lt;BR /&gt;Use 'ps -f' instead. It replaces command name with command line and as far as I know is honored by every existing 'ps' command.&lt;BR /&gt;&lt;BR /&gt;So complete would be: 'ps -fu taucadm'&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;Adam&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Nov 2002 10:51:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849929#M93303</guid>
      <dc:creator>Adam J Markiewicz</dc:creator>
      <dc:date>2002-11-22T10:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849930#M93304</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Both John and Adam are right ... A simple ps will only display the program name. If you have a look at the 'exec' man page, you will see that a 'standard' call contains :&lt;BR /&gt;&lt;BR /&gt;exec...(file, arg0, arg1, ...)&lt;BR /&gt;&lt;BR /&gt;with args either as a list or as pointer to a list. In your case, 'ps' without option only displays arg0 (the executable file), while the option '-f' (and also the option -o args if yoy have respected exactly what John said, including space after UNIX95=) while also display arguments (arg1, ...)&lt;BR /&gt;&lt;BR /&gt;But I also wanted to tell you that it's a good practice to assign points to people helping you), for example Adam and John. I can read :&lt;BR /&gt;&lt;BR /&gt;This member has assigned points to 0 of 10 responses to his/her questions.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Fri, 22 Nov 2002 11:27:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849930#M93304</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-11-22T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Does ps command capture process name with spacing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849931#M93305</link>
      <description>x=`UNIX95= ps -e -o comm|grep 'remsh AUCSUBH1_p startfp dbs 7500'|grep -v grep|wc -l`&lt;BR /&gt;if test $x=1&lt;BR /&gt;then&lt;BR /&gt;echo "startfp_dbs_7500 process not running"| mailx -s "Notification &lt;BR /&gt;else &lt;BR /&gt;echo Not running&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 22 Nov 2002 11:31:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-ps-command-capture-process-name-with-spacing/m-p/2849931#M93305</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-11-22T11:31:51Z</dc:date>
    </item>
  </channel>
</rss>

