zoukankan      html  css  js  c++  java
  • pt-stalk

    1、名词解释
    Collect forensic data about MySQL when problems occur
    在问题发生的时候采集现场数据
    pt-stalk waits for a trigger condition to occur, then collects data to help diagnose problems. The tool is designed to run as a daemon with root privileges, so that you can diagnose intermittent problems that you cannot observe directly. You can also use it to execute a custom command, or to collect data on demand without waiting for the trigger to occur
     

    在一定条件下触发,采集一些监控数据便于分析问题。运行该功能需要有root权限。可以作为一个实时采集的功能,也可以设置触发条件。

    2、例子

    [root@typhoeus79 mysql_5580]# pt-stalk --collect-tcpdump --function status --variable Threads_connected --threshold 1 -- --user=root --password='c0BsZjR57MgAGOk6IWZAMarVVg0' --socket=./tmp/mysql.sock 
    Overwriting PID file /var/run/pt-stalk.pid because its PID (15881) is not running
    2013_12_25_11_11_16 Starting /data1/guosong/bin/pt-tool/bin/pt-stalk --function=status --variable=Threads_connected --threshold=1 --match= --cycles=5 --interval=1 --iterations= --run-time=30 --sleep=300 --dest=/var/lib/pt-stalk --prefix= --notify-by-email= --log=/var/log/pt-stalk.log --pid=/var/run/pt-stalk.pid --plugin=
    2013_12_25_11_11_53 Check results: status(Threads_connected)=2, matched=yes, cycles_true=1
    2013_12_25_11_11_54 Check results: status(Threads_connected)=2, matched=yes, cycles_true=2
    2013_12_25_11_11_55 Check results: status(Threads_connected)=2, matched=yes, cycles_true=3
    2013_12_25_11_11_56 Check results: status(Threads_connected)=2, matched=yes, cycles_true=4
    2013_12_25_11_11_57 Check results: status(Threads_connected)=2, matched=yes, cycles_true=5
    2013_12_25_11_11_57 Collect 1 triggered
    2013_12_25_11_11_57 Collect 1 PID 17396
    2013_12_25_11_12_06 Collect 1 done
    2013_12_25_11_12_06 Sleeping 300 seconds after collect

    采集的数据放在--dest目录下,包含如下文件:

    这些数据都是原始数据,我们可以根据这些来分析当时MySQL或者主机是否有异常

     http://www.orczhou.com/index.php/2012/06/mysql-troubleshooting-with-pt-stakl/

  • 相关阅读:
    360云盘、百度云、微云……为什么不出 OS X(Mac 端)应用呢?(用户少,开发成本高)(百度网盘Mac版2016.10.18横空出世)
    其实 Dropbox 的缺点也很明显,速度慢,空间小(我对国内的网盘的建议)
    为什么百度云、360云盘等都取消了同步盘功能?
    验证API
    操作系统进程压榨案例
    查询功能
    JavaScript 动画库和开发框架
    指针
    Attribute Routing
    自定义验证特性
  • 原文地址:https://www.cnblogs.com/gsblog/p/3490260.html
Copyright © 2011-2022 走看看