system_stats
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
system_stats | 4.1 | STAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6420 | system_stats | No | Yes | No | Yes | No | Yes | - |
PGDG RPM and PIGSTY DEB package/source version 4.1 cover PostgreSQL 14-18; SQL/control version is 4.0.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 4.1 | 1817161514 | system_stats | - |
| RPM | PGDG | 4.1 | 1817161514 | system_stats_$v | - |
| DEB | PIGSTY | 4.1 | 1817161514 | postgresql-$v-system-stats | - |
Build
You can build the DEB packages for system_stats using pig build:
Install
You can install system_stats directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
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.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)