当前位置:网站首页>Summary of Arthas vmtool command
Summary of Arthas vmtool command
2022-06-23 08:40:00 【lixia0417mul2】
rthas vmtool The command is mainly used to view the value of the instance memory object , For example, the following code :
public class Instance {
private static Map<String, Integer> configMap = Maps.newHashMap();
private Map<String, Integer> configMap1 = Maps.newHashMap();
public void init(){
configMap.put("AAA", 10000);
configMap.put("BBB", 20000);
configMap.put("CCC", 30000);
configMap1.put("A", 100);
configMap1.put("B", 200);
configMap1.put("C", 300);
}
}
public class Test {
private static Instance inst = new Instance();
public static void main(String[] args) throws Exception{
inst.init();
Thread.sleep(600000L);
}
}
adopt vmtool The command can view the value of a specific instance , However, this command cannot view the values of class variables , To view the value of a class variable, you need to use getstatic command , such as getstatic Class name Class variable name
Besides , It can be done by, for example vmtool --action getInstances --className org.example.Instance --express 'instances[0].get(4).getXX()’ And so on , Support ognl expression , By the way ,arthas Can traverse a list, Then find the object that is equal to a certain value inside : Sometimes you also need to filter the collection objects according to certain conditions , Like trying to find out all age Greater than 5 Of Pojo Of name, It can be written like this
watch Test test “params[0].{? #this.age > 5}.{name}” -n 1
边栏推荐
- Chapter 1 open LDAP master-slave synchronization tower construction
- Deep analysis and Simulation of vector
- There are some limitations in cluster expansion and contraction
- 驱动架构 & platform平台总线驱动模型
- [paper notes] catching both gray and black swans: open set supervised analog detection*
- Deep learning ----- different methods to realize vgg16
- Object. Defineproperty() and data broker
- Go data types (II) overview of data types supported by go and Boolean types
- Driver Architecture & platform platform bus driver model
- Set the time zone in ci4 (CodeIgniter 4)
猜你喜欢

RTSP/ONVIF协议视频平台EasyNVR启动服务报错“service not found”,该如何解决?

Hongmeng reads the resource file

Qualcomm 9x07 two startup modes

Why use growth neural gas network (GNG)?

typeScript的介绍与变量定义的基本类型
![Vulnhub | dc: 3 | [actual combat]](/img/97/e5ba86f2694fe1705c13c60484cff6.png)
Vulnhub | dc: 3 | [actual combat]

Which one is better for rendering renderings? 2022 latest measured data (IV)

6月《中国数据库行业分析报告》发布!智能风起,列存更生

“方脸老师”董宇辉再回应热度下降:把农产品直播做好让农民受益 考虑去支教

Implementation of AVL tree
随机推荐
Monitor the cache update of Eureka client
Map interface and its sub implementation classes
Install a WGet for your win10
Derivation and loading of the trained random forest model
Summary of communication mode and detailed explanation of I2C drive
What are the PCB characteristics inspection items?
给你的win10装一个wget
PCB电路板特性检查项目都有哪些?
986. Interval List Intersections
谈谈 @Autowired 的实现原理
Use newbeecoder UI implements data paging
鸿蒙读取资源文件
When easynvr service is started, video cannot be played due to anti-virus software interception. How to deal with it?
Third party payment in the second half: scuffle to symbiosis
渲染效果图哪家好?2022最新实测(四)
Single core driver module
Map接口及其子实现类
[paper notes] catching both gray and black swans: open set supervised analog detection*
“方脸老师”董宇辉再回应热度下降:把农产品直播做好让农民受益 考虑去支教
There are some limitations in cluster expansion and contraction