All of lore.kernel.org
 help / color / mirror / Atom feed
* Total server power consumpion
@ 2018-10-18  8:58 Alexander Soldatov
  2018-10-19  2:44 ` Lei YU
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Soldatov @ 2018-10-18  8:58 UTC (permalink / raw)
  To: openbmc; +Cc: Brad Bishop

  Hi all,
  We have faced with the problem of showing total server power consumption in the webui. Total power consumption is calculated as sum of the PSUs input powers. Input power values are read from PSU using PMBus protocol and are published in the Linux sysfs.  We are using our proprietary PSU driver. So I have an idea. Driver should create virtual hwmon device with total power parameters. We could use standart phopshor-hwmon to publish total power in DBus.
  But the phosphor-hwmon requires the physical device path (calloutPath). This parameter is transmitted using %p option of the udev. There is no path for the virtual device. The phosphor-hwmon does not get calloutPath and exits with error.
  There are some questions:
  1. How is this problem solved in other projects (the Witherspoon etc.)?
  2. The Witherspoon server has 2,2 kW PSUs. The maximum value of power in linux sysfs on the 32 bit system is 2147483647 µW. How the correct power view is solved?
  3. How does the phosphor-hwmon use calloutPath besides logs info output?
  4. Does it make sense to give the phosphor-hwmon an ability to work with virtual devices?   
   Regards,
   Alexander Soldatov.

    

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Total server power consumpion
  2018-10-18  8:58 Total server power consumpion Alexander Soldatov
@ 2018-10-19  2:44 ` Lei YU
  0 siblings, 0 replies; 2+ messages in thread
From: Lei YU @ 2018-10-19  2:44 UTC (permalink / raw)
  To: a.soldatov; +Cc: OpenBMC Maillist, Brad Bishop

On Thu, Oct 18, 2018 at 4:58 PM Alexander Soldatov <a.soldatov@yadro.com> wrote:
>   We have faced with the problem of showing total server power consumption in the webui. Total power consumption is calculated as sum of the PSUs input powers. Input power values are read from PSU using PMBus protocol and are published in the Linux sysfs.  We are using our proprietary PSU driver. So I have an idea. Driver should create virtual hwmon device with total power parameters. We could use standart phopshor-hwmon to publish total power in DBus.
>   But the phosphor-hwmon requires the physical device path (calloutPath). This parameter is transmitted using %p option of the udev. There is no path for the virtual device. The phosphor-hwmon does not get calloutPath and exits with error.

phosphor-hwmon has two arguments, -o (dev-path) or -p (path). You could use -p
to specify the hwmon path directly.

>   There are some questions:
>   1. How is this problem solved in other projects (the Witherspoon etc.)?
Witherspoon's total power is reported by occ, which is handled by occ-hwmon
driver.

>   2. The Witherspoon server has 2,2 kW PSUs. The maximum value of power in linux sysfs on the 32 bit system is 2147483647 µW. How the correct power view is solved?
The code use unit64_t for Value property, so it is ok.

>   3. How does the phosphor-hwmon use calloutPath besides logs info output?
>   4. Does it make sense to give the phosphor-hwmon an ability to work with virtual devices?
It could work with -p argument.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-19  2:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18  8:58 Total server power consumpion Alexander Soldatov
2018-10-19  2:44 ` Lei YU

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.