PMDAPOSTGRESQL(1)
π PMDAPOSTGRESQL(1) β the PostgreSQL database PMDA, bestie edition β¨
okay so first things first: this is a General Commands Manual page, section 1, for the command literally called pmdapostgresql. yes that's a mouthful. yes we're gonna get through it together. grab a snack π
πΈ NAME πΈ
pmdapostgresql β the PostgreSQL database PMDA. that's it, that's the name, no notes. π
β¨ DESCRIPTION β¨
so pmdapostgresql is a Performance Co-Pilot (aka PCP) Performance Metrics Domain Agent β a PMDA, iykyk β and what it does is it goes and extracts live performance data from a PostgreSQL database server that's actually running. like it's out here pulling real-time stats, no cap. π₯
ngl, big heads-up: a LOT of the statistics that a PostgreSQL server could give you are not enabled by default. like, they're just sitting there turned off. so go read the online docs at https://postgresql.org/docs/current/static/monitoring-stats.html β that page describes every single available parameter related to statistics collection and tells you how to turn them on. fr fr, go read it. π
π CONFIGURATION π
pmdapostgresql reads a mandatory ini-style config file:
$PCP_PMDAS_DIR/postgresql/pmdapostgresql.conf
right now this file has literally just one section: [authentication]. and that section specifies values for these settings. the file that ships with it has commented-out examples in it β so you have to configure all the required settings before you install the PMDA. no skipping steps bestie. π
host(local) β the hostname to connect to.port(5432) β the port number to use.dbname(postgres) β the database name.user(postgres) β the username to connect to the database.password(password) β the password to connect to the database.osuser(unset) β the operating system user the PMDA runs as.
π important, do not skip: those values up there are examples only. the configuration that ships with it is not sufficient to install the PMDA. you gotta uncomment and configurehost,port,dbname,user, andpasswordβ even for a local server using the default PostgreSQL configuration. yes, even then. yes really.
so here's the tea on osuser: if it's not specified in the config file, the PMDA just runs as the current user. and if you set host to local, it'll use a UNIX domain socket, which uses peer authentication β go check the comments in the pg_hba.conf file for that. in that case, you should probably set osuser to postgres. π
also, not me pointing out that the port number is required even for a UNIX domain connection, because it's used as the socket filename by the server. so like, don't leave it out. π«Ά
π¦ INSTALLATION π¦
to install it, the following must be done as root:
# cd $PCP_PMDAS_DIR/postgresql
# ./Install
to uninstall it, the following must be done as root:
# cd $PCP_PMDAS_DIR/postgresql
# ./Remove
pmdapostgresql is launched by pmcd(1) and should never be executed directly. like, ever. don't do it. the Install and Remove scripts are the ones that notify pmcd(1) when the agent gets installed or removed. they handle the communication, you don't gotta. π
and good news: pmdapostgresql will automatically attempt to reconnect to the PostgreSQL server if its connection is lost β like, say, if the PostgreSQL service gets restarted. it just does that. main character energy honestly. β¨
β SUPPORTED VERSIONS β
this version of pmdapostgresql has been tested and verified with PostgreSQL server version 10.2 and earlier. π
later versions will probably also work correctly, because the PMDA probes the various performance tables on start-up to figure out the column ordering. it also tolerates missing or renamed tables and/or columns. so like... it's pretty chill about it. π
π FILES π
$PCP_PMDAS_DIR/postgresql/pmdapostgresql.confβ the configuration file for thepmdapostgresqlagent.$PCP_PMDAS_DIR/postgresql/Installβ the installation script for thepmdapostgresqlagent.$PCP_PMDAS_DIR/postgresql/Removeβ the undo installation script for thepmdapostgresqlagent.$PCP_LOG_DIR/pmcd/postgresql.logβ the default log file for messages from thepmdapostgresqlagent.
π quick note: the usual/default value for$PCP_PMDAS_DIRis/var/lib/pcp/pmdasand the default for$PCP_LOG_DIRis/var/log/pcpβ but these settings are platform dependent, so don't come for me if yours looks different. π
πΈ PCP ENVIRONMENT πΈ
environment variables with the prefix PCP_ are used to parameterize the file and directory names that PCP uses. every installation has a file at /etc/pcp.conf that contains the local values for these variables. ποΈ
and the $PCP_CONF variable can be used to specify an alternative configuration file, as described in pcp.conf(5). slay. π
π SEE ALSO π
PCPIntro(1), pmcd(1) and https://postgresql.org/docs/current/static/monitoring-stats.html.
and that's the whole page bestie, we ate and left no crumbs πβ¨ this iconic little number came to you from Performance Co-Pilot β yes, the PCP girlies β and that's the vibe check passed. mwah ππ¦π
π¦ where this page comes from
- arch rolling: pcp-pmda-postgresql 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.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.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- Copyright (c) 2018 Red Hat. All Rights Reserved
- Copyright (c) 2009 Aconex. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms