From: James Seo <james@equiv.tech>
To: Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Jonathan Corbet <corbet@lwn.net>
Cc: James Seo <james@equiv.tech>,
linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [RFC 08/11] Documentation/hwmon: Revise userspace tools documentation
Date: Thu, 4 May 2023 00:57:49 -0700 [thread overview]
Message-ID: <20230504075752.1320967-9-james@equiv.tech> (raw)
In-Reply-To: <20230504075752.1320967-1-james@equiv.tech>
Rewrite lm-sensors installation and usage guidelines
and mark the list of third-party utilities as outdated.
Fix minor issues (typos, grammar, etc.) and add markup.
Signed-off-by: James Seo <james@equiv.tech>
---
Documentation/hwmon/userspace-tools.rst | 129 +++++++++++++++++++-----
1 file changed, 103 insertions(+), 26 deletions(-)
diff --git a/Documentation/hwmon/userspace-tools.rst b/Documentation/hwmon/userspace-tools.rst
index bf3797c8e734..79c932954e4a 100644
--- a/Documentation/hwmon/userspace-tools.rst
+++ b/Documentation/hwmon/userspace-tools.rst
@@ -1,43 +1,120 @@
+===============
Userspace tools
===============
+.. contents::
+
Introduction
+============
+
+Hardware monitoring information is pertinent to almost every Linux system.
+For instance, most computer mainboards manufactured since the late 1990s have
+reported system health data such as temperatures, voltages, and fan speeds.
+All modern CPUs, GPUs, and SoCs have built-in internal temperature sensors and
+often have other types of sensors as well. In addition, an increasing number
+of components, such as power supplies and liquid CPU coolers, are now embedded
+systems ("smart devices") capable of measuring and providing relevant sensor
+data themselves.
+
+The Linux Hardware Monitoring subsystem (``hwmon``) supports most common types
+of hardware monitoring sensors, regardless of how they are connected to the
+system. Sensor measurements are made available in the ``/sys`` virtual
+filesystem at ``/sys/class/hwmon``. Userspace tools are then used to display
+the measured values or configure the sensors and data sources in a more
+friendly manner.
+
+``lm-sensors``
+==============
+
+``lm-sensors`` is a collection of command-line utilities that allows you to
+view hardware monitoring information and set monitoring limits. On some
+systems, it is used to process raw sensor data into a usable form. It may also
+be used to probe the system at a low level to help detect available sensors.
+
+While active development has largely ceased as of 2023, its status is closer
+to "finished" than "abandoned". It has strong historical ties to ``hwmon``,
+and a properly configured installation of ``lm-sensors`` (or its
+``libsensors`` library component) is often required by other hardware
+monitoring utilities.
+
+Installation
------------
-Most mainboards have sensor chips to monitor system health (like temperatures,
-voltages, fans speed). They are often connected through an I2C bus, but some
-are also connected directly through the ISA bus.
+Most Linux distributions provide the ``lm-sensors`` suite as a package.
+It is recommended that you use this package for ease of installation.
+Please consult your Linux distribution's documentation for more information.
+
+If needed, sources may be found at https://hwmon.wiki.kernel.org/lm_sensors.
+Basic compilation, installation, and uninstallation may be accomplished with
+``make all``, ``make install``, and ``make uninstall``, respectively.
+
+Usage
+-----
+
+General hints to get things working after installation:
-The kernel drivers make the data from the sensor chips available in the /sys
-virtual filesystem. Userspace tools are then used to display the measured
-values or configure the chips in a more friendly manner.
+* Run the ``sensors`` command. Note the available sensors on your system.
-Lm-sensors
-----------
+* If you don't see the sensors you expect, here are a few possibilities:
-Core set of utilities that will allow you to obtain health information,
-setup monitoring limits etc. You can get them on their homepage
-http://www.lm-sensors.org/ or as a package from your Linux distribution.
+ * You must run the ``sensors-detect`` command to detect available sensors.
+ It will try to find the correct kernel modules (i.e. ``hwmon`` drivers)
+ for your hardware and make the necessary changes to load them
+ automatically. You may have to make these changes yourself in some cases.
-If from website:
-Get lm-sensors from project web site. Please note, you need only userspace
-part, so compile with "make user" and install with "make user_install".
+ .. attention::
+ Though unlikely, ``sensors-detect`` may damage your system while
+ conducting certain low-level checks. You will have the chance to refuse.
-General hints to get things working:
+ * You are missing the kernel module(s) you need, but it is just a matter of
+ installing it.
-0) get lm-sensors userspace utils
-1) compile all drivers in I2C and Hardware Monitoring sections as modules
- in your kernel
-2) run sensors-detect script, it will tell you what modules you need to load.
-3) load them and run "sensors" command, you should see some results.
-4) fix sensors.conf, labels, limits, fan divisors
-5) if any more problems consult FAQ, or documentation
+ Some Linux distributions already include all in-kernel ``hwmon`` drivers
+ as part of a base installation, but others may only provide them in a
+ "kernel modules" or "extra kernel modules" package. Please consult your
+ Linux distribution's documentation for more information.
+
+ If you are using a self-compiled kernel, ensure that the necessary driver
+ is set to be compiled as modules in the kernel config, then recompile and
+ reinstall.
+
+ In some cases, a hardware vendor or an open-source developer provides an
+ unofficial third-party driver for your hardware. Please refer to the
+ documentation for that driver for more information.
+
+ * The module that you need exists and has been updated to work with your
+ hardware, but only for a later kernel version, or it has not been updated
+ yet, or it does not exist.
+
+ Unfortunately, you will need to upgrade your kernel or Linux distribution,
+ or wait and do so later, or implement support for your hardware yourself.
+
+* Once ``sensors`` is working, you may still need to edit its configuration
+ file (most likely ``/etc/sensors3.conf``) before its output becomes usable.
+
+ For example, this is necessary if several mainboards use the same sensor
+ chip for hardware monitoring duties, but due to design differences between
+ boards, the same measured value means different things on each.
+
+ You may also want to edit the config file to change sensor names, change how
+ displayed values are calculated, and/or hide sensors from view.
+
+ For more information, please refer to the ``man`` pages for ``sensors`` and
+ ``sensors.conf``.
+
+* If you run into more problems, consult FAQs and documentation as needed, or
+ try searching for your particular mainboard or computer system to see what
+ has worked for others.
Other utilities
----------------
+===============
+
+.. warning ::
+ This section is outdated and in need of attention. Please use this
+ information with caution, and please consider sending patches to update it.
If you want some graphical indicators of system health look for applications
-like: gkrellm, ksensors, xsensors, wmtemp, wmsensors, wmgtemp, ksysguardd,
-hardware-monitor
+like: ``gkrellm``, ``ksensors``, ``xsensors``, ``wmtemp``, ``wmsensors``,
+``wmgtemp``, ``ksysguardd``, ``hardware-monitor``
-If you are server administrator you can try snmpd or mrtgutils.
+If you are server administrator you can try ``snmpd`` or ``mrtgutils``.
--
2.34.1
next prev parent reply other threads:[~2023-05-04 8:13 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 7:57 [RFC 00/11] hwmon: Modernize documentation James Seo
2023-05-04 7:57 ` [RFC 01/11] Documentation/hwmon: Move misplaced entry in hwmon docs index James Seo
2023-05-05 4:58 ` Bagas Sanjaya
2023-05-06 13:43 ` Guenter Roeck
2023-05-04 7:57 ` [RFC 02/11] hwmon: (core) Rename last parameter of devm_hwmon_register_with_info() James Seo
2023-05-04 15:29 ` Guenter Roeck
2023-05-05 13:15 ` James Seo
2023-05-05 13:30 ` Guenter Roeck
2023-05-05 14:39 ` James Seo
2023-05-04 7:57 ` [RFC 03/11] hwmon: (core) Revise kerneldoc comments James Seo
2023-07-25 23:51 ` Russell Haley
2023-05-04 7:57 ` [RFC 04/11] Documentation/hwmon: Revise hwmon kernel API reference James Seo
2023-05-05 4:12 ` Bagas Sanjaya
2023-05-05 4:20 ` Bagas Sanjaya
2023-05-05 13:29 ` James Seo
2023-05-06 13:52 ` Guenter Roeck
2023-05-07 14:40 ` James Seo
2023-05-04 7:57 ` [RFC 05/11] Documentation/hwmon: Revise PMBus core documentation James Seo
2023-05-05 4:27 ` Bagas Sanjaya
2023-05-05 4:32 ` Guenter Roeck
2023-05-05 13:35 ` James Seo
2023-05-04 7:57 ` [RFC 06/11] Documentation/hwmon: Revise patch submission checklist James Seo
2023-05-05 4:34 ` Bagas Sanjaya
2023-05-05 14:50 ` James Seo
2023-05-04 7:57 ` [RFC 07/11] Documentation/hwmon: Revise sysfs interface specification James Seo
2023-05-05 4:51 ` Bagas Sanjaya
2023-05-05 15:01 ` James Seo
2023-05-05 15:10 ` Jonathan Corbet
2023-05-04 7:57 ` James Seo [this message]
2023-05-05 5:03 ` [RFC 08/11] Documentation/hwmon: Revise userspace tools documentation Bagas Sanjaya
2023-05-05 15:12 ` James Seo
2023-05-05 21:10 ` Guenter Roeck
2023-05-04 7:57 ` [RFC 09/11] ABI: sysfs-class-hwmon: Revise hwmon ABI documentation James Seo
2023-05-04 7:57 ` [RFC 10/11] hwmon: (core) Add missing beep-related standard attributes James Seo
2023-05-04 7:57 ` [RFC 11/11] ABI: sysfs-class-hwmon: Add missing hwmon " James Seo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230504075752.1320967-9-james@equiv.tech \
--to=james@equiv.tech \
--cc=corbet@lwn.net \
--cc=jdelvare@suse.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox