sys

package
v2.8.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sys provides system utilities for monitoring network connections and CPU usage. Platform-specific implementations are provided for Windows, Linux, and macOS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUPercentRaw

func CPUPercentRaw() (float64, error)

CPUPercentRaw returns instantaneous total CPU utilization by reading /proc/stat. First call initializes and returns 0; subsequent calls return busy/total * 100.

func GetTCPCount

func GetTCPCount() (int, error)

GetTCPCount returns the number of active TCP connections by reading /proc/net/tcp and /proc/net/tcp6 when available.

func GetUDPCount

func GetUDPCount() (int, error)

func HostProc

func HostProc(combineWith ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL