Quantcast
Channel: BlogJava-void-随笔分类-Linux
Viewing all articles
Browse latest Browse all 10

Linux 常用命令

$
0
0
ps -ef | grep java
kill -9 pid
netstat -tunlp |grep 2050
history
curl

curl -H "protocol: json" -d '[1,"getTotalPeopleByRoomAndDay",1,0,{"1":{"i32":1018267},"2":{"i32":1460217600},"3":{"i32":1460304000}}]' 'http://172.17.10.104:16082/soa/roomdj/thrift/djstatisdataservice'
curl -H "protocol: json" -d '[1,"getAllSongsOfRoom",1,0,{"1":{"i32":1086538}}]' http://10.1.113.63:16082/soa/roomdj/thrift/djservice
curl -H "protocol: json" -d '[1,"reloadConf",1,0,{}]' http://172.17.10.104:16075/canal/thrift/confmemoryService

pstack 8257|grep ^Thread|wc -l         (这个目测可以查你的进程开了多少个线程)

ps --no-heading 58061 | wc -l  (根据pid查询是否存在,存在1,不存在0)

jstat -gcutil 58062 1000 5 (判断JVM垃圾回收是否正常)

jstat -gc 502995 2s (判断JVM垃圾回收是否正常)

jmap -dump:format=b,file=2.out 502995 (打出程序堆栈文件)

jhat 2.out (CMD命令,分析堆栈文件)

jmap -heap 841048 (查询程序堆)

du -h --max-depth=1 ./ (du查看目录大小)

tail -f xxx.log (即时查看日志)

tail -200 xxx.log |grep xxx (过滤,只查看grep的内容)

tail -2000 app.log |grep -A 5 ERROR (-C 匹配及上下5行, -B 匹配及前5行, -A 匹配及后5行

jps -v (–v :输出jvm参数, –l:输出主类或者jar的完全路径名, –q :仅仅显示java进程号)


void 2015-12-11 15:52 发表评论

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images