Thread Dump ºÍJavaÓ¦ÓÃÕï¶Ï£¨×ܽá°æ£©
һǰÌ᣺ΪÁË·½±ã¹ÜÀíÔÚʵ¼ÊµÄÉú²ú»·¾³Ò»°ã½«weblogic serverÆô¶¯½Å±¾¸ÄΪºǫ́×Ô¶¯ÔËÐв¢½«ÆäÊä³öÖض¨Ïòµ½Ö¸¶¨Îļþ"nohup sh startWeblogicServer.sh>ws.log",Ö®ºóÎÒÃÇÖ´ÐÐkillÃüÁî²úÉúµÄdumpÐÅÏ¢»á±£´æÔÚws.logÄÚ
¶þÖ´ÐУºÔÚ²»Í¬µÄϵͳÖÐÖ´ÐÐÃüÁͬ
windows: ctrl+break
solaris: kill -quit <pid>
hp-ux: kill -3 <pid>
linux: kill -3 <pid>
AIX: kill -3 <pid>
²é¿´pidµÄ·½·¨ ps -ef | grep java
Óöµ½¹ýaixµÄϵͳkill -3 <pid>²»ÄܲúÉúdump£¬½â¾ö·½·¨ÊÇÔÚÆô¶¯½Å±¾ÖмÓÈëÈçÏÂÅäÖÃ
aixϵͳ²úÉúdumpÅäÖò½Ö裺
1.ÔÚÆô¶¯½Å±¾Àï¼ÓÈ룺
export IBM_HEAPDUMP=true
export IBM_HEAP_DUMP=true
export IBM_HEAPDUMP_OUTOFMEMORY=true
export IBM_HEAPDUMPDIR=<directory path>
2.²é¿´ÊÇ·ñDISABLE_JAVADUMP
3.½ÓÏÂÀ´ÃüÁî¾ÍÈçÉÏÁË
Èý·ÖÎö£ºÕâÀïתµÄwonderµØÏÂÊÒÏÈÉú¹ØÓÚһЩaixϵÄdump£¬ºóÆÚÎÒ»á½Ðø·ÖÎöһЩhpºÍaixµÄdump´«ÉÏÀ´¹©´ó¼Ò²Î¿¼
IdleỊ̈߳º
"Servlet.Engine.Transports : 20" (TID:0x427F190, sys_thread_t:0x15D175E8, state:R, native ID:0xBB8) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:429)
at com.ibm.ws.util.BoundedBuffer.take(BoundedBuffer.java:161)
at com.ibm.ws.util.ThreadPool.getTask(ThreadPool.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Keep-aliveÏß³Ì (·ÇSSLģʽ)£º
"Servlet.Engine.Transports : 20" (TID:0x427F190, sys_thread_t:0x15D175E8, state:R, native ID:0xBB8) prio=5
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.j
Ïà¹ØÎĵµ£º
ÀàµÄ³õʼ»¯ºÍ¶ÔÏó³õʼ»¯ÊÇ JVM ¹ÜÀíµÄÀàÐÍÉúÃüÖÜÆÚÖзdz£ÖØÒªµÄÁ½¸ö»·½Ú£¬Google ÁËÒ»±éÍøÂ磬ÓйØÀà×°ÔØ»úÖƵÄÎÄÕµ¹ÊDz»ÉÙ£¬È»¶øÀà³õʼ»¯ºÍ¶ÔÏó³õʼ»¯µÄÎÄÕ²¢²»¶à£¬ÌرðÊÇ´Ó×Ö½ÚÂëºÍ JVM ²ã´ÎÀ´·ÖÎöµÄÎÄÕ¸üÊÇÏÊÓÐËù¼û¡£
±¾ÎÄÖ÷Òª¶ÔÀàºÍ¶ÔÏó³õʼ»¯È«¹ý³Ì½øÐзÖÎö£¬Í¨¹ýÒ»¸öʵ¼ÊÎÊÌâÒýÈ룬½«Ô´´úÂëת»»³É JVM ×Ö½ÚÂëºó£¬ ......
import java.net.InetAddress;
//±¾³ÌÐòʵÏÖÁË»ñÈ¡±¾µØIPµØÖ·
public class IP {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
InetAddress localHost;
InetAddress []ip;
try{
localHost=InetAddress.getLocalHost();
ip=InetAddr ......
1¡¢Óï·¨£º±ØÐë±È½ÏÊìϤ£¬ÔÚд´úÂëµÄʱºòIDEµÄ±à¼Æ÷¶ÔijһÐб¨´íÓ¦¸ÃÄܹ»¸ù¾Ý±¨´íÐÅÏ¢ÖªµÀÊÇʲôÑùµÄÓï·¨´íÎó²¢ÇÒÖªµÀÈκÎÐÞÕý¡£
2¡¢ÃüÁ±ØÐëÊìϤJDK´øµÄһЩ³£ÓÃÃüÁî¼°Æä³£ÓÃÑ¡ÏÃüÁîÖÁÉÙÐèÒªÊìϤ£ºappletviewer¡¢ HtmlConverter¡¢jar¡¢
java¡¢javac¡¢javadoc¡¢javap¡¢javaw¡¢native2ascii¡¢seria ......
ת×Ô
http://www.blogjava.net/hongzionline/archive/2007/09/19/146392.html
final ¹Ø¼ü×Ö ºÍ static Ó÷¨
Ò»¡¢final
¸ù¾Ý³ÌÐòÉÏÏÂÎÄ»·¾³£¬Java¹Ø¼ü×ÖfinalÓГÕâÊÇÎÞ·¨¸Ä±äµÄ”»òÕß“ÖÕ̬µÄ”º¬Ò壬Ëü¿ÉÒÔÐÞÊηdzéÏóÀà¡¢·Ç³éÏóÀà³ÉÔ±·½·¨ºÍ±äÁ¿¡£Äã¿ÉÄܳöÓÚÁ½ÖÖÀí½â¶øÐèÒª×èÖ¹¸Ä±ä£ºÉè¼Æ»òЧÂÊ¡ ......
Java³ÌÐò¿ª·¢ÈËÔ±ÐèÒªÁ˽â¸÷¸ö´æ´¢ÇøÓòµÄÌصãÒÔ¼°¶ÔÐÔÄܵÄÓ°Ï졣ȻºóÔÙ¸ù¾ÝÐèÒªÀ´µ÷ÕûÓ¦ÓóÌÐòµÄÇøÓò·ÖÅä¡£×ܵÄÀ´Ëµ£¬ÔÚ²Ù×÷ϵͳÖÐÓÐÎå¸öµØ·½¿ÉÒÔÓÃÀ´±£´æÓ¦ÓóÌÐòÔËÐÐÖеÄÊý¾Ý¡£ÕâÀàÇøÓòµÄÌصãÒÔ¼°¶ÔÐÔÄܵÄÓ°Ïì·ÖÎöÈçÏ¡£
´æ´¢ÇøÓòÒ»£º¼Ä´æÆ÷
ËäȻͬÔÚÄÚ´æÖУ¬µ«ÊDz»Í¬µÄÇøÓòÓÉÓÚÓÃ;²»Í ......