From: Patrick Williams <patrick@stwcx.xyz>
To: Joel Stanley <joel@jms.id.au>
Cc: Matt Spinler <mspinler@linux.vnet.ibm.com>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Starting the phosphor-hwmon service from udev rules
Date: Mon, 28 Nov 2016 20:39:34 -0600 [thread overview]
Message-ID: <20161129023934.GR15757@heinlein.lan> (raw)
In-Reply-To: <CACPK8Xe9j1knVThhduju-OCipgX_UEZMe4bL+Hf9xJMSWVfq5A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]
On Tue, Nov 29, 2016 at 11:58:32AM +1030, Joel Stanley wrote:
> What are the functions of the 'phosphor-hwmon' service?
phosphor-hwmon is an implementation of these dbus interfaces, which
sources its information from the Linux hwmon interfaces:
https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Sensor
> I would consider naming it phosphor-hardware-monitor or similar, in
> case you decide it should monitor things other than Linux 'hwmon'
> devices.
An alternative source of data should be in a separate application /
repository. The non-hwmon-specific should be mostly contained in the
generated dbus bindings, so there is no or very little overlap between
different implementations.
> > It has lines like:
> >
> > SUBSYSTEM=="hwmon", DEVPATH=="*i2c-3/3-0077/*", ACTION == "add",
> > TAG+="systemd",
> > ENV{SYSTEMD_WANTS}+="phosphor-hwmon@/sys/class/hwmon/%k.service",
> > ENV{ENVFILE}+="/etc/hwmon.d/hwmon-bmp280-3-77.conf"
>
> Do we need to match only on the path? Can it match on the device driver instead?
The driver name is insufficient to differentiate between two different
sensors of the same device type. For instance, the front and rear
ambient may both be LMxx-class devices, but have different dbus paths
and potentially different thresholds.
> > where the .conf file will contain any threshold values, maybe like CRIT=50.
> > The command line in the unit file would then somehow make a udevadm call to
> > pull out the ENVFILE so it can get passed into the executable along with the
> > device path.
> >
> > Is this the recommended way to go about doing this? Or instead of having a
> > separate udev rule for each device, but 1 service file, is it better to have
> > 1 udev rule but separate service files?
>
> It appears you plan on re-implementing the functionality of the
> lm-sensors package. While the upstream project has dissappeared from
> the net, the source code and documentation is still available. I would
> consider firstly trying to re-use existing daemons and configuration
> that we already have access to. If that does not work, then reading
> and re-using the source code to adopt the same design would save you
> time and effort.
Can you give more details on which aspects you feel there is overlap?
In any case, your questions and critiques should all be directed at Brad
who is implementing phosphor-hwmon and not Matt who asked specifically
about how to launch the application from MRW-based information?
--
Patrick Williams
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2016-11-29 2:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 16:31 Starting the phosphor-hwmon service from udev rules Matt Spinler
2016-11-29 1:28 ` Joel Stanley
2016-11-29 2:39 ` Patrick Williams [this message]
2016-11-29 2:42 ` Patrick Williams
2016-11-29 16:30 ` Matt Spinler
2016-11-30 1:14 ` Andrew Jeffery
2016-11-30 2:19 ` Patrick Williams
2016-12-07 19:44 ` Matt Spinler
2016-12-07 22:38 ` Patrick Williams
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=20161129023934.GR15757@heinlein.lan \
--to=patrick@stwcx.xyz \
--cc=joel@jms.id.au \
--cc=mspinler@linux.vnet.ibm.com \
--cc=openbmc@lists.ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.