¼¸¸öjavaС¹¤¾ßʹÓÃ×ܽájps jmap jstat
ÎÄÖÐjstat²¿·Öת×Ô
http://blog.csdn.net/kozazyh/archive/2010/02/04/5289684.aspx
ÓÃjavaÓïÑÔ±à³ÌµÄʱºò£¬sunÌṩÁ˼¸¸öС¹¤¾ß£¬ÓÃ×Å»¹ÊDz»´íµÄ£¬ÌØÒâ×öÏÂ×ܽá
1.jps
jpsÓÃÀ´²é¿´µ±Ç°javaµÄ½ø³Ì£¬ÆäʵËüµÄ¹¦ÄÜ¿ÉÒÔ»ù±¾ÉÏÓÉpsÀ´ÊµÏÖ
¼¸¸ö³£ÓõIJÎÊý£º
-q Ö»ÏÔʾpid£¬²»ÏÔʾclassÃû³Æ,jarÎļþÃûºÍ´«µÝ¸ømain ·½·¨µÄ²ÎÊý
$
>
jps
-
q
28680
23789
23651
-m Êä³ö´«µÝ¸ømain ·½·¨µÄ²ÎÊý£¬ÔÚǶÈëʽjvmÉÏ¿ÉÄÜÊÇnull
$
>
jps
-
m
28715
Jps
-
m
23789
BossMain
23651
Resin
-
socketwait
32768
-
stdout
/
data
/
aoxj
/
resin
/
log
/
stdout.log
-
stderr
/
data
/
aoxj
/
resin
/
log
/
stderr.log
-l Êä³öÓ¦ÓóÌÐòmain classµÄÍêÕûpackageÃû »òÕß Ó¦ÓóÌÐòµÄjarÎļþÍêÕû·¾¶Ãû
$
>
jps
-
l
28729
sun.tools.jps.Jps
23789
com.asiainfo.aimc.bossbi.BossMain
23651
com.caucho.server.resin.Resin
-v Êä³ö´«µÝ¸øJVMµÄ²ÎÊý
$
>
jps
-
v
23789
BossMain
28802
Jps
-
Denv.
class
.path
=/
data
/
aoxj
/
bossbi
/
twsecurity
/
java
/
trustwork140.jar:
/
data
/
aoxj
/
bossbi
/
twsecurity
/
java
/
:
/
data
/
aoxj
/
bossbi
/
twsecurity
/
java
/
twcmcc.jar:
/
data
/
aoxj
/
jdk15
/
lib
/
rt.jar:
/
data
/
aoxj
/
jd
k15
/
lib
/
tools.jar
-
Dapplication.home
=/
data
/
aoxj
/
jdk15
-
Xms8m
23651
Resin
-
Xss1m
-
Dresin.home
=/
data
/
aoxj
/
resin
-
Dserver.root
=/
data
/
aoxj
/
resin
-
Djava.util.logging.manager
=
com.caucho.log.LogManagerImpl
-
Djavax.management.builder.initial
=
com.caucho.jmx.MBeanServerBuilderImpl
2.jmap
jmapÓÃÀ´²é¿´¸ø¶¨Ò»¸ö½ø³Ì»òÕßÊǵ÷ÊÔ·þÎñÆ÷¹²Ïí¶ÔÏóÖ®¼äµÄÓ³ÉäÒÔ¼°¶ÑÖеÄϸ½Ú¡£sun¹Ù·½ÎĵµÖеĶ¨Òå
jmap
prints shared object memory maps or heap
memory details of a given process or core file or a remote debug server
Ó÷¨:
jmap Ñ¡Ïî pid
jmap Ñ¡Ïî coref
Ïà¹ØÎĵµ£º
Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......
ʵ²»ÏàÂ÷£¬JavaÊÇÎÒ¼û¹ýµÄÖ´ÐÐЧÂÊ×îµÍµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬Ç°²»¾ÃÔÚCSDNÂÛ̳ÉÏÓиöÆÀ²â£¬¼ÆËã9999µÄ½×³Ë£¬Í¬ÑùµÄÑ»·Ëã·¨£¬JavaµÄºÄʱÊÇ.NETµÄ5±¶¡£ÎÒÒÔÇ°ºÜϲ»¶Serv-U£¬×Ô´ÓËüÓÃJavaÖØд֮ºóÎÒ¾ÍÔÙҲûÓùý£¬ÊµÔÚÊÇÌ«ÂýÁË£¬ÎÒÄþ¿ÉÓÃIIS´î½¨FTP£¬ËäÈ»IIS´î½¨FTPÔÚȨÏÞ¹ÜÀíÉϺܲ»Áé»î¡£
ÎÒÓиöͬѧ£¬ËûÊǸãJavaµÄ£¬Ëû¸øÎÒ˵&ld ......
´«ÖDz¥¿ÍJAVAÅàѵstruts2ѧϰ±Ê¼ÇÒ»
Àë±ÏÒµÓÖ×ß½üÁËÒ»²½£¬ÐÄÀïÓÖĪÃûµÄ½ôÕÅÆðÀ´¡£½ñÌìÓÐÒ»¸öͬÐĹ«Ë¾·Å¼ÙÐÇÆÚѧУÀ´ÉϿΣ¬ÎÒ¶ÔÆä³ýÁËÅå·þÖ®Í⣬¾ÍÖ»ÓÐÏÛĽÁË£¬¹¤×Ê6.5£Ë¿É²»ÊÇÎÒÏÖÔÚµÄˮƽ
¸ÒÏëµÄºÇ£¬ËäÈ»ÎÒ¶Ô£³£Ç²»ÊǺܸÐÐËȤ£¬ÎÒÒ²¸üÏàÐŽÅ̤ʵµÄÈ¥×ߺÃÿһ²½À´µÃ̤ʵ£¡µ«ÊÇÕ⼸¸öͬѧËùÈ¡µÃ³É¼¨È ......
¸´Ï°Ò»ÏÂjava´úÂ룬´úÂëÎÊÌâºÜ¶àÇë¸ßÊÖ²»Áߴͽ̡£°ïÖúÖع¹¡£
public static void main(String[] args){
int employeeCount = 420000; //Ô±¹¤×ÜÊý
Employee[] ËùÓÐÖ°¹¤ = getAllEmployee();
for((i=0;i<=employeeCount ;i++) {
&n ......
»ª½Ü½ÌÓýÊÇÐÂÏç×îרҵµÄÈí¼þʵѵ»ùµØ£¬Ë¼¿ÆÍøÂ繤³Ìʦ¿¼ÊÔÖÐÐÄ¡¢ JAVA¡¢.NET¡¢phpÈí¼þÅàѵÖÐÐÄ¡¢¼ÆËã»úµÈ¼¶¿¼ÊÔÅàѵÖÐÐÄ ÊÇÔ¥±±µØÇø×î´óµÄITÈí¼þ½ÌÓý»ú¹¹£¡
Èí¼þʵѵ£º
¿Î³Ì·ÖΪ.netºÍjavaÁ½¸ö·½Ïò£¬ÓÐʵѵÔç²ÍºÍ¶ÌÆÚÈí¼þÅàѵ£¬
¡¶ÊµÑµÔç²Í¡·ÏîÄ¿£ºÕë¶Ô¼ÆËã»ú¼° ......