持续记录一些排查web服务问题的linux命令

记录一些常用的web服务排查命令,会持续更新。

1、检查链接可用性及时间消耗
【命令】
curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download} "http://www.taobao.com"
【结果】
0.008::0.039::0.076::0.140::306729.000

2、统计服务器链接状态
【命令】
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
【结果】
TIME_WAIT 814
CLOSE_WAIT 1
FIN_WAIT1 1
ESTABLISHED 634
SYN_RECV 2
LAST_ACK 1

3、开启python http服务
【命令】
python -m SimpleHTTPServer

4、检查maven依赖冲突
【命令】
mvn -U dependency:tree -Dverbose
【结果】
[INFO] \- qunar.tc:qmq-client:jar:1.2.11:compile
[INFO] +- (qunar.common:common-rpc:jar:8.0.7:compile - omitted for conflict with 7.0.9)
[INFO] +- qunar.tc:qmq-common:jar:1.2.11:compile
[INFO] | +- (qunar.tc:qmq-api:jar:1.2.11:compile - omitted for duplicate)
[INFO] | +- (qunar.common:common-rpc:jar:8.0.7:compile - omitted for conflict with 7.0.9)

5、vim设置
/xxx 往下查找
?xxx 往上
n 下一个
:set hls 打开高亮
:set nohls 关闭高亮

6、mysql慢查询
select * from information_schema.PROCESSLIST where COMMAND<>'Sleep' and command <> 'killed' order by TIME desc limit 20;
用这条sql 可以方便的看到数据库里正在执行的sql,按照执行时间排序的结果

7、GLIBC版本查看
strings /lib64/libc.so.6 |grep GLIBC_

8、elastic search 查看索引某个字段的分词结果
GET your_index/your_type/your_id/_termvectors?fields=your_fieldsName
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值