Linux命令类
tail 命令
1.最常用的tail -f<br>tail -200f alarmsocket.log
2.加检索 tail -f |grep <br>tail -200f alarmsocke.log |grep 成功
grep命令
less命令
awk命令<br>
find<br>
pgm
tsar命令
top
du/df
java三板斧
jps
jinfo
jmap
jmap -dump:live,format=b,file=/tmp/heap2.bin 2815<br>jmap -dump:format=b,file=/tmp/heap3.bin 2815<br>
jmap -heap 2815<br>
jstat
jstat参数众多,但是使用一个就够了<br><br>jstat -gcutil 2815 1000
jdb
jdb可以用来预发debug,假设你预发的java_home是/opt/taobao/java/,远程调试端口是8000.那么<br>jdb -attach 8000<br>
CHLSDB
CHLSDB感觉很多情况下可以看到更好玩的东西,不详细叙述了。<br>查询资料听说jstack和jmap等工具就是基于它的。<br>
Arthas
下载https://arthas.aliyun.com/zh-cn/
启用
执行命令
命令文档https://alibaba.github.io/arthas/dashboard
常用命令
thread
jad
trace IMerchantItemReadService selectActivityItemList
watch com.a.CommonController getDevicePoliceList "{params,returnObj}" -x 2 -b