How To Launch jstat On Linux 這篇介紹How To Launch jstat On Linux。
Example 1 2 3 4 5 6 7 8 9 10 11 12 13 $ jstat -gc -t 11656 10000 30 Params: -gc: garbage collection related statistics will be printed -t timestamp since JVM was started will be printed 11656: target JVM process Id 10000: statistics will be printed every 10,000 milliseconds (i.e. 10 seconds). 30: statistics will be printed for 30 iterations. Thus, the above option will cause the JVM to print metrics for 300 seconds (i.e. 10 seconds x 30 iterations).
Result Output: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 [root@example] Timestamp S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT 58955.9 0.0 32768.0 0.0 32768.0 4587520.0 2555904.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 58965.9 0.0 32768.0 0.0 32768.0 4587520.0 2654208.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 58975.9 0.0 32768.0 0.0 32768.0 4587520.0 2752512.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 58985.9 0.0 32768.0 0.0 32768.0 4587520.0 2850816.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 58995.9 0.0 32768.0 0.0 32768.0 4587520.0 2949120.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59005.9 0.0 32768.0 0.0 32768.0 4587520.0 3637248.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59015.9 0.0 32768.0 0.0 32768.0 4587520.0 3735552.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59025.9 0.0 32768.0 0.0 32768.0 4587520.0 3833856.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59035.9 0.0 32768.0 0.0 32768.0 4587520.0 3932160.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59045.9 0.0 32768.0 0.0 32768.0 4587520.0 4030464.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59055.9 0.0 32768.0 0.0 32768.0 4587520.0 4128768.0 2719744.0 664397.9 117868.0 105008.1 15212.0 12647.9 339 12.181 0 0.000 12.181 59065.9 0.0 32768.0 0.0 32768.0 4587520.0 524288.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59075.9 0.0 32768.0 0.0 32768.0 4587520.0 589824.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59085.9 0.0 32768.0 0.0 32768.0 4587520.0 688128.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59095.9 0.0 32768.0 0.0 32768.0 4587520.0 819200.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59105.9 0.0 32768.0 0.0 32768.0 4587520.0 884736.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59115.9 0.0 32768.0 0.0 32768.0 4587520.0 983040.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59125.9 0.0 32768.0 0.0 32768.0 4587520.0 1703936.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59135.9 0.0 32768.0 0.0 32768.0 4587520.0 1769472.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59145.9 0.0 32768.0 0.0 32768.0 4587520.0 2621440.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59155.9 0.0 32768.0 0.0 32768.0 4587520.0 2752512.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59165.9 0.0 32768.0 0.0 32768.0 4587520.0 2818048.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59175.9 0.0 32768.0 0.0 32768.0 4587520.0 2916352.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59185.9 0.0 32768.0 0.0 32768.0 4587520.0 3637248.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59195.9 0.0 32768.0 0.0 32768.0 4587520.0 3735552.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59205.9 0.0 32768.0 0.0 32768.0 4587520.0 3833856.0 2719744.0 675338.9 117868.0 105008.1 15212.0 12647.9 340 12.197 0 0.000 12.197 59215.9 0.0 32768.0 0.0 32768.0 4587520.0 32768.0 2719744.0 669247.7 117868.0 105008.1 15212.0 12647.9 341 12.226 0 0.000 12.226 59225.9 0.0 32768.0 0.0 32768.0 4587520.0 294912.0 2719744.0 669247.7 117868.0 105008.1 15212.0 12647.9 341 12.226 0 0.000 12.226 59235.9 0.0 32768.0 0.0 32768.0 4587520.0 393216.0 2719744.0 669247.7 117868.0 105008.1 15212.0 12647.9 341 12.226 0 0.000 12.226 59245.9 0.0 32768.0 0.0 32768.0 4587520.0 1081344.0 2719744.0 669247.7 117868.0 105008.1 15212.0 12647.9 341 12.226 0 0.000 12.226 Timestamp – time since the start time of the target JVM in seconds. S0C – Survivor 0 region capacity in KB S1C – Survivor 1 region capacity in KB S0U – Survivor 0 region utilized space in KB S1U – Survivor 1 region utilized space in KB EC – Eden region capacity in KB EU – Eden region’s utilized space in KB OC – Old region capacity in KB OU – Old region’s utilized space in KB MC – Metaspace region capacity in KB MU – Metaspace region utilized space in KB CCSC – Compressed Class space regions capacity in KB CCSU – Compressed Class space regions utilized space in KB YGC – Number of Young GC events that have occurred so far YGCT – Amount of Young GC time spent so far FGC – Number of Full GC events that have occurred so far FGCT – Amount of Full GC time spent so far GCT – total amount of GC time spent so far (basically YGCT + FGCT) 主要觀測FGC欄位是否有非0數值出現,代表有發生Full GC event