Documentation ¶
Overview ¶
Package cpux provides information about a system's cpus, where X is the integer of each CPU on the system, e.g. cpu0, cpu1, etc. On linux systems this comes from the sysfs filesystem. Not all paths are available on all systems, e.g. /sys/devices/system/cpu/cpuX/cpufreq and its children may not exist on some systems. If the system doesn't have a particular path, the field's value will be the type's zero value. Instead of returning a Go struct, JSON serialized bytes are returned. A function to deserialize the JSON serialized bytes into a cpux.CPUs struct is provided.
Note: the package name is cpux and not the final element of the import path (json).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Deserialize takes some JSON serialized bytes and unmarshals them as cpux.CPUs.
func Get ¶
Get returns the current cpux as JSON serialized bytes using the package's global Profiler.