Search Shortcut cmd + k | ctrl + k
sazgar

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 overview
  • sazgar_os() - Operating system information
  • sazgar_memory(unit) - RAM usage with unit conversion
  • sazgar_swap(unit) - Swap/virtual memory info
  • sazgar_cpu() - CPU information
  • sazgar_cpu_cores() - Per-core CPU usage
  • sazgar_disks(unit) - Disk usage
  • sazgar_network() - Network interface statistics
  • sazgar_ports(filter) - Open network ports and connections
  • sazgar_processes() - Running processes
  • sazgar_services() - System services (launchctl/systemd)
  • sazgar_docker() - Docker containers
  • sazgar_load() - System load averages
  • sazgar_uptime() - Detailed uptime information
  • sazgar_users() - System users
  • sazgar_environment(filter) - Environment variables
  • sazgar_components() - Temperature sensors
  • sazgar_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