当前位置:网站首页>11. Find out the distribution of JVM objects
11. Find out the distribution of JVM objects
2022-07-18 23:43:00 【jerry_ dyy】
Jstat You can see that JVM Health of , and jstat –gc You can find out JVM GC Relevant status . and jmap、jhat Use it with , It can help us observe JVM Distribution of objects in .
Jmap –heap PID:
This command can print the summary information of a heap , Including the GC Algorithm 、 Heap configuration information 、 Usage information of each memory area :

Jmap –histo PID:
It will be arranged in descending order according to the memory space occupied by various objects , Put the object that occupies the most memory on the top . So if you just want to briefly understand the current jvm Memory usage of objects in , Just use it directly jmap –histo Command is enough , You can quickly know which object in the current memory occupies a lot of memory space .

Jmap –dump:live,format=b,file=dump.hprof PID:
This command will generate a... In the current directory dump.hprof file , This is a binary format , You can't open it directly , He took this moment JVM The snapshot of all objects in the heap memory is put into the file , For subsequent analysis .
Jhat –port 7000 dump.hprof:
Dump.hprof That is, above hmap Exported files , Use jhat This file can be analyzed .Jhat Built in web The server , Support the graphical analysis of heap dump snapshots through the browser , Specified here http The port number is 7000 port , Just use the browser to access the location of this machine 7000 port , You can graphically analyze the object distribution of heap memory .
边栏推荐
- 二叉樹心得
- pytest接口自动化测试框架 | 项目实战(pytest+allure+数据驱动)
- Shh! Fishing artifact, don't let the boss know| Real time voice to text, fast time sequence prediction, yolov6 can be used in one line of command to sort out CSV | showmeai Information Daily
- Ngrx store state management
- 如何使用redis实现分布式缓存
- Compose 轮播图
- 每日一题:合并两个排序的链表(剑指offer25)
- canal-deployer canal-adapter镜像构建,部署
- Compose 使用Coil加载网络图片
- 9、学会查看GC日志
猜你喜欢

Wechat applet_ 14. Creation and reference of components
Under dynamic memory management (C language) -- common errors and written examination questions of large factories

單行文本 超出部分省略號,多行文本超出部分省略號,指定多行

Une seule ligne de texte dépasse l'ellipse partielle, plusieurs lignes de texte dépassent l'ellipse partielle, spécifiez plusieurs lignes

Jvm-sandbox leads to the investigation of the target service JVM Metaspace oom

Learn more about Arduino steering gear control library file servo h

7月献礼,买云盘就送特级桂七,仅限2个月,欲购从速

每日一题:最近请求次数(剑指offer042)

最大子数组异或和
动态内存管理(C语言)下--常见错误及大厂笔试题
随机推荐
6. JVM generational model -- garbage collection in the old age
Use of res.cc
Execution plan of SQL statement
Binary tree experience
canvas无数个三角形动画js特效
Design of DHT11 temperature and humidity sensor based on stm32
MySQL storage model
Jedi survive eating chicken 98K does not automatically close the mirror
Programming examples of stm32f1 and stm32cubeide-w25q-spi-flash driver
Applet: the picker view selector scrolls quickly. When confirming, the "value displays an error."“
Wechat applet_ 15. Pure data field
nodejs-Joi模块验证
用cmd命令进行磁盘清理(主要是系统盘)
MySQL transaction isolation mechanism
Pytest interface automation testing framework | pytest combines secondary packaging to realize interface automation
How to add compose modify later
每日一题:回文链表(剑指off027)
ACM board
Compose uses coil to load network pictures
绝地求生 吃鸡 98k 不自动关镜子