Documentation
¶
Index ¶
- func NewCPUInfoWatcher(interval time.Duration) ro.Observable[cpu.InfoStat]
- func NewDiskIOCountersWatcher(interval time.Duration, names ...string) ro.Observable[map[string]disk.IOCountersStat]
- func NewDiskPartitionWatcher(interval time.Duration) ro.Observable[disk.PartitionStat]
- func NewDiskUsageWatcher(interval time.Duration, mountpointOrDevicePath string) ro.Observable[*disk.UsageStat]
- func NewHostInfoWatcher(interval time.Duration) ro.Observable[*host.InfoStat]
- func NewHostUserWatcher(interval time.Duration) ro.Observable[host.UserStat]
- func NewLoadAverageWatcher(interval time.Duration) ro.Observable[*load.AvgStat]
- func NewLoadMiscWatcher(interval time.Duration) ro.Observable[*load.MiscStat]
- func NewNetConnectionsWatcher(interval time.Duration) ro.Observable[net.ConnectionStat]
- func NewNetConntrackWatcher(interval time.Duration, perCPU bool) ro.Observable[net.ConntrackStat]
- func NewNetFilterCountersWatcher(interval time.Duration) ro.Observable[net.FilterStat]
- func NewNetIOCountersWatcher(interval time.Duration, perNIC bool) ro.Observable[net.IOCountersStat]
- func NewSensorsTemperatureWatcher(interval time.Duration, perNIC bool) ro.Observable[sensors.TemperatureStat]
- func NewSwapDeviceWatcher(interval time.Duration) ro.Observable[*mem.SwapDevice]
- func NewSwapMemoryWatcher(interval time.Duration) ro.Observable[*mem.SwapMemoryStat]
- func NewVirtualMemoryWatcher(interval time.Duration) ro.Observable[*mem.VirtualMemoryStat]
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCPUInfoWatcher ¶
NewCPUInfoWatcher creates an observable that emits CPU information statistics at regular intervals.
Example ¶
// Monitor CPU information observable := NewCPUInfoWatcher(2 * time.Second) subscription := observable.Subscribe(ro.NoopObserver[cpu.InfoStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(4 * time.Second)
func NewDiskIOCountersWatcher ¶
func NewDiskIOCountersWatcher(interval time.Duration, names ...string) ro.Observable[map[string]disk.IOCountersStat]
NewDiskIOCountersWatcher creates an observable that emits disk I/O counters at regular intervals.
func NewDiskPartitionWatcher ¶
func NewDiskPartitionWatcher(interval time.Duration) ro.Observable[disk.PartitionStat]
NewDiskPartitionWatcher creates an observable that emits disk partition information at regular intervals.
func NewDiskUsageWatcher ¶
func NewDiskUsageWatcher(interval time.Duration, mountpointOrDevicePath string) ro.Observable[*disk.UsageStat]
NewDiskUsageWatcher creates an observable that emits disk usage statistics at regular intervals.
Example ¶
// Monitor disk usage for root filesystem observable := NewDiskUsageWatcher(5*time.Second, "/") subscription := observable.Subscribe(ro.NoopObserver[*disk.UsageStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(10 * time.Second)
func NewHostInfoWatcher ¶
NewHostInfoWatcher creates an observable that emits host information at regular intervals.
Example ¶
// Monitor host information observable := NewHostInfoWatcher(10 * time.Second) subscription := observable.Subscribe(ro.NoopObserver[*host.InfoStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(12 * time.Second)
func NewHostUserWatcher ¶
NewHostUserWatcher creates an observable that emits host user information at regular intervals.
func NewLoadAverageWatcher ¶
NewLoadAverageWatcher creates an observable that emits load average statistics at regular intervals.
Example ¶
// Monitor system load average observable := NewLoadAverageWatcher(2 * time.Second) subscription := observable.Subscribe(ro.NoopObserver[*load.AvgStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(4 * time.Second)
func NewLoadMiscWatcher ¶
NewLoadMiscWatcher creates an observable that emits miscellaneous load statistics at regular intervals.
func NewNetConnectionsWatcher ¶
func NewNetConnectionsWatcher(interval time.Duration) ro.Observable[net.ConnectionStat]
NewNetConnectionsWatcher creates an observable that emits network connection statistics at regular intervals.
func NewNetConntrackWatcher ¶
func NewNetConntrackWatcher(interval time.Duration, perCPU bool) ro.Observable[net.ConntrackStat]
NewNetConntrackWatcher creates an observable that emits network conntrack statistics at regular intervals.
func NewNetFilterCountersWatcher ¶
func NewNetFilterCountersWatcher(interval time.Duration) ro.Observable[net.FilterStat]
NewNetFilterCountersWatcher creates an observable that emits network filter counters at regular intervals.
func NewNetIOCountersWatcher ¶
func NewNetIOCountersWatcher(interval time.Duration, perNIC bool) ro.Observable[net.IOCountersStat]
NewNetIOCountersWatcher creates an observable that emits network I/O counters at regular intervals.
Example ¶
// Monitor network I/O counters observable := NewNetIOCountersWatcher(3*time.Second, true) subscription := observable.Subscribe(ro.NoopObserver[net.IOCountersStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(6 * time.Second)
func NewSensorsTemperatureWatcher ¶
func NewSensorsTemperatureWatcher(interval time.Duration, perNIC bool) ro.Observable[sensors.TemperatureStat]
NewSensorsTemperatureWatcher creates an observable that emits sensor temperature statistics at regular intervals.
Example ¶
// Monitor temperature sensors observable := NewSensorsTemperatureWatcher(5*time.Second, false) subscription := observable.Subscribe(ro.NoopObserver[sensors.TemperatureStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(10 * time.Second)
func NewSwapDeviceWatcher ¶
func NewSwapDeviceWatcher(interval time.Duration) ro.Observable[*mem.SwapDevice]
NewSwapDeviceWatcher creates an observable that emits swap device information at regular intervals.
func NewSwapMemoryWatcher ¶
func NewSwapMemoryWatcher(interval time.Duration) ro.Observable[*mem.SwapMemoryStat]
NewSwapMemoryWatcher creates an observable that emits swap memory statistics at regular intervals.
func NewVirtualMemoryWatcher ¶
func NewVirtualMemoryWatcher(interval time.Duration) ro.Observable[*mem.VirtualMemoryStat]
NewVirtualMemoryWatcher creates an observable that emits virtual memory statistics at regular intervals.
Example ¶
// Monitor virtual memory usage observable := NewVirtualMemoryWatcher(1 * time.Second) subscription := observable.Subscribe(ro.NoopObserver[*mem.VirtualMemoryStat]()) defer subscription.Unsubscribe() // Let it run for a few seconds time.Sleep(3 * time.Second)
Types ¶
This section is empty.