linux 60s分析法

描述

碰到一臺(tái)有問題的linux服務(wù)器,可以先使用一下命令了解數(shù)據(jù),便于之后分析

  • uptime

  • dmesg|tail

  • vmstat 1

  • mpstat -P ALL 1

  • pidstat 1

  • iostat -xz 1

  • free -m

  • sar -n DEV 1

    Linux 3.10.0-1160.el7.x86_64 (centos7)    2021年04月14日     _x86_64_    (1 CPU)
    
    10時(shí)50分07秒     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
    10時(shí)50分08秒    enp0s3      1.00      1.00      0.06      0.18      0.00      0.00      0.00
    10時(shí)50分08秒        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
    

    rxpck/s、txpck/s:每秒接受包數(shù)量,每秒發(fā)送包數(shù)量

    rkb/s、txkb/s:每秒接受、發(fā)送的kb字節(jié)數(shù)

    # 查看網(wǎng)絡(luò)帶寬
    [root@centos7 ~]# ethtool enp0s3 |grep Speed
      Speed: 1000Mb/s
    
  • sar -n TCP,ETCP 1
  • top

關(guān)于系統(tǒng)負(fù)載 load average可以參考理解Linux系統(tǒng)負(fù)荷

引用

https://netflixtechblog.com/linux-performance-analysis-in-60-000-milliseconds-accc10403c55
https://docs.pingcap.com/zh/tidb/stable/tune-operating-system

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容