Comprehensive system monitoring - 20 table functions for CPU, memory, disk, network, processes, ports, services, Docker, GPU, and more
Maintainer(s):
Angelerator
Installing and Loading
INSTALL sazgar FROM community;
LOAD sazgar;
Example
-- Get comprehensive system overview
SELECT * FROM sazgar_system();
-- Memory usage in GB
SELECT * FROM sazgar_memory(unit := 'GB');
-- Swap memory
SELECT * FROM sazgar_swap('GiB');
-- Per-core CPU usage
SELECT * FROM sazgar_cpu_cores();
-- Open network ports
SELECT * FROM sazgar_ports('') WHERE local_port < 1024;
-- Docker containers
SELECT * FROM sazgar_docker();
-- System services
SELECT * FROM sazgar_services() WHERE status = 'running' LIMIT 10;
-- System uptime
SELECT * FROM sazgar_uptime();
About sazgar
Sazgar (Persian: سازگار, meaning "compatible/harmonious") is a comprehensive DuckDB extension for system resource monitoring with 20 table functions.
Functions:
sazgar_system()- Complete system overviewsazgar_os()- Operating system informationsazgar_memory(unit)- RAM usage with unit conversionsazgar_swap(unit)- Swap/virtual memory infosazgar_cpu()- CPU informationsazgar_cpu_cores()- Per-core CPU usagesazgar_disks(unit)- Disk usagesazgar_network()- Network interface statisticssazgar_ports(filter)- Open network ports and connectionssazgar_processes()- Running processessazgar_services()- System services (launchctl/systemd)sazgar_docker()- Docker containerssazgar_load()- System load averagessazgar_uptime()- Detailed uptime informationsazgar_users()- System userssazgar_environment(filter)- Environment variablessazgar_components()- Temperature sensorssazgar_gpu()- NVIDIA GPU info (optional)sazgar_fds(pid)- File descriptors (Linux)sazgar_version()- Extension version
Unit conversion supports: bytes, KB, KiB, MB, MiB, GB, GiB, TB, TiB
Cross-platform: Linux, macOS, Windows (full support), Android, iOS (partial support)
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| sazgar_components | table | NULL | NULL | |
| sazgar_cpu | table | NULL | NULL | |
| sazgar_cpu_cores | table | NULL | NULL | |
| sazgar_disks | table | NULL | NULL | |
| sazgar_docker | table | NULL | NULL | |
| sazgar_environment | table | NULL | NULL | |
| sazgar_fds | table | NULL | NULL | |
| sazgar_gpu | table | NULL | NULL | |
| sazgar_load | table | NULL | NULL | |
| sazgar_memory | table | NULL | NULL | |
| sazgar_network | table | NULL | NULL | |
| sazgar_os | table | NULL | NULL | |
| sazgar_ports | table | NULL | NULL | |
| sazgar_processes | table | NULL | NULL | |
| sazgar_services | table | NULL | NULL | |
| sazgar_swap | table | NULL | NULL | |
| sazgar_system | table | NULL | NULL | |
| sazgar_uptime | table | NULL | NULL | |
| sazgar_users | table | NULL | NULL | |
| sazgar_version | table | NULL | NULL |