lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41840b750709011105s6c434217t50d965a0b17df643@mail.gmail.com>
Date:	Sat, 1 Sep 2007 14:05:03 -0400
From:	"Shem Multinymous" <multinymous@...il.com>
To:	"Pavel Machek" <pavel@....cz>
Cc:	"Darrick J. Wong" <djwong@...ibm.com>,
	"Jean Delvare" <khali@...ux-fr.org>,
	"Henrique de Moraes Holschuh" <hmh@....eng.br>,
	"Mark M. Hoffman" <mhoffman@...htlink.com>,
	linux-kernel@...r.kernel.org, lm-sensors@...sensors.org
Subject: Re: [PATCH] hwmon: Add power meters to Documentation/hwmon/sysfs-interface

On 9/1/07, Pavel Machek <pavel@....cz> wrote:
> > diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
> > index b3a9e1b..da546ce 100644
> > --- a/Documentation/hwmon/sysfs-interface
> > +++ b/Documentation/hwmon/sysfs-interface
> > @@ -304,6 +304,21 @@ curr[1-*]_input  Current input value
> >               Unit: milliampere
> >               RO
> >
> > +*********
> > +* Power *
> > +*********
> > +
> > +power[1-*]_input     Current power use
> > +                     Unit: milliWatt
> > +                     RO
> > +
> > +power[1-*]_max_input Historical maximum power use
> > +                     Unit: milliWatt
> > +                     RO
> > +
> > +power[1-*]_min_input Historical minimum power use
> > +                     Unit: milliWatt
> > +                     RO
>
> Should we add power?_10sec_avg_input? IIRC thinkpads export that,
> too.

Indeed, ThinkPads report both instantaneous power/current and a
rolling average (exponentially decaying, I think) over the last ~10
seconds. ACPI provides only the rolling average, and the out-of-tree
tp_smapi driver provides both.

More generally, linux/power_supply.h defines these attributes:

	POWER_SUPPLY_PROP_VOLTAGE_NOW,
	POWER_SUPPLY_PROP_VOLTAGE_AVG,
	POWER_SUPPLY_PROP_CURRENT_NOW,
	POWER_SUPPLY_PROP_CURRENT_AVG,

It would be nice if the power meter interface uses the same
conventions as the power supply interface, since the former is
essentially a subset of the latter. Userspace app that read power
meters via sysfs should work for power supplies too.

  Shem
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ