常见操作命令汇总
linux命令
awk
1 | awk -F "back_" '{print $2}' 159hq.log | sort -nr | more |
grep
1 | grep -v 1540 159hq.log | grep back_ | awk -F "back_" '{ if ( $2 < 0 ) {$2=100; } sum += $2; } END { print "sum = " sum; print "average = " sum/NR }' |
ElasticSearch
curl –user elastic:changeme -XGET ‘localhost:9200/_cat/health?v&pretty’
curl -XGET “http://localhost:9200/_cluster/health?pretty=true"
curl –user “elastic:els@)!(“ -XGET “http://localhost:9200/_cluster/health?pretty=true"
java
JVM
- /usr/local/java/jdk1.7.0_80/bin/jstat -gcutil 28106
- /usr/local/java/jdk1.7.0_80/bin/jstack 28106 > 1.out
- /usr/local/java/jdk1.7.0_80/bin/jcmd 73812 GC.class_histogram | more
- cat catalina.out |grep 信息结束耗时|awk -F’信息结束耗时:’ ‘{print $2}’|awk -F’毫秒’ ‘$1>1000{print $1}’|more