Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

92.4. jstat - Java Virtual Machine Statistics Monitoring Tool

			# jstat -class 15888 1000 10
			Loaded Bytes Unloaded Bytes Time
			17409 34782.5 231 339.0 13.21
			17409 34782.5 231 339.0 13.21
			17409 34782.5 231 339.0 13.21
			17409 34782.5 231 339.0 13.21
			17409 34782.5 231 339.0 13.21
			17409 34782.5 231 339.0 13.21
		
			# jstat -gc 15888 1000 10
			S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
			13824.0 13824.0 1204.1 0.0 2766848.0 2327059.3 349696.0 318073.6 229888.0 101912.6 288 4.895 2 1.055 5.949
			13824.0 13824.0 1204.1 0.0 2766848.0 2327059.3 349696.0 318073.6 229888.0 101912.6 288 4.895 2 1.055 5.949
			13824.0 13824.0 1204.1 0.0 2766848.0 2327059.3 349696.0 318073.6 229888.0 101912.6 288 4.895 2 1.055 5.949
			13824.0 13824.0 1204.1 0.0 2766848.0 2327059.3 349696.0 318073.6 229888.0 101912.6 288 4.895 2 1.055 5.949
		
			# jstat -gcutil 15888
			S0 S1 E O P YGC YGCT FGC FGCT GCT
			8.71 0.00 84.12 90.96 44.33 288 4.895 2 1.055 5.949
		
			# jstat -compiler 15888
			Compiled Failed Invalid Time FailedType FailedMethod
			2987 0 0 59.55 0
		
			# jstat -gccapacity 15888
			NGCMN NGCMX NGC S0C S1C EC OGCMN OGCMX OGC OC PGCMN PGCMX PGC PC YGC FGC
			175104.0 2796544.0 2794496.0 13824.0 13824.0 2766848.0 349696.0 5592064.0 349696.0 349696.0 65536.0 524288.0 229888.0 229888.0 288 2
		
			# jstat -gcnew 15888
			S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
			13824.0 13824.0 1204.1 0.0 1 15 13824.0 2766848.0 2327429.8 288 4.895
		
			# jstat -gcnewcapacity 15888
			NGCMN NGCMX NGC S0CMX S0C S1CMX S1C ECMX EC YGC FGC
			175104.0 2796544.0 2794496.0 931840.0 13824.0 931840.0 13824.0 2795520.0 2766848.0 288 2
		
			# jstat -gcold 15888
			PC PU OC OU YGC FGC FGCT GCT
			229888.0 101912.6 349696.0 318073.6 288 2 1.055 5.949
		
			# jstat -gcoldcapacity 15888
			OGCMN OGCMX OGC OC YGC FGC FGCT GCT
			349696.0 5592064.0 349696.0 349696.0 288 2 1.055 5.949
		

每 1000 毫秒打印一次,一共打印 5 次,還可以加上 -h3 每三行顯示一下標題。

			# jstat -printcompilation -h3 15888
			Compiled Size Type Method
			2987 91 1 org/apache/catalina/connector/Request isAlpha