当前位置:网站首页>arthas使用
arthas使用
2022-07-01 13:01:00 【一个想打代码的yebadi_】
arthas的安装
MAC 与 Linux使用
curl -O https://arthas.aliyun.com/arthas-boot.jar
Windows直接下载即可
https://arthas.aliyun.com/arthas-boot.jar
arthas启动
java -Dfile.encoding=UTF-8 -jar arthas-boot.jar
然后选择自己要的程序
输入编号回车即可
如果要退出使用stop,别用exit;
使用exit退出,如果要进入其他项目会出现端口占用情况,使用stop会关闭arthas
反编译代码
可以确认是否成功部署上新代码
// 反编译命令
格式 jad --source-only 包名到类名 空格 方法名 【--lineNumber true/false】可选项 这个没大用处
举例
jad --source-only com.community.service.CacheService getCache1 --lineNumber false
// 直接看整个类 不添加行号限制
jad --source-only com.hxb.CacheService
watch(最常用)
可以查看请求是否经过这个方法
可以查看耗时长短
可以查看入参,返回值以及异常
watch com.hxb.ext.HostHolderImpl getUser {
params,returnObj} -n 2 -x 1
细节点::
-n 表示查看次数,不设置可能会弹出很多
-x 代表解析的深度,
举例: -x 1的返回值是
@User[com.hxb.model.User@35eaa946],
-x 2的返回值会展示出来。
@User[
id=@Long[54],
type=@Integer[1],
name=@String[管理员],
phone=null,
.....
],
如果出现异常返回值是null,
所以一般需要添加上throwExp
可以展示异常
最终实现
watch com..DepartmentResource newRole {
params,returnObj,throwExp} -n 3 -x 2
有错误希望大家指点!!!
有其他常见的命令或工具也希望大家可以在评论区推荐,感谢。
边栏推荐
- 9. Use of better scroll and ref
- PG基础篇--逻辑结构管理(触发器)
- Huawei HMS core joins hands with hypergraph to inject new momentum into 3D GIS
- 啟動solr報錯The stack size specified is too small,Specify at least 328k
- Example code of second kill based on MySQL optimistic lock
- How can genetic testing help patients fight disease?
- Meta enlarge again! VR new model posted on CVPR oral: read and understand voice like a human
- oracle cdc 数据传输时,clob类型字段,在update时值会丢失,update前有值,但
- There are risks in trading
- minimum spanning tree
猜你喜欢

Redis exploration: cache breakdown, cache avalanche, cache penetration

软件测试中功能测试流程

Simple two ball loading

A Fletter version of Notepad

Redis explores cache consistency

Wave animation color five pointed star loader loading JS special effects

内容审计技术

图灵奖得主Judea Pearl:最近值得一读的19篇因果推断论文

Shell script imports stored procedures into the database

【开发大杀器】之Idea
随机推荐
Social distance (cow infection)
Development trend and market demand analysis report of China's high purity copper industry Ⓕ 2022 ~ 2028
[development of large e-commerce projects] performance pressure test - basic concept of pressure test & jmeter-38
CS5268优势替代AG9321MCQ Typec多合一扩展坞方案
When Sqlalchemy deletes records with foreign key constraints, the foreign key constraints do not work. What is the solution?
5. Use of ly tab plug-in of header component
Analysis report on the development prospect and investment strategic planning of China's wafer manufacturing Ⓔ 2022 ~ 2028
啟動solr報錯The stack size specified is too small,Specify at least 328k
Example code of second kill based on MySQL optimistic lock
Colorful five pointed star SVG dynamic web page background JS special effect
MySQL Replication中的并行复制示例详解
简单的两个圆球loading加载
Judea pearl, Turing prize winner: 19 causal inference papers worth reading recently
La taille de la pile spécifiée est petite, spécifiée à la sortie 328k
Analysis report on production and marketing demand and investment forecast of global and Chinese diamond powder industry Ⓤ 2022 ~ 2027
数字化转型再下一城,数字孪生厂商优锘科技宣布完成超3亿元融资
Function test process in software testing
How to play with the reading and writing operations of blocking sockets?
Look at the sky at dawn and the clouds at dusk, and enjoy the beautiful pictures
SSO and JWT good article sorting