system_stats
EnterpriseDB system statistics for PostgreSQL
system_stats : EnterpriseDB system statistics for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 6420 | system_stats | system_stats | 4.1 |
STAT | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | pgnodemx pg_stat_kcache pgmeminfo pg_stat_ch pgmonitor pg_datasentinel pgsentinel |
PGDG RPM and PIGSTY DEB package/source version 4.1 cover PostgreSQL 14-18; SQL/control version is 4.0.
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 4.1 |
18 17 16 15 14 | system_stats |
- |
| RPM | PGDG | 4.1 |
18 17 16 15 14 | system_stats_$v |
- |
| DEB | PIGSTY | 4.1 |
18 17 16 15 14 | postgresql-$v-system-stats |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 |
| el8.aarch64 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 |
| el9.x86_64 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 |
| el9.aarch64 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 |
| el10.x86_64 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 |
| el10.aarch64 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 | PGDG 4.1 |
| d12.x86_64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| d12.aarch64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| d13.x86_64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| d13.aarch64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| u22.x86_64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| u22.aarch64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| u24.x86_64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| u24.aarch64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| u26.x86_64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
| u26.aarch64 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 | PIGSTY 4.1 |
Source
github.com/EnterpriseDB/system_stats
system_stats-4.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Source: README, Release v4.0, SQL install script
system_stats exposes operating-system metrics through SQL functions. It supports Linux, macOS, and Windows, returning NULL for fields that are not meaningful on the current platform.
Main functions
These functions cover OS identity, CPU inventory and usage, memory, block-device I/O, disks, load average, process counts, network interfaces, and per-process CPU and memory usage.
Access control
- The extension creates a
monitor_system_statsrole and grants execution on the shipped functions to that role. - Functions are revoked from
PUBLIC.
Caveats
- The
monitor_system_statsrole is not dropped automatically when the extension is removed. - macOS cannot expose full per-process details for processes owned by other users; those rows may contain only PID and process name.
- Pigsty metadata tracks
system_stats4.0 for PostgreSQL 14-18; the RPM and DEB package names differ (system_stats_$vvs.postgresql-$v-system-stats). - Current v4.0 upstream docs keep the same user-facing function family and security model; the refresh here mainly aligns names, privileges, and platform notes with the current README and SQL script.