jvm命令

1.找到java进程

 ps -ef|grep java

2. jmap -heap pid:输出堆内存设置和使用情况

 jmap -heap pid

3.输出以下内容

[root@ecs-4d56 ~]# jmap -heap 1093
Attaching to process ID 1093, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.191-b12

using parallel threads in the new generation.
using thread-local object allocation.
Mark Sweep Compact GC

Heap Configuration:
   MinHeapFreeRatio         = 40
   MaxHeapFreeRatio         = 70
   MaxHeapSize              = 7516192768 (7168.0MB)
   NewSize                  = 4294967296 (4096.0MB)
   MaxNewSize               = 4294967296 (4096.0MB)
   OldSize                  = 3221225472 (3072.0MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

Heap Usage:
New Generation (Eden + 1 Survivor Space):
   capacity = 3865509888 (3686.4375MB)
   used     = 2144772272 (2045.4142303466797MB)
   free     = 1720737616 (1641.0232696533203MB)
   55.48484764346824% used
Eden Space:
   capacity = 3436052480 (3276.875MB)
   used     = 2092850688 (1995.89794921875MB)
   free     = 1343201792 (1280.97705078125MB)
   60.90857750810605% used
From Space:
   capacity = 429457408 (409.5625MB)
   used     = 51921584 (49.51628112792969MB)
   free     = 377535824 (360.0462188720703MB)
   12.090042698716237% used
To Space:
   capacity = 429457408 (409.5625MB)
   used     = 0 (0.0MB)
   free     = 429457408 (409.5625MB)
   0.0% used
tenured generation:
   capacity = 3221225472 (3072.0MB)
   used     = 320920464 (306.05360412597656MB)
   free     = 2900305008 (2765.9463958740234MB)
   9.9626824259758% used

40493 interned Strings occupying 4612712 bytes.

4.当前系统JVM内的Eden、Survivor、老年代的内存使用情况,还有youngGC和 full GC的执行次数以及耗时。

jstat -gc pid 2000

输出以下信息

up-168991dbc06f06465a5414a2e380192c7df.png

各字段解释

up-b102b62b00c27830da897d178059065e347.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ITSDSDFSDF

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值