PMDADB2(1)
β¨ PMDADB2 β¨ β ok bestie, it's the IBM Db2 database PMDA π¦
aka the pmdadb2 manual page, and yes it's from section 1 of the General Commands Manual, iykyk π
NAME
pmdadb2 β it's the IBM Db2 database PMDA π
DESCRIPTION
okay so pmdadb2 is a Performance Co-Pilot (PCP) Performance Metrics Domain Agent (PMDA) and what it does is literally pull live performance data out of a running IBM Db2 database server using the Db2 monitoring table functions, aka the MON_GET_* ones πΈ
The metrics are organised into these groups, and no we are not skipping any of them, every single one is getting its moment π
db2.instanceβ instance-level identity metrics, coming at you fromENV_GET_INSTANCE_INFO. It covers the instance name, the full service level (that's the version) string, and the operating platform. Heads up bestie: these arePM_SEM_DISCRETEmetrics, so they get logged once at recording start and then only whenever they change. Not every second, they're not extra like that πdb2.databaseβ database-wide aggregate counters fromMON_GET_DATABASE. Covering transactions, row operations, sort activity, locking, package cache efficiency, and direct I/O. The instance domain has one entry per monitored database name, periodt.db2.bufferpoolβ per-buffer-pool counters fromMON_GET_BUFFERPOOL, covering logical and physical reads and writes for data, index, and column-organised pages, plus pool read/write times and unread prefetch pages. Instance names look likedbname::bpnameπ«Άdb2.tableβ per-table counters fromMON_GET_TABLE, covering row operations, lock activity, overflow accesses, and full-table scans. System tables (that's anything with the schema prefixSYS) are excluded β not invited to the party, sorry. Instance names aredbname::tabschema.tabname.db2.workloadβ per-workload counters fromMON_GET_WORKLOAD, covering row operations, CPU time, and transaction counts. Instance names aredbname::workload_name.db2.tablespaceβ per-tablespace I/O counters fromMON_GET_TABLESPACE, covering buffer pool and direct read/write operations and times. Instance names aredbname::tablespace_name.db2.connectionβ per-connection counters fromMON_GET_CONNECTION, covering CPU time, row operations, lock activity, and transaction counts. Instance names aredbname::appname::handle.db2.latchβ per-latch-type extended wait statistics fromMON_GET_LATCH, covering cumulative wait time and event count. Important: only latch types that have experienced at least one extended wait event even show up in the instance domain. If a latch has never waited, it's simply not there, main character energy only π Instance names aredbname::latch_name.db2.logβ transaction log I/O counters fromMON_GET_TRANSACTION_LOG, covering log write and read operations, physical I/O counts, buffer-full events, and current used and available log space. The instance domain has one entry per monitored database name.db2.pkg_cacheβ package cache aggregate counters fromMON_GET_PKG_CACHE_STMT, summarising the entire statement cache with no per-statement instance domain at all. It's giving: cached statement count, total executions, CPU time, rows read, sort operations, and sort overflows. And yep β the instance domain has one entry per monitored database name. Slay π
CONFIGURATION
First things first bestie: pmdadb2 requires you to install the ibm_db Python package, because that's the thing that provides the IBM Db2 driver for Python π
Then, pmdadb2 reads a mandatory ini-style configuration file:
$PCP_SYSCONF_DIR/db2/db2.conf
This file has two sections. (Yes, we're reading that straight off the page, don't come for me π)
[connection] β how to reach the Db2 server
Default values are shown in parentheses, no cap:
hostname(localhost) β hostname or IP address of the Db2 instance.port(50000) β TCP port number of the Db2 instance listener.timeout(5) β connection timeout, in seconds.
[databases] β which databases on the instance to monitor
namesβ space-separated list of Db2 database names to monitor. All of these databases have to be reachable at the configuredhostnameandportusing the same credentials, that's the vibe check. The database name shows up as the instance name fordb2.database.*,db2.log.*anddb2.pkg_cache.*metrics, and it also becomes thedbname::prefix in every per-object instance domain (buffer pools, tables, tablespaces, workloads, connections, latches) π«
[authentication] β the Db2 user credentials
usernameβ the Db2 username to authenticate as. This user must haveEXECUTEprivilege on theMON_GET_*table functions, plusDATAACCESSor the appropriateMON_*authorities on the target database. No shortcuts here, the privileges are the privileges πpasswordβ the password for the above username.
INSTALLATION
To install, all of this has to be done as root:
# cd $PCP_PMDAS_DIR/db2
# ./Install
To uninstall, also as root:
# cd $PCP_PMDAS_DIR/db2
# ./Remove
pmdadb2 is launched by pmcd(1) and should never be executed directly. Like genuinely, do not run it yourself, that's not the move π
The Install and Remove scripts notify pmcd(1) when the agent is installed or removed, so it always knows what's going on π
Oh and also β pmdadb2 will automatically attempt to reconnect to the Db2 server if the connection is lost. Resilient queen behavior honestly π
FILES
$PCP_SYSCONF_DIR/db2/db2.confβ configuration file for thepmdadb2agent$PCP_PMDAS_DIR/db2/Installβ installation script for thepmdadb2agent$PCP_PMDAS_DIR/db2/Removeβ undo installation script for thepmdadb2agent$PCP_LOG_DIR/pmcd/db2.logβ default log file for messages from thepmdadb2agent
Note that the usual/default value for$PCP_SYSCONF_DIRis/etc/pcp, the default for$PCP_PMDAS_DIRis/var/lib/pcp/pmdasand the default for$PCP_LOG_DIRis/var/log/pcpβ but bestie, these settings are platform dependent, so check before you assume π
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 if you need a different config file entirely, the $PCP_CONF variable can be used to specify an alternative one, exactly as described in pcp.conf(5) πΈ
SEE ALSO
PCPIntro(1), pmcd(1), pmdamssql(1) and pmdapostgresql(1) π«Ά
and that's the whole page, bestie π this is Performance Co-Pilot β PCP β and you just read the PMDADB2(1) manual page from the General Commands Manual, section 1, periodt π
β¨
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-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.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 stonking: pcp 7.2.1-2build1
- Copyright (c) 2026 Red Hat. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms