Tuesday, May 31, 2016

Weblogic process list (ps) with weblogic server names

Many times when using weblogic you want to kill specific weblogic servers.
When you run ps, you get a huge blurb of data in the weblogic process lines.
Even if you use 'jps' (java ps) it will give a much shorter list but it will lack the weblogic server names that correspond to the processes.

here is a command that can be run and will give exactly what we want:

    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

No comments:

Post a Comment

Feel free to comment. No links/URLs allowed in comments.