A Support Engineer Walkthrough on pt-stalk
Marcos Albe Principal Support Engineer - Percona Marcelo Altmann Senior Support Engineer - Percona
A Support Engineer Walkthrough on pt-stalk Marcos Albe Marcelo - - PowerPoint PPT Presentation
A Support Engineer Walkthrough on pt-stalk Marcos Albe Marcelo Altmann Principal Support Engineer - Percona Senior Support Engineer - Percona Thank You Sponsors! 2 April 23-25, 2018 SAVE THE DATE! Santa Clara Convention Center CALL FOR
Marcos Albe Principal Support Engineer - Percona Marcelo Altmann Senior Support Engineer - Percona
2
3
www.perconalive.com
Santa Clara Convention Center
5
7
9
10
11
12
13
15
check out those resources!
16
PROCESSLIST and SHOW OPEN TABLES.
17
18
19
Collect data during 60 seconds for 3 consecutive times, starting immediately.
pt-stalk --no-stalk \
20
Run as a daemon and trigger collection if InnoDB has more than 5 pending fsyncs.
pt-stalk --daemonize \
21
#!/bin/bash # Save this bash snippet as /root/delayed_slave_trg.sh; trg_plugin() { mysql $EXT_ARGV -Ee "SHOW SLAVE STATUS" | \ grep "Seconds_Behind_Master" | \ awk "{ print $2 }"; } # use like
pt-stalk --function=/root/delayed_slave_trg.sh --etc --etc
22
#!/bin/bash # save as /root/collect_perf.sh before_collect() { # run perf stat; match sleep length to --run-time /usr/bin/perf stat --all-cpus \
} # use like
pt-stalk --plugin=/root/collect_perf.sh --etc --etc
24
Linux Kernel
CPU
CPU Interconnect
DRAM I/O Bridge I/O Controller Network Controller
I/O Bus Expander Interconnect
Disk Disk Swap Port Port
Applications System libraries System Call Interface VFS Sockets Scheduler File Systems TCP/UDP Volume Manager IP Virtual Memory Block Device Interface Ethernet Device Drivers Memory Bus Interface Transports
25
Linux Kernel
CPU
CPU Interconnect
DRAM I/O Bridge I/O Controller Network Controller
I/O Bus Expander Interconnect
Disk Disk Swap Port Port
Applications (MySQL!) System libraries System Call Interface VFS Sockets Scheduler File Systems TCP/UDP Volume Manager IP Virtual Memory Block Device Interface Ethernet Device Drivers Memory Bus Interface Transports ps df /proc/diskstats SHOW ENGINE INNODB STATUS /proc/interrupts iostat lsof /proc/meminfo mpstat SHOW ENGINE INNODB MUTEX mysqladmin ext SHOW OPEN TABLES pmap /proc/procstat SHOW FULL PROCESSLIST /proc/vmstat /proc/slabinfo sysctl SHOW ENGINE TOKUDB STATUS top SHOW GLOBAL VARIABLES vmstat SHOW SLAVE STATUS netstat strace tcpdump gdb (backtraces)
26
strace tcpdump gdb (backtraces)
28
Using pt-stalk to solve problems with...
29
https://gist.github.com/altmannmarcelo/eec40a54568299c2cc11b6cf5859 203d
Marcos Albe marcos.albe@percona.com Marcelo Altmann @altmannmarcelo marcelo.altmann@percona.com