PMDAMYSQL(1)
π PMDAMYSQL π
okay bestie, gather round, because we're about to talk about the pmdamysql manual page β that's the PMDAMYSQL(1) one, from the General Commands Manual section. it's giving database-girlie, it's giving monitoring royalty, and honestly? we're obsessed. π
β¨ NAME β¨
pmdamysql β the MySQL and MariaDB database PMDA. that's it, that's the name, short and iconic. π
πΈ DESCRIPTION πΈ
so like, pmdamysql is a Performance Co-Pilot PMDA (yes queen, a whole Performance Metrics Domain Agent) and what she does is extract live performance data from a running MySQL or MariaDB database. live. as in happening right now. as in she's watching your DB breathe and reporting back. main character energy fr fr. β¨
π¦ INSTALLATION π¦
okay so first things first, setup. pmdamysql pulls its config from a file, and she looks for it in this exact order:
/etc/pcpdbi.conf$PCP_PMDAS_DIR/mysql/mysql.conf
that file can hold overridden values (and it's Perl code, jsyk) for the settings that get listed at the very start of pmdamysql.pl, namely:
- database name β see
DBI(3)for the details, default is"DBI:mysql:mysql" - database username β default is
"dbmonitor" - database password β default is
"dbmonitor" - login account β default is
"pcp"
β οΈ heads up bestie: on some versions of MariaDB (10+) the performance schema is disabled by default, and it must be enabled or the PMDA simply will not function. no cap.
how do you fix it? you add the string "performance_schema" into the "[mysqld]" section of the MariaDB configuration file β that's either my.cnf or my.ini, pick your fighter. π«Ά
and if you wanna check whether the performance schema is even supported, the "SHOW ENGINES" SQL statement will show you. slay.
once all that initial setup is done, you can go get the names and values for the mysql performance metrics by doing the following as root:
# cd $PCP_PMDAS_DIR/mysql
# ./Install
and to uninstall, this has to be done as root too:
# cd $PCP_PMDAS_DIR/mysql
# ./Remove
pmdamysql gets launched by pmcd(1) β she is never supposed to be executed directly, okay? don't do it. the Install and Remove scripts are the ones that notify pmcd(1) when the agent is installed or removed. they handle the gossip, you just vibe. π
π₯ Binary Status values in text π₯
some of the status values come in the form of YES/NO or ON/OFF. cute, right? exceptβ
π they cannot be interpreted by tools like pmie(1). tragedy.
so they've been duplicated with a _num extension, and the values are 1 (for YES/ON) or 0 (for NO/OFF). periodt.
eg:
mysql.slave_status.slave_io_runningmysql.slave_status.slave_io_running_num
see how they match? iconic behaviour honestly. π
π FILES π
here's the whole cast, no one gets left out:
/etc/pcpdbi.confβ the configuration file for all PCP database monitors$PCP_PMDAS_DIR/mysql/mysql.confβ the configuration file forpmdamysql$PCP_PMDAS_DIR/mysql/Installβ the installation script for thepmdamysqlagent$PCP_PMDAS_DIR/mysql/Removeβ the undo installation script for thepmdamysqlagent$PCP_LOG_DIR/pmcd/mysql.logβ the default log file for error messages frompmdamysql
π PCP ENVIRONMENT π
environment variables with the prefix PCP_ are used to parameterize the file and directory names that PCP uses. on each installation, the file /etc/pcp.conf contains the local values for these variables. and the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). iykyk. π
β SEE ALSO β
go read these too, bestie, they're all part of the lore:
PCPIntro(1), pmcd(1), pmdadbping(1), pmie(1) and DBI(3).
and that's the whole page! π this was brought to you by Performance Co-Pilot β that's the PCP release, version of PMDAMYSQL(1) β so mwah, stay monitored, stay hydrated, and don't run the agent directly. bye bestie! π¦β¨π
π¦ where this page comes from
- arch rolling: pcp-pmda-mysql 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu questing: pcp 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2014,2017 Red Hat
- Copyright (c) 2012-2013 Chandana De Silva
- Copyright (c) 2008 Aconex. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms