linux 高性能服务排查方式
一、 cpu ?使用率相關(guān)
1. 火焰圖
? ? ? ?https://github.com/openresty/openresty-systemtap-toolkit#name
// 分析CPU占比
// lua 級(jí)別的
/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 級(jí)別的, -k 指的是采樣kernel;可以使用 -u 采樣user級(jí)別的,采集user級(jí)別的時(shí)候,采樣時(shí)間長(zhǎng),容易出現(xiàn)數(shù)據(jù)過(guò)大的場(chǎng)景。
/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 高性能服务排查方式的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: CSS魔法堂:那个被我们忽略的outli
- 下一篇: 关于使用fastjson统一序列化响应格