linux 高性能服务排查方式
一、 cpu ?使用率相關(guān)
1. 火焰圖
? ? ? ?https://github.com/openresty/openresty-systemtap-toolkit#name
// 分析CPU占比
// lua 級別的
/openresty-systemtap-toolkit/ngx-sample-lua-bt -p 32615 --luajit20 -t 30 >?2_32615.bt
/openresty-systemtap-toolkit/fix-lua-bt?2_32615.bt?>?2_32615_flame.bt
/FlameGraph/stackcollapse-stap.pl?2_32615_flame.bt?> 2_32615_flame.cbt
/FlameGraph/flamegraph.pl?2_32615_flame.cbt > 2_32615_flame.svg
// c kernel 級別的, -k 指的是采樣kernel;可以使用 -u 采樣user級別的,采集user級別的時候,采樣時間長,容易出現(xiàn)數(shù)據(jù)過大的場景。
/openresty-systemtap-toolkit/sample-bt -p 16061 -t 30 -k >?k.bt
/FlameGraph/stackcollapse-stap.pl?k.bt?> k.cbt
/FlameGraph/flamegraph.pl?k.cbt > k.svg
二、內(nèi)存相關(guān)
TODO
?
轉(zhuǎn)載于:https://www.cnblogs.com/Renekton/p/9758478.html
總結(jié)
以上是生活随笔為你收集整理的linux 高性能服务排查方式的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS魔法堂:那个被我们忽略的outli
- 下一篇: linux 其他常用命令