I need to find the weblogic instances which are up and running.
My unix box has both java 5 and 6 and have more than one weblogic domain.
I need to kill the java instance of one particular domain.
Here is the out put for ps -ef | grep java command, but couldn't figure out which PID is for which domain instance.
Please help.
ps -ef | grep java
weblogic 16374 21956 0 23:30:33 ? 1:00 /app/bea/jdk1.6.0_33/bin/java -Xmx1024m -Xms256m -Dlog4j.configuration=file:///
root 22733 22732 0 Apr 29 ? 123:29 ../jre/bin/java -da -server -Dtw.server=false -Djava.security.manager=com.tripw
weblogic 16862 21956 0 23:31:13 ? 2:04 /app/bea/jdk1.6.0_33/bin/java -Xmx1024m -Xms256m -Dlog4j.configuration=file:///
weblogic 8445 21956 0 18:32:33 ? 3:29 /app/bea/jdk1.6.0_33/jre/bin/java -Dweblogic.log.StdoutSeverity=Debug -Dweblogi
weblogic 16529 21956 0 May 29 ? 88:28 /app/bea/home/jdk150_15/bin/java -server -Xms1024m -Xmx1024m -XX:MaxPermSize=25
weblogic 15357 5681 0 00:07:14 pts/4 0:00 grep java
weblogic 14088 21956 0 23:28:00 ? 0:33 /app/bea/jdk1.6.0_33/bin/java -Dlog4j.configuration=file:///app/bea/weblogic12c
weblogic 2129 21956 0 23:13:41 ? 24:14 /app/bea/jdk1.6.0_33/bin/java -server -Xms2048m -Xmx2048m -XX:MaxPermSize=512m
There mightbe possibility that your ps output is truncated by default.
Like on solaris box the ps output will be truncated like above in that case you can use below command
/usr/ucb/ps awwx|grep java|grep -i Admin -This will show Admin Server
/usr/ucb/ps awwx|grep java|grep -i "Managed_server_Name" - For Managed server
/usr/ucb/ps awwx|grep java|grep -i Node - For Node manager process
To identify by pid by domain you can use command like
/usr/ucb/ps awwx|grep java|grep -i "DOmain_name" |grep -i "Managed_server_name"
You can check domain name and managed server name using Admin console
Use jdk
instead:
ps -ef | grep jdk
The result would look like this:
1005 8383 31663 2 Jun04 ? 00:27:49 /weblogic103/jdk160_05/jre/bin/java -Dweblogic.Name=AdminServer ... etc
In Unix, use -efl parameters on 'ps' command. Then play with the power of grep as you need.
Below command will display the java processes, running for all the domains and also with your weblogic user.
ps -efl | grep weblogic | grep java | grep Dweblogic.Name | grep -v grep
Nice way to see just the weblogic processes in ps with their weblogic server names:
ps -aef | grep javaee | grep Dweblogic.Name | sed -e 's/\-Dweblogic\.Name/WLPROC/g' -e 's/\-[^ ]*\s//g' -e 's/\/[^ ]*\s//g'
Here is an example output:
userX 10611 10608 5 05:34 pts 00:03:13 WLPROC=AnalyticProviderServices0 weblogic.Server
userX 20918 20915 0 May26 pts 00:18:28 WLPROC=AdminServer weblogic.Server
Use:
ps -ef | grep Middle
That will list the process running from the directory middleware:
oracle@solaris2:~$ ps -ef | grep Middle
oracle 4998 2728 0 21:32:37 ? 0:00 /bin/sh/u01/Oracle/Middleware/user_projects/domains/ETPortalDEV_domain/bin/sta
oracle 2267 1488 0 20:12:06 ? 0:00 /bin/sh/u01/Oracle/Middleware/user_projects/domains/sites_domain/bin/startWebL
root 1488 1 0 20:05:26 ? 0:00 su - oracle -c /u01/Oracle/Middleware/user_projects/domains/sites_domain/bin/st
oracle 480 29078 0 12:00:46 pts/2 0:00 grep Middle