In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Pt-ioprofile is a tool belonging to percona-toolkit. It uses strace and lsof to check the IO of the monitoring process and print table files and active IO. By default, it monitors the mysqld process for 30 seconds.
Warnings and risks:
Pt-ioprofile may freeze the service, crash process, make the process worse, or make the process dormant.
Pt-ioprofile is an intrusive tool that is generally not used in a production environment unless you understand and accept the risk.
Format:
Pt-ioprofile [OPTIONS] [FILE]
Default parameters:
-- aggregate The aggregate function, either C or C.
-- cell The cell contents.
There are three values:
Count Count of I/O operations
Sizes Sizes of I/O operations
Times I take O operation timing (default)
-- group-by The group-by item.
There are three values:
All Summarize into a single line of output
Filename One line of output per filename (default)
Pid One line of output per process ID
-- profile-pid The PID to profile, overrides L.
# specify the process number for monitoring
-- profile-process The process name to profile.
Specify the process name of the monitor
-- run-time How long to profile.
# Monitoring duration. Default is 30s.
-- save-samples Filename to save samples in; these can be used for later analysis.
Example:
# insert test data with sysbench
[root@Darren1 lua] # sysbench--time=20-- threads=4-- mysql-host=localhost-- mysql-user=root-- mysql-password='147258'-- mysql-db=sbtest-- tables=10-- table_size=100000 / home/mysql/sysbench-1.0.3/src/lua/oltp_insert.lua prepare
# Monitoring IO related to mysqld process:
[root@Darren1 sysbench-1.0.3] # pt-ioprofile-- run-time=5
Thu Jun 1 22:46:29 CST 2017
Tracing process ID 5875
Total pread read pwrite write fsync open close lseek ftruncate filename
4.774836 2.253120 0.000000 1.855958 0.000000 0.665758 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/ibdata1
0.873437 0.000000 0.000000 0.000000 0.293659 0.000000 0.000000 0.000000 0.000045 0.579733 / data/mysql/mysql3306/data/innodb_status.5875
0.615918 0.000000 0.000000 0.000000 0.615918 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/undo001
0.420569 0.420518 0.000000 0.000000 0.000000 0.000051 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/undo002
0.224583 0.000000 0.000000 0.000000 0.224583 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/sbtest/sbtest4.ibd
0.033272 0.000000 0.033259 0.000000 0.000000 0.000000 0.000013 0.000000 / data/mysql/mysql3306/logs/mysql-bin.000035
0.028929 0.000000 0.000000 0.000000 0.028929 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/mysql/innodb_index_stats.ibd
0.025752 0.000000 0.000000 0.000000 0.025752 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/sbtest/sbtest1.ibd
0.007142 0.000000 0.000000 0.000000 0.007142 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/undo003
0.006129 0.000000 0.000000 0.000318 0.000000 0.005811 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/ib_logfile0
0.004302 0.000000 0.000000 0.000000 0.004302 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/sbtest/sbtest2.ibd
0.000350 0.000000 0.000152 0.000000 0.000000 0.000000 0.000119 0.000079 0.000000 0.000000 / dev/urandom
0.000180 0.000000 0.000000 0.000000 0.000180 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/general.log
0.000135 0.000000 0.000000 0.000000 0.000135 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/sbtest/sbtest3.ibd
0.000053 0.000000 0.000000 0.000000 0.000053 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/mysql/innodb_table_stats.ibd
0.000030 0.000000 0.000000 0.000000 0.000030 0.000000 / data/mysql/mysql3306/tmp/ib49MzXQ
0.000024 0.000000 0.000000 0.000000 0.000024 0.000000 0.000000 0.000000 / data/mysql/mysql3306/data/error.log
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.