void

          Linux 常用命令

          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進程號)

          posted on 2015-12-11 15:52 void 閱讀(265) 評論(0)  編輯  收藏 所屬分類: Linux

          主站蜘蛛池模板: 镇坪县| 韶山市| 瑞昌市| 中卫市| 台东县| 浦县| 东山县| 天峻县| 温州市| 廊坊市| 金山区| 田东县| 长武县| 卢龙县| 青河县| 乡宁县| 北京市| 西乌| 田阳县| 岳阳县| 崇明县| 治多县| 丹江口市| 辽阳县| 武功县| 黄山市| 铁岭县| 平果县| 乌什县| 萍乡市| 宁南县| 万全县| 济源市| 开阳县| 大洼县| 和顺县| 黄浦区| 祁门县| 依兰县| 延津县| 云梦县|