Posts

Showing posts with the label kill

Why long way for thread dump on UNIX/Linux machines? Easy Steps!

Image
jps - Java process list : Java Utilitycommand  I was looking for diagnostic ways with freely available tools from JDK then I found the great valuable command tool 'jps'. The jps command can be used with three options(l, v, m). it can work for any Java - JEE Servers such as WebLogic, WebSphere, JBoss, Tomcat. In other words, any app server that uses the latest JDK 5+ version (version 6, 7, 8 also supports). Let me walk-through those interesting options in Win and *nix platforms. Before you execute this command tool, make sure that JAVA_HOME\bin is in the PATH setting. Java Command tool : jps options jps Option : jps -l this -l option will give the full Java package name that invoked the Java process. C:\Users\pavanbsd>jps -l 9116 sun.tools.jps.Jps 8812 weblogic.Server Filtering the weblogic instance with find command on jps will give you the desired outcome. C:\Users\pavanbsd>jps -l |find "weblogic" 8812 weblogic.Server jps -v this -v option is m...

Script for Bouncing a WebLogic instance

In the last post I was made deeper research on getting the process id of all WebLogic instances with a script. After looking to that script, My asked me 'Why don't you try for a script for bouncing a WebLogic instance?'. I thought that's really good idea, this makes WebLogic Admin life more easier, which is very much need for every WebLogic Admin. Let me get all the clues before putting the logic into the script. The bounce script will take the input as WebLogic instance name. Then the script should do search for the corresponding Java Process id of given WebLogic instance. That Java Process ID can be used for finding: 1. Thread dump 2. Domain directory 3. Shutdown instance (kill the process) Above 1, 3 are commonly used commands but 2nd one required when situation like this, on the same machine if there exists multiple WebLogic domain instances then how to find the WebLogic instance started from? Here, I need to find the origin directory of startManaged...