<?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: ps -elf | grep ??? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060625#M908433</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Frpom the man page of grep:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; -w                  Select only those lines containing matches&lt;BR /&gt;                                that form whole words. The test is that the&lt;BR /&gt;                                matching substring must either be at the&lt;BR /&gt;                                beginning of the line, or preceded by a non-&lt;BR /&gt;                                word constituent character.  Similarly, it&lt;BR /&gt;                                must be either at the end of the line or&lt;BR /&gt;                                followed by a non-word constituent character.&lt;BR /&gt;                                Word-constituent characters are letters,&lt;BR /&gt;                                digits, and the underscore.&lt;BR /&gt;&lt;BR /&gt;I run HP-UX 11.11 with the standard grep (no GNU-version).&lt;BR /&gt;</description>
    <pubDate>Mon, 01 Sep 2003 11:23:56 GMT</pubDate>
    <dc:creator>Leif Halvarsson_2</dc:creator>
    <dc:date>2003-09-01T11:23:56Z</dc:date>
    <item>
      <title>ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060613#M908421</link>
      <description>Hello.&lt;BR /&gt;&lt;BR /&gt;I would like to automatically know if some processes are running using a generic 'ps -lef | grep &lt;SOMETHING&gt;' expression. The problem is that I do not find the correct &lt;SOMETHING&gt; expression.&lt;BR /&gt;For now &lt;SOMETHING&gt; is "[ |/]&lt;PROCESS_NAME&gt;". When I am looking for a process named vmd, it will not find a process named cmlvmd, but it can find a process named vmdix, which is not correct.&lt;BR /&gt;Has someone ideas to complete my expression?&lt;/PROCESS_NAME&gt;&lt;/SOMETHING&gt;&lt;/SOMETHING&gt;&lt;/SOMETHING&gt;</description>
      <pubDate>Mon, 01 Sep 2003 08:21:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060613#M908421</guid>
      <dc:creator>Sylvain CROUET</dc:creator>
      <dc:date>2003-09-01T08:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060614#M908422</link>
      <description>&lt;BR /&gt;I think you want;&lt;BR /&gt;&lt;BR /&gt;grep "^vmid$"  &lt;BR /&gt;&lt;BR /&gt;which means a process which starts with vmid and ends with vmid.&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Sep 2003 08:27:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060614#M908422</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2003-09-01T08:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060615#M908423</link>
      <description>Just try with a space at the beginning and end of the grep string like&lt;BR /&gt;&lt;BR /&gt;ps -ef|grep " vmd "&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 01 Sep 2003 08:37:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060615#M908423</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-09-01T08:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060616#M908424</link>
      <description>To grep ps 's output containing string which starts with 'vmd', try this:&lt;BR /&gt;# ps -ef | egrep vmd &lt;BR /&gt;</description>
      <pubDate>Mon, 01 Sep 2003 08:49:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060616#M908424</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-09-01T08:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060617#M908425</link>
      <description>NAME=$(ps -e|awk '($NF=="name-process"){ print $4 }')  &lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;PID=$(ps -e|awk '($NF=="name-process"){ print $1 }')&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tom&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Sep 2003 09:06:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060617#M908425</guid>
      <dc:creator>TOMAS BERNABEU</dc:creator>
      <dc:date>2003-09-01T09:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060618#M908426</link>
      <description>It seems I was not very clear with my question.&lt;BR /&gt;First point, I want an unique expression to look after a process, as I want to use it within a script.&lt;BR /&gt;Second point, I must use the -x option for ps to differentiate some processes (eg : Xtalk rulemanager process).&lt;BR /&gt;Third point, I do not want false positive. When I am looking for a process named vmd, I do not want to find cmlvmd nor vmdix. The $ anchoring will work for this case, but not for the syslogd process (launched with -D option, which appear due to the -x option of the ps command).&lt;BR /&gt;&lt;BR /&gt;I know my question is quite complex, but that is the reason why I need your help. ;-)</description>
      <pubDate>Mon, 01 Sep 2003 09:25:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060618#M908426</guid>
      <dc:creator>Sylvain CROUET</dc:creator>
      <dc:date>2003-09-01T09:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060619#M908427</link>
      <description>Actually, the best solution I have found is the following one:&lt;BR /&gt;ps -ex | awk '{printf("%s \n", $0)}' | grep "[ |/]&lt;PROCESS_NAME&gt; "&lt;BR /&gt;&lt;BR /&gt;If someone can find something shorter, without the awk for example, I would be very interested.&lt;/PROCESS_NAME&gt;</description>
      <pubDate>Mon, 01 Sep 2003 09:41:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060619#M908427</guid>
      <dc:creator>Sylvain CROUET</dc:creator>
      <dc:date>2003-09-01T09:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060620#M908428</link>
      <description>This can be a problem and all the above solutions are the good appraoches aproaches.  Personally, I try and avoid "ps" commands being run every five minutes or so I tend to use the following method were practicable .&lt;BR /&gt;&lt;BR /&gt;Run the application from a script which then goes to sleep.  If the application dies, the script will receive a SIGCHLD which you can process to either alert, restart the application or whatever.  In other words, rather than checking if the process is running, be informed when it isn't.&lt;BR /&gt;&lt;BR /&gt;Of course, this doesn't work if the application does the traditional fork/exit but it can be useful for monitoring running apps, especially if you use one generic application starting script.</description>
      <pubDate>Mon, 01 Sep 2003 09:55:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060620#M908428</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-01T09:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060621#M908429</link>
      <description>Hi,&lt;BR /&gt;Have you tried the -w option ?</description>
      <pubDate>Mon, 01 Sep 2003 10:14:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060621#M908429</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-09-01T10:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060622#M908430</link>
      <description>You can also use the inbuilt variable UNIX95 for the processes &lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -e -o 'pid,vsz,comm'&lt;BR /&gt;&lt;BR /&gt;you can retrieve the reqd.  colums.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Sep 2003 10:24:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060622#M908430</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-09-01T10:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060623#M908431</link>
      <description>Which -w option? I do not find any -w option for ps nor grep.</description>
      <pubDate>Mon, 01 Sep 2003 10:52:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060623#M908431</guid>
      <dc:creator>Sylvain CROUET</dc:creator>
      <dc:date>2003-09-01T10:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060624#M908432</link>
      <description>The -w option of grep comes with the GNu version which can be had from here&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Gnu/grep-2.5.1/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Gnu/grep-2.5.1/&lt;/A&gt;</description>
      <pubDate>Mon, 01 Sep 2003 10:58:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060624#M908432</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-09-01T10:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060625#M908433</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Frpom the man page of grep:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; -w                  Select only those lines containing matches&lt;BR /&gt;                                that form whole words. The test is that the&lt;BR /&gt;                                matching substring must either be at the&lt;BR /&gt;                                beginning of the line, or preceded by a non-&lt;BR /&gt;                                word constituent character.  Similarly, it&lt;BR /&gt;                                must be either at the end of the line or&lt;BR /&gt;                                followed by a non-word constituent character.&lt;BR /&gt;                                Word-constituent characters are letters,&lt;BR /&gt;                                digits, and the underscore.&lt;BR /&gt;&lt;BR /&gt;I run HP-UX 11.11 with the standard grep (no GNU-version).&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Sep 2003 11:23:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060625#M908433</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-09-01T11:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060626#M908434</link>
      <description>Thanks, Leif and TG.&lt;BR /&gt;It seems it is exactly what I need. I will test it as soon as possible.</description>
      <pubDate>Mon, 01 Sep 2003 11:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060626#M908434</guid>
      <dc:creator>Sylvain CROUET</dc:creator>
      <dc:date>2003-09-01T11:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: ps -elf | grep ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060627#M908435</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;does this work on your system?&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -e -opid -ocomm| grep  "[[:space:]]vmd$"&lt;BR /&gt;&lt;BR /&gt;Btw, I think the -w option for grep in hpux is only for 11.11 and later.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Mon, 01 Sep 2003 16:17:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ps-elf-grep/m-p/3060627#M908435</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-09-01T16:17:01Z</dc:date>
    </item>
  </channel>
</rss>

