Thursday, 29 June 2017

Oh, Red Hat Enterprise Linux, where's my trusty killall command

So I'm about to rebuild a VM, and wanted to quickly kill off some Java processes: -

ps -elf|grep -i java

0 S wasadmin   8263      1  0  80   0 - 893904 futex_ Jun28 ?       00:06:24 /opt/ibm/WebSphere/AppServer/java_1.7.1_64/bin/java -Declipse.security -Dwas.status.socket=33985 -Dosgi.install.area=/opt/ibm/WebSphere/AppServer -Dosgi.configuration.area=/opt/ibm/WebSphereProfiles/Dmgr01/servers/dmgr/configuration -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev85_1.7.1_64_%g,nonFatal -Dcom.ibm.xtq.processor.overrideSecureProcessing=true -Xcheck:dump -Xbootclasspath/p:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/ibmorb.jar -classpath /opt/ibm/WebSphereProfiles/Dmgr01/properties:/opt/ibm/WebSphere/AppServer/properties:/opt/ibm/WebSphere/AppServer/lib/startup.jar:/opt/ibm/WebSphere/AppServer/lib/bootstrap.jar:/opt/ibm/WebSphere/AppServer/lib/jsf-nls.jar:/opt/ibm/WebSphere/AppServer/lib/lmproxy.jar:/opt/ibm/WebSphere/AppServer/lib/urlprotocols.jar:/opt/ibm/WebSphere/AppServer/deploytool/itp/batchboot.jar:/opt/ibm/WebSphere/AppServer/deploytool/itp/batch2.jar:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/lib/tools.jar -Dibm.websphere.internalClassAccessMode=allow -verbose:gc -Xms768m -Xmx2048m -Xcompressedrefs -Dws.ext.dirs=/opt/ibm/WebSphere/AppServer/java_1.7.1_64/lib:/opt/ibm/WebSphereProfiles/Dmgr01/classes:/opt/ibm/WebSphere/AppServer/classes:/opt/ibm/WebSphere/AppServer/lib:/opt/ibm/WebSphere/AppServer/installedChannels:/opt/ibm/WebSphere/AppServer/lib/ext:/opt/ibm/WebSphere/AppServer/web/help:/opt/ibm/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/opt/ibm/WebSphere/AppServer/derby -Dcom.ibm.itp.location=/opt/ibm/WebSphere/AppServer/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/opt/ibm/WebSphereProfiles/Dmgr01 -Djava.ext.dirs=/opt/ibm/WebSphere/AppServer/tivoli/tam:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/ext -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dpython.cachedir=/opt/ibm/WebSphereProfiles/Dmgr01/temp/cachedir -Dwas.install.root=/opt/ibm/WebSphere/AppServer -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/opt/ibm/WebSphereProfiles/Dmgr01 -Dcom.ibm.security.jgss.debug=off -Dcom.ibm.security.krb5.Krb5Debug=off -Djava.awt.headless=true -Dcom.ibm.ws.webservices.startup.wsdl.suppressMessages=INFO -Xscmx120m -Xgcpolicy:gencon -Xjit:iprofilerMemoryConsumptionLimit=67108864 -Djava.library.path=/opt/ibm/WebSphere/AppServer/lib/native/linux/x86_64/:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/amd64/compressedrefs:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/amd64:/opt/ibm/WebSphere/AppServer/bin:/opt/ibm/WebSphere/AppServer/nulldllsdir:/usr/lib64:/usr/lib: -Djava.endorsed.dirs=/opt/ibm/WebSphere/AppServer/endorsed_apis:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/endorsed -Djava.security.auth.login.config=/opt/ibm/WebSphereProfiles/Dmgr01/properties/wsjaas.conf -Djava.security.policy=/opt/ibm/WebSphereProfiles/Dmgr01/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /opt/ibm/WebSphereProfiles/Dmgr01/config PCCell1 Dmgr dmgr
0 S wasadmin   8620      1  0  80   0 - 558992 futex_ Jun28 ?       00:04:27 /opt/ibm/WebSphere/AppServer/java_1.7.1_64/bin/java -Xmaxt0.5 -Dwas.status.socket=41495 -Declipse.security -Dosgi.install.area=/opt/ibm/WebSphere/AppServer -Dosgi.configuration.area=/opt/ibm/WebSphereProfiles/AppSrv01/servers/nodeagent/configuration -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name=webspherev85_1.7.1_64_%g,nonFatal -Dcom.ibm.xtq.processor.overrideSecureProcessing=true -Xcheck:dump -Xbootclasspath/p:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/ibmorb.jar -Dorg.osgi.framework.bootdelegation=* -classpath /opt/ibm/WebSphereProfiles/AppSrv01/properties:/opt/ibm/WebSphere/AppServer/properties:/opt/ibm/WebSphere/AppServer/lib/startup.jar:/opt/ibm/WebSphere/AppServer/lib/bootstrap.jar:/opt/ibm/WebSphere/AppServer/lib/jsf-nls.jar:/opt/ibm/WebSphere/AppServer/lib/lmproxy.jar:/opt/ibm/WebSphere/AppServer/lib/urlprotocols.jar:/opt/ibm/WebSphere/AppServer/deploytool/itp/batchboot.jar:/opt/ibm/WebSphere/AppServer/deploytool/itp/batch2.jar:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/lib/tools.jar -Dorg.osgi.framework.bootdelegation=* -Dibm.websphere.internalClassAccessMode=allow -verbose:gc -Xms128m -Xmx768m -Xcompressedrefs -Xscmaxaot4M -Xnoaot -Xscmx90M -Dws.ext.dirs=/opt/ibm/WebSphere/AppServer/java_1.7.1_64/lib:/opt/ibm/WebSphereProfiles/AppSrv01/classes:/opt/ibm/WebSphere/AppServer/classes:/opt/ibm/WebSphere/AppServer/lib:/opt/ibm/WebSphere/AppServer/installedChannels:/opt/ibm/WebSphere/AppServer/lib/ext:/opt/ibm/WebSphere/AppServer/web/help:/opt/ibm/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/opt/ibm/WebSphere/AppServer/derby -Dcom.ibm.itp.location=/opt/ibm/WebSphere/AppServer/bin -Djava.util.logging.configureByServer=true -Duser.install.root=/opt/ibm/WebSphereProfiles/AppSrv01 -java.ext.dirs=/opt/ibm/WebSphere/AppServer/tivoli/tam:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/ext -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder -Dpython.cachedir=/opt/ibm/WebSphereProfiles/AppSrv01/temp/cachedir -Dwas.install.root=/opt/ibm/WebSphere/AppServer -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/opt/ibm/WebSphereProfiles/AppSrv01 -Dcom.ibm.security.jgss.debug=off -Dcom.ibm.security.krb5.Krb5Debug=off -Djava.awt.headless=true -Djava.library.path=/opt/ibm/WebSphere/AppServer/lib/native/linux/x86_64/:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/amd64/compressedrefs:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/amd64:/opt/ibm/WebSphere/AppServer/bin:/opt/ibm/WebSphere/AppServer/nulldllsdir:/usr/lib64:/usr/lib: -Djava.endorsed.dirs=/opt/ibm/WebSphere/AppServer/endorsed_apis:/opt/ibm/WebSphere/AppServer/java_1.7.1_64/jre/lib/endorsed -Djava.security.auth.login.config=/opt/ibm/WebSphereProfiles/AppSrv01/properties/wsjaas.conf -Djava.security.policy=/opt/ibm/WebSphereProfiles/AppSrv01/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /opt/ibm/WebSphereProfiles/AppSrv01/config PCCell1 Node1 nodeagent


so I reached for my trusty killall command: -

killall java

but the computer said "No" : -

-bash: killall: command not found

so I tried to install it: -

yum install -y killall

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
                                                                                                                                                                                                                            | 2.9 kB  00:00:00     
No package killall available.
Error: Nothing to do


Thankfully, this helped: -


which, although it was focused on Ubuntu, pointed out what I was missing: -

Hmm, instead of trying apt-get install, 

do an apt-cache search. 

On my FC15 box, killall is located in the "psmisc" package. 

But it sounds to me like something hasn't installed correctly. I would imagine killall would be installed by default on even the most stripped of distro's. Its been there the last time i installed Arch or a CentOS 6 netinst (which seemed to have a few things missing that i thought should be there)

so I tried that instead: -

yum install -y psmisc

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
  Installing : psmisc-22.20-9.el7.x86_64                                                                                                                                                                                                                                  1/1 
  Verifying  : psmisc-22.20-9.el7.x86_64                                                                                                                                                                                                                                  1/1 

Installed:
  psmisc.x86_64 0:22.20-9.el7                                                                                                                                                                                                                                                 

Complete!


and now I have killall : -

which killall

/bin/killall

and life is good again ( except for my Java processes, which have been killed )

No comments:

Yay, VMware Fusion and macOS Big Sur - no longer "NAT good friends" - forgive the double negative and the terrible pun ...

After macOS 11 Big Sur was released in 2020, VMware updated their Fusion product to v12 and, sadly, managed to break Network Address Trans...