svn commit: r310054 - head/sys/dev/acpica
Ed Schouten
ed at FreeBSD.org
Wed Dec 14 13:00:29 UTC 2016
Author: ed
Date: Wed Dec 14 13:00:27 2016
New Revision: 310054
URL: https://svnweb.freebsd.org/changeset/base/310054
Log:
Attach a "thermal_zone" label to the ACPI thermal zone sysctls.
In order to make Prometheus do graphing/alerting on thermal sensors in a
generic fashion, we should attach the name of the thermal zone device as
a label. That way there is only a single metric for the temperature of a
thermal zone, with its name attached as a label.
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775
Modified:
head/sys/dev/acpica/acpi_thermal.c
Modified: head/sys/dev/acpica/acpi_thermal.c
==============================================================================
--- head/sys/dev/acpica/acpi_thermal.c Wed Dec 14 12:56:58 2016 (r310053)
+++ head/sys/dev/acpica/acpi_thermal.c Wed Dec 14 13:00:27 2016 (r310054)
@@ -258,9 +258,9 @@ acpi_tz_attach(device_t dev)
}
sysctl_ctx_init(&sc->tz_sysctl_ctx);
sprintf(oidname, "tz%d", device_get_unit(dev));
- sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx,
- SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
- OID_AUTO, oidname, CTLFLAG_RD, 0, "");
+ sc->tz_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&sc->tz_sysctl_ctx,
+ SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
+ OID_AUTO, oidname, CTLFLAG_RD, 0, "", "thermal_zone");
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD,
&sc->tz_temperature, 0, sysctl_handle_int,
More information about the svn-src-all
mailing list