Percona-Toolkit系列(23) --- pt-sift

pt-sift

pt-sift:官方地址

說明

用途:用於分析、查看pt-stalk命令產生的文件內容,並生產概要信息,然後通過輸入不同的命令查看不同的內容。如,輸入m,查看的是SHOW STATUS命令的內容。

語法:

pt-sift FILE|PREFIX|DIRECTORY

如果不指定文件、目錄等參數,那麼默認會瀏覽/var/lib/pt-stalk目錄下的文件。

具體例子

顯示所有pt-stalk收集的信息

這是一個交互式的命令行,可以通過輸入?來查看幫助信息,通過輸入不同的命令顯示不同的內容。

[root@BigData ~]# pt-sift /var/lib/pt-stalk
======== unknown at 2019_08_01_09_14_45 DEFAULT (1 of 1) ========
--diskstats--
  #ts device    rd_s rd_avkb rd_mb_s rd_mrg rd_cnc   rd_rt    wr_s wr_avkb wr_mb_s wr_mrg wr_cnc   wr_rt busy in_prg    io_s  qtime stime
 {13} dm-0       2.5     8.0     0.0     0%    0.0     1.8    60.7    19.2     1.1     0%   25.1   414.1  42%      0    63.2  391.2   6.7
 dm-0  0% . . 25% 0% 20% 5% 0% 95% 100% 65% 30% 100% .
--vmstat--
 r b swpd    free buff    cache si so bi bo in cs us sy id wa st
12 0    0 3938112 2124 15537840  0  0  3 72  3  3 23  5 71  1  0
wa 0% . . . . . . . . 5% . 0% 5% . 0%
--innodb--
    txns: 16xnot (0s)
    0 queries inside InnoDB, 0 queries in queue
    Main thread: sleeping, pending reads 0, writes 0, flush 0
    Log: lsn = 34703945612, chkp = 34703909596, chkp age = 36016
    Threads are waiting at:
    Threads are waiting on:
--processlist--
    State
     22
      3  Reading from net
      1  NULL
    Command
     22  Sleep
      3  Connect
      1  Query
--stack traces--
    No stack trace file exists
--oprofile--
    No opreport file exists

支持輸入的選項:

  • 1 Default action: summarize files
  • 0 Minimal action: list files
    • View all the files in less
  • d Invoke ‘diskstats’ on the disk performance data
  • i View the first INNODB STATUS sample in ‘less’
  • m Invoke ‘pt-mext’ to show the SHOW STATUS counters side by side
  • n Summarize the netstat -antp status data
    — NAVIGATION —
  • j Select the next timestamp
  • k Select the previous timestamp
  • q Quit the program
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章