从WebLogic Server中抓取thread dump的不同方法

 从WebLogic Server中抓取thread dump的不同方法

WebLogic Server (WLS) and Java offer several ways to generate thread dumps, which are listed below in order of preference. It's always better to obtain the thread dumps by using operating system (OS) commands rather than by using Java classes or the Administration Console, because if the console is hanging, users won't be able to connect to it to issue thread dumps.

  1. Use operating system commands to get the thread dumps when WLS starts up from a command-line script:
    • On Windows OSes, thread dumps can be created by
      the thread dumps are generated in the server stdout
    • On POSIX compliant platforms (e.g. Solaris and Linux), first identify the process ID (pid) using ps -ef | grep java, then run
      kill -3 pid > td_filename 2>&1 
      Signal 3 is equivalent to SIGQUIT. 
  2. Using beasvc: 
    beasvc -dump -svcname:service_name -log:td_pathname
    • service_name is the Windows service that is running the server instance (e.g. mydomain_myserver)
    • td_pathname is the full path and the name of the file in which the thread dump will be generated into
  3. Using weblogic.WLST:
    setDomain.cmd or setDomain.sh depending on the OS
    java weblogic.WLST 
    connect("username","password","t3://:") 
    threadDump() 
    the thread dump will be generated in Thread_Dump_AdminServer.txt
  4. From a command line or shell, a thread dump can be generated via the following command (deprecated from WLS 9.0):
    setDomain.cmd or setDomain.sh depending on the OS
    java weblogic.Admin : -username -password THREAD_DUMP
    The thread dump will be generated in the server stdout defined
  5. From the WLS Administration Console a thread dump can be created by navigating to Server -> -> Monitoring -> Dump threads stack.  This method could lead to truncated thread dumps or incomplete thread dump.
  6. From the JRockit command line:
    jrcmd print_threads

 

转自:https://support.oracle.com

wlst内容参考:http://download.oracle.com/docs/cd/E13222_01/wls/docs92/config_scripting/index.html

SUM服务器监控软件对Weblogic的监控是对Weblogic中间件进行监控的软件,主要监控Weblogic的虚拟机内存监控、对Weblogic的数据库连接池进行监控、对Weblogic网站的会话数进行监控、对JMS会话进行监控等状态监控功能。

更多关于Weblogic的知识,请点击此处

业务热线电话:(+86)021-52765253 021-61172807      上海哲涛网络科技有限公司版权所有 © 2005-2018       沪ICP备06058430-1号

沪公网安备 31011302000898号

校睿宝,培训机构学员管理软件,教师工资计算软件,消课管理软件!

手机智慧课堂答题,短信答题,微信答题!

数据备份软件,文件数据备份软件,文件备份软件,B/S架构备份软件,分布式计算机备份软件!