MariaDB User-Space Markers
Newer versions of MariaDB include support for SystemTap user-space markers. The MariaDB user-space markers are enabled in Fedora 28 and RHEL 7. The markers allow SystemTap to probe various MariaDB events including the start of a query, the completion of a query and lock operations. You can list the available probe points with the following command:
stap -L 'process("/usr/libexec/mysqld").mark("*")'
Using MariaDB User-Space Markers
To use the MariaDB user-space markers on Fedora you will need:
- Membership to the stapdev group (or root access)
Examples and Demonstrations of Markers
Some short SystemTap example scripts for Mariadb:
mysql-locks.stp summarizes the lock contention
mysql-query.stp summarizes the query time for each process
mysql-slowq.stp records querys requiring more than a specified time
There are also a number of Mysql SystemTap probing examples in http://github.com/posulliv/stap can be adapted and used for MariaDB.