hostsys

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: GPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package hostsys reads host figures from Linux's /sys, on every architecture PiWorker ships for: the Raspberry Pi and other ARM boards expose the CPU as a thermal zone, x86_64 PCs as a thermal zone (Intel's x86_pkg_temp) or only as a hwmon chip (Intel coretemp, AMD k10temp).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUTemperature

func CPUTemperature(sys string) (celsius float64, ok bool)

CPUTemperature returns the CPU temperature in degrees Celsius, reading the sysfs tree mounted at sys (normally "/sys"). It prefers, in order: a thermal zone whose type names the CPU, a hwmon chip that is the CPU's sensor, and then the lowest-numbered zone with a plausible reading. ok is false when no plausible reading exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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