<?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: kill a process by its name in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153046#M726271</link>
    <description>Look at Dennis' response again.&lt;BR /&gt;&lt;BR /&gt;He precedes the 'ps' command with 'UNIX95= '.&lt;BR /&gt;&lt;BR /&gt;The 'UNIX95= ' (NOTE the space AFTER the = sign') turns on the XPG4 behavior for the command.</description>
    <pubDate>Fri, 29 Feb 2008 12:45:36 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2008-02-29T12:45:36Z</dc:date>
    <item>
      <title>kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153042#M726267</link>
      <description>Hi everyone!&lt;BR /&gt;&lt;BR /&gt;I'm launching a java process through a script (to set classpath, environment vars, etc). This script receives as an argument the name of the class I want to execute.&lt;BR /&gt;I have severall processes being launched using this mechanism.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm trying to kill a child process (java) but when I use "ps -ex | grep java" the command line which gives me the classpath of all .jars used by this java child process is too short. I know the specific class that was used to launch that java process. However, when I do "ps -ex | grep java" I get similar lines for all running java processes because there are severall similar JARs in the classpath and the command line displayed is truncated in the ps. So I cannot clearly identify the PID of the process I want to kill.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there any way to kill a particular java process in this scenario? Or kill the child of the script used to launch it (the script is still in the ps as long as the process is running).&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Miguel Rentes</description>
      <pubDate>Fri, 29 Feb 2008 11:58:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153042#M726267</guid>
      <dc:creator>Miguel Silva Rentes</dc:creator>
      <dc:date>2008-02-29T11:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153043#M726268</link>
      <description>Would the "-x" option, to show the command line in extended format, help?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 29 Feb 2008 12:12:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153043#M726268</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-02-29T12:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153044#M726269</link>
      <description>&lt;P&gt;&amp;gt;I'm trying to kill a child process (java) but when I use "ps -ex | grep java" the&lt;BR /&gt;&lt;BR /&gt;You don't want to use grep. Use -C:&lt;BR /&gt;$ UNIX95=EXTENDED_PS ps -xC java&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I get similar lines for all running java processes ... Or kill the child of the script used to launch it&lt;BR /&gt;&lt;BR /&gt;Then you'll have to find it by the parent:&lt;BR /&gt;$ UNIX95=EXTENDED_PS﻿ ps -xC script&lt;BR /&gt;&lt;BR /&gt;If you want to find all children:&lt;BR /&gt;$ UNIX95=EXTENDED_PS﻿ ps -ef -ocomm= -oppid= | fgrep $(UNIX95= ps -x -C script -opid=)&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2011 02:30:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153044#M726269</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-07-31T02:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153045#M726270</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I can't use ps -xC java. I get the following error:&lt;BR /&gt;&lt;BR /&gt;ps: illegal option -- C&lt;BR /&gt;usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]&lt;BR /&gt;&lt;BR /&gt;Reading the "man ps" I can see I can only have -C or -o in XPG4 (which I assume I haven't available).&lt;BR /&gt;&lt;BR /&gt;Any other ideas?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Miguel Rentes</description>
      <pubDate>Fri, 29 Feb 2008 12:27:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153045#M726270</guid>
      <dc:creator>Miguel Silva Rentes</dc:creator>
      <dc:date>2008-02-29T12:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153046#M726271</link>
      <description>Look at Dennis' response again.&lt;BR /&gt;&lt;BR /&gt;He precedes the 'ps' command with 'UNIX95= '.&lt;BR /&gt;&lt;BR /&gt;The 'UNIX95= ' (NOTE the space AFTER the = sign') turns on the XPG4 behavior for the command.</description>
      <pubDate>Fri, 29 Feb 2008 12:45:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153046#M726271</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2008-02-29T12:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153047#M726275</link>
      <description>Humm... I can't use UNIX95 either:&lt;BR /&gt;&lt;BR /&gt;$ UNIX95= ps -xC java&lt;BR /&gt;UNIX95=: Command not found.&lt;BR /&gt;&lt;BR /&gt;I'm using tcsh and the TERM variable is set to xterm (can it have any influence?)...</description>
      <pubDate>Fri, 29 Feb 2008 14:03:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153047#M726275</guid>
      <dc:creator>Miguel Silva Rentes</dc:creator>
      <dc:date>2008-02-29T14:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153048#M726276</link>
      <description>tcsh handles environment vars differently, i believe.  try:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;setenv UNIX95 1&lt;BR /&gt;ps -xC java &lt;BR /&gt;unsetenv UNIX95&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hopefully you haven't changed "root"s default shell to tcsh.  if you have, change it back to /sbin/sh immediately!  Disaster lies down that path</description>
      <pubDate>Fri, 29 Feb 2008 15:54:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153048#M726276</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-02-29T15:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153049#M726277</link>
      <description>&amp;gt;I'm using tcsh&lt;BR /&gt;&lt;BR /&gt;If you aren't use a real shell but the scummy csh or its derivatives, you need to mention that.  (That's why I use a "$" prompt in my examples.)</description>
      <pubDate>Sat, 01 Mar 2008 06:45:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153049#M726277</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-01T06:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153050#M726278</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;Doing a &lt;BR /&gt;&lt;BR /&gt;$ setenv UNIX95 1&lt;BR /&gt;&lt;BR /&gt;I could in fact use "ps -xC java" and all the command lines you told me to test. Thank you very much!&lt;BR /&gt;&lt;BR /&gt;By the way, my root user is using the /sbin/sh and all other users have /usr/local/bin/tcsh.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Miguel Rentes</description>
      <pubDate>Mon, 03 Mar 2008 08:50:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153050#M726278</guid>
      <dc:creator>Miguel Silva Rentes</dc:creator>
      <dc:date>2008-03-03T08:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: kill a process by its name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153051#M726279</link>
      <description>If you are happy with the answers given please read the following about assigning points:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
      <pubDate>Mon, 03 Mar 2008 10:18:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-a-process-by-its-name/m-p/4153051#M726279</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-03T10:18:23Z</dc:date>
    </item>
  </channel>
</rss>

