Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: crsri(4) for monitoring corsair rm/hx i series power supplies
To:
David Gwynne <david@gwynne.id.au>
Cc:
tech@openbsd.org
Date:
Tue, 26 Mar 2024 10:25:07 +0100

Download raw body.

Thread
> Date: Tue, 26 Mar 2024 11:11:34 +1000
> From: David Gwynne <david@gwynne.id.au>
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> i'm trying to put a new box together to run at home, and was interested
> in keeping an eye on the power consumption of the system. the most
> common way to do this is with a power monitoring plug thing, but it
> seems like a no brainer to me that this functionality would be part of
> the actual power supply in the computer.
> 
> turns out the no brainer is actually quite niche, and there's only a
> couple of manufacturers that do it and only on a subset of their
> products. corsair is one of those, and one of these psus was on ebay so
> i grabbed it.
> 
> the psu has a usb socket which you can plug into your system, and then
> you can ask it for information. 
> 
> the following is a fairly quick and dirty driver to talk to my psu. it's
> based on information figured out by Wilken Gottwalt, as per
> https://github.com/wgottwalt/corsair-psu/tree/main.
> 
> i say it's quick and dirty cos it won't cope with the usb device being
> unplugged while the sensors are being read, and apparently different
> PSUs can present different subsets of the possible information. eg, mine
> does not appear to know how much current i'm pulling from mains, and
> doesn't do any power calculations. i should probably omit those values
> if i detect that situation.
> 
> these feel like things we could work on in the tree, if the driver is
> acceptibe in the first place.
> 
> the readings are presented as kstats like this:
> 
> crsri0:0:corsair-psu:0
>          product: RM850i
>         vrm-temp: 47.00 degC
>        case-temp: 41.25 degC
>        fan-speed: 0
>      input-volts: 230.00 VAC
>    input-current: 0.000 A
>        12v-volts: 12.06 VDC
>      12v-current: 1.250 A
>        12v-power: 0.000 W
>         5v-volts: 5.03 VDC
>       5v-current: 1.938 A
>         5v-power: 0.000 W
>       3.3v-volts: 3.33 VDC
>     3.3v-current: 0.688 A
>       3.3v-power: 0.000 W

But these should be sensors, not kstats!