Define sysfs interfaces for ibmaem driver
Subsystems (2)
PATCH 1/2 Define sysfs interfaces for ibmaem driver
Update sysfs interface documentation to include energy meters and power meter averaging intervals.
---
Documentation/hwmon/sysfs-interface | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
Documentation/hwmon/sysfs-interface +12 -0
@@ -328,6 +328,14 @@ curr[1-*]_input Current input value Unit: milliampere RO +********** +* Energy * +********** + +energy[1-*]_input Instantaneous energy use + Unit: microJoule + RO + ********* * Power * *********
@@ -336,6 +344,10 @@ power[1-*]_average Average power use Unit: microWatt RO +power[1-*]_interval Power use averaging interval + Unit: milliseconds + RW + power[1-*]_average_highest Historical average maximum power use Unit: microWatt RO
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Darrick,
Quoted 14 lines · Darrick J. Wong
Update sysfs interface documentation to include energy meters and power meter averaging intervals.
Signed-off-by Darrick J. Wong <[email protected]>---
Documentation/hwmon/sysfs-interface | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)Documentation/hwmon/sysfs-interface +0
-0
Documentation/hwmon/sysfs-interface curr[1-*]_input Current input value · line 335
Quoted 8 lines
Documentation/hwmon/sysfs-interface +5
-0@@ -328,6 +328,14 @@ curr[1-*]_input Current input value Unit: milliampere RO +********** +* Energy * +********** + +energy[1-*]_input Instantaneous energy use
This doesn't make sense to me. Energy is a quantity, it exists independently of time. An "instantaneous energy use" only makes sense if you tell in what (presumably very small) amount of time the energy was used... and then what you are measuring is not an energy but a power, for which we already have an interface. Please clarify.
Documentation/hwmon/sysfs-interface power[1-*]_average Average power use · line 347
Quoted 11 lines
Documentation/hwmon/sysfs-interface +4
-0+ Unit: microJoule + RO + ********* * Power * *********@@ -336,6 +344,10 @@ power[1-*]_average Average power use Unit: microWatt RO +power[1-*]_interval Power use averaging interval
Wouldn't power[1-*]_average_interval be clearer?
Documentation/hwmon/sysfs-interface power[1-*]_average Average power use · line 348
Quoted 1 line
Documentation/hwmon/sysfs-interface +1
-0+ Unit: milliseconds
Nitpicking for consistency: millisecond (no trailing s).
What values do you expect for this entry? I am wondering if it's safe to use millisecond as a unit. Is it unlikely that a future chip will support averaging intervals below the millisecond?
Quoted 5 lines
Documentation/hwmon/sysfs-interface +2
-0+ RW + power[1-*]_average_highest Historical average maximum power use Unit: microWatt RO
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · Jean Delvare
Quoted 1 line · Darrick J. Wong
+energy[1-*]_input Instantaneous energy use
This doesn't make sense to me. Energy is a quantity, it exists independently of time. An "instantaneous energy use" only makes sense if you tell in what (presumably very small) amount of time the energy was used... and then what you are measuring is not an energy but a power, for which we already have an interface. Please clarify.
I agree. May I suggest "cumulative energy use"?
Wes Felter - [email protected]
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 7 lines · Jean Delvare
Quoted 1 line
+energy[1-*]_input Instantaneous energy use
This doesn't make sense to me. Energy is a quantity, it exists independently of time. An "instantaneous energy use" only makes sense if you tell in what (presumably very small) amount of time the energy was used... and then what you are measuring is not an energy but a power, for which we already have an interface. Please clarify.
Wes Felter suggested "Cumulative energy use", and I'll go with that.
Quoted 3 lines
Quoted 1 line
+power[1-*]_interval Power use averaging interval
Wouldn't power[1-*]_average_interval be clearer?
Given that power is energy used over a period of time, I wonder if it might be more accurate to remove powerX_input and leave this name alone. That said, it does seem to be the case that interval names take the format "${sensorfile}_interval", so I suppose it makes more sense the way that you suggest.
Quoted 7 lines
Documentation/hwmon/sysfs-interface power[1-*]_average Average power use · line 348
Quoted 1 line
Documentation/hwmon/sysfs-interface +1
-0+ Unit: millisecondsNitpicking for consistency: millisecond (no trailing s).
What values do you expect for this entry? I am wondering if it's safe to use millisecond as a unit. Is it unlikely that a future chip will support averaging intervals below the millisecond?
It's possible that a future chip could do this, though today we only support intervals in the hundreds of milliseconds. The default for the ibmaem driver is currently 1s.
--D
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 10 lines · Darrick J. Wong
Quoted 7 lines · Jean Delvare
Quoted 1 line
+energy[1-*]_input Instantaneous energy use
This doesn't make sense to me. Energy is a quantity, it exists independently of time. An "instantaneous energy use" only makes sense if you tell in what (presumably very small) amount of time the energy was used... and then what you are measuring is not an energy but a power, for which we already have an interface. Please clarify.
Wes Felter suggested "Cumulative energy use", and I'll go with that.
OK. Another question that comes to my mind now is the unit... Do the chips express the value in Joules internally? I would have expected Watt-hours. Of course we can convert as needed, but if all known chips use the same unit then I think we should that unit too, to minimize the required conversions.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
+power[1-*]_interval Power use averaging interval
Wouldn't power[1-*]_average_interval be clearer?
Given that power is energy used over a period of time, I wonder if it might be more accurate to remove
powerX_inputand leave this name alone.
It really depends on what the chips report. Typically the drivers should report the values from the chip without too much tinkering (other than conversion to standard units). If some chips can report both "instantaneous" and "average" power uses, it makes sense to have both sets of filenames in the standard interface. If not then I am fine getting rid of one set.
Quoted 3 lines
That said, it does seem to be the case that interval names take the format "${sensorfile}_interval", so I suppose it makes more sense the way that you suggest.
I don't think there is any precedent yet. I suggested this for unambiguity rather than consistency.
Quoted 11 lines
Quoted 7 lines
Documentation/hwmon/sysfs-interface power[1-*]_average Average power use · line 348
Quoted 1 line
Documentation/hwmon/sysfs-interface +1
-0+ Unit: millisecondsNitpicking for consistency: millisecond (no trailing s).
What values do you expect for this entry? I am wondering if it's safe to use millisecond as a unit. Is it unlikely that a future chip will support averaging intervals below the millisecond?
It's possible that a future chip could do this, though today we only support intervals in the hundreds of milliseconds. The default for the ibmaem driver is currently 1s.
Oh well, I guess that anything shorter than 1 ms can be considered "instantaneous power use", so we can go with millisecond.
Out of curiosity, what are the values supported by the ibmaem chip?
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
[Got in a car accident tonight; replies will be scarce for the next week or two.... :(]
Quoted 5 lines · Jean Delvare
OK. Another question that comes to my mind now is the unit... Do the chips express the value in Joules internally? I would have expected Watt-hours. Of course we can convert as needed, but if all known chips use the same unit then I think we should that unit too, to minimize the required conversions.
The IBM chips report some form of Joules, not Wh.
Quoted 6 lines
It really depends on what the chips report. Typically the drivers should report the values from the chip without too much tinkering (other than conversion to standard units). If some chips can report both "instantaneous" and "average" power uses, it makes sense to have both sets of filenames in the standard interface. If not then I am fine getting rid of one set.
Hmm, I'll think about what I want to do with this. Probably just leave them.
Quoted 2 lines
I don't think there is any precedent yet. I suggested this for unambiguity rather than consistency.
Ok.
Quoted 2 lines
Oh well, I guess that anything shorter than 1 ms can be considered "instantaneous power use", so we can go with millisecond.
Ok.
Quoted 1 line
Out of curiosity, what are the values supported by the ibmaem chip?
I don't know what the lower limits are; it depends on how often the BMC decides to update the counters, and that seems to vary by machine.
--D
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors