Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2016 13:00:27 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310054 - head/sys/dev/acpica
Message-ID:  <201612141300.uBED0RPk013052@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612141300.uBED0RPk013052>