https://github.com/EnterpriseDB/system_stats/
system_stats is a Postgres extension that provides functions to access system level statistics that can be used for monitoring. It supports Linux, macOS and Windows.
Note that not all values are relevant on all operating systems. In such cases NULL is returned for affected values.
The PostgreSQL RPM repository uses PostgreSQL version numbers in the RPM packages. For example system_stats for PostgreSQL 17 is named as system_stats_17. Similarly system_stats for PostgreSQL 15 is named as system_stats_15.
system_stats provides the following subpackages:
Install PGDG repository from: https://yum.postgresql.org/repopackages/
OS | Command |
---|---|
RHEL / Rocky Linux / AlmaLinux / Fedora | dnf install system_stats_17 (or change the version as described above) |
Connect to the database that you want to create the extension as superuser and run:
CREATE EXTENSION system_stats;
PostgreSQL version(s) | OS version | Arch | Status |
---|---|---|---|
17,16,15,14,13 | RHEL / Rocky Linux / AlmaLinux 9 | x86_64, aarch64 | Available |
17,16,15,14,13 | RHEL / Rocky Linux / AlmaLinux 8 | x86_64, aarch64 | Available |
17,16,15,14,13 | Fedora Linux | x86_64 | Available |