查看服务器配置:lscpu查看所有内核参数:sysctl -a (sysctl net.ipv4.ip_local_port_range)统计nginx的请求数量:awk '{print $7}' access.log|wc -lcat access.log |awk '{print $1,$9}'|grep '500'|wc -l查看TCP连接的状态信息:netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'查看内存(当前路径下的文件):du -sh *(整个磁盘)df -h查看相关路径: nginx -V删除已占用的port: netstat -anp |grep :port19004查看CPU使用情况:top进程查看进程相关信息占用的内存情况,pmap -d 5647POST请求:curl "http://11.127.11.10:15060/gbes-evalu/eval/basePriceShow/getEvaluBasePriceShowList" -d '{"nodeId": "efe2a766fad8474e8b98c5088ddc6434", "userId": "0d9b6d97b04744b5bf844a229b84d10f"}' --header "Content-Type: application/json" --cookie "855dce8aa28eba069d65e45d0cca2064=online_7139_e3d7b9da711b460a9b999a2b50ca42da"
网络连接相关:
查看端口对应的进程:netstat -tunlp|grep 182统计80端口连接数:netstat -nat|grep -i "80"|wc -l统计已连接上的,状态为“established" (已经建立的连接):netstat -na|grep ESTABLISHED|wc -l查看访问最频繁的前100个IP :awk '{print $1}' access.log | sort -n |uniq -c | sort -rn | head -n 100统计来自某个地址的链接数:netstat -tun|awk '{print $5}'|cut -d : -f1|sort|uniq -c|sort -n查看正在监听的连接:netstat -ln
nginx 日志分析常用命令:https://www.cnblogs.com/steven9898/p/11298787.html
