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 ¶
CPUPercentRaw returns the instantaneous total CPU utilization percentage using Windows GetSystemTimes across all logical processors. The first call returns 0 as it initializes the baseline. Subsequent calls compute deltas.
func GetConnectionCount ¶
GetConnectionCount returns the number of active connections for the specified protocol ("tcp" or "udp").
func GetTCPCount ¶
GetTCPCount returns the number of active TCP connections.
func GetUDPCount ¶
GetUDPCount returns the number of active UDP connections.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.