Skip to main content

System Monitoring

tally provides monitoring interfaces for system metrics, which are defined in the file:

<tally/sigar.h>

Core Functions and Features

Sigar abstracts the underlying differences between various operating systems through a unified API, delivering consistent metric collection capabilities. For instance, it allows retrieving process lists or real-time CPU load using the same method on both Windows and Linux platforms.

Its data collection scope includes but is not limited to: CPU core count and utilization rate, physical and virtual memory usage, disk partition read/write speeds, network interface traffic statistics, etc. This design simplifies the complexity of multi-platform adaptation for developers.

Sigar (System Information Gatherer and Reporter) is a cross-platform system metrics component, primarily designed to collect key performance data of operating systems. It can efficiently obtain usage information of resources such as CPU, memory, disk, and network, making it suitable for scenarios like operation and maintenance monitoring, security auditing, and academic research.

Default Monitoring

The exported system monitoring metrics are defined in the file:

<tally/sigar_metric.h>

Refer to the table below for the exported metrics.

Metric TypeVariableDescription
FuncGauge<int64_t>mem_ramCurrent system RAM
FuncGauge<int64_t>mem_totalTotal system memory
FuncGauge<int64_t>mem_usedCurrent system memory usage
FuncGauge<int64_t>mem_freeCurrent free system memory
FuncGauge<int64_t>mem_actual_usedActual current system memory usage
FuncGauge<int64_t>mem_actual_freeActual current free system memory
FuncGauge<int64_t>swap_totalTotal swap partition size
FuncGauge<int64_t>swap_usedSwap partition usage
FuncGauge<int64_t>swap_freeFree swap partition space
FuncGauge<int64_t>cpu_userCPU user time
FuncGauge<int64_t>cpu_sysCPU system time
FuncGauge<int64_t>cpu_niceCPU nice time
FuncGauge<int64_t>cpu_idleCPU idle time
FuncGauge<int64_t>cpu_waitCPU wait time
FuncGauge<int64_t>cpu_irqCPU IRQ time
FuncGauge<int64_t>cpu_soft_irqCPU soft IRQ time
FuncGauge<int64_t>cpu_stolenCPU stolen time
FuncGauge<int64_t>cpu_totalTotal CPU time
FuncGauge<double>uptimeSystem uptime
FuncGauge<double>loadavg_1mSystem 1-minute load average
FuncGauge<double>loadavg_5mSystem 5-minute load average
FuncGauge<double>loadavg_15mSystem 15-minute load average
FuncGauge<double>disk_io_readDisk IO read throughput
FuncGauge<double>disk_io_writeDisk IO write throughput
FuncGauge<double>disk_io_totalTotal disk IO (read + write) throughput