freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading a sensor (fan) in C


From: Al Chu
Subject: Re: Reading a sensor (fan) in C
Date: Thu, 18 Mar 2021 10:25:18 -0700

Hi Ian,

It will be a tad slow going unfortunately, as you're trying to do
multiple steps :-)  My recommendation:

- look at the code at bmc-info (which is far simpler), use that to get
an idea of how to setup an IPMI connection.

- once you get that, look at the code ipmi-sensors to see how to read
the current fan speed.  It'll involve the "sdr" library in libfreeipmi,
then the "sensor-read" library in libfreeipmi. 

- then via code in ipmi-raw, you can see how to write raw data.

Hope that atleast provides hints.  You're sort of doing multiple steps
that typically aren't done together.  But feel free to ping this list
as you're moving along.

Al

On Mon, 2021-03-15 at 18:55 -0500, Ian Pilcher wrote:
> I want to write a simple program to manage the fan speeds on my
> Super-
> Micro server.  (The fan management "modes" provided by the BMC simply
> aren't able to achieve a good balance of noise and temperature.)
> 
> The program will need to read fan speeds via IPMI and send "raw"
> commands to set the fan duty cycles[1].  (CPU temperatures can be
> read
> from sysfs, and HDD temperatures can be read with libatasmart.)
> 
> So I'm trying to figure out how to read a fan sensor by looking at
> the
> FreeIPMI source code (particularly ipmi-sensors), but it's slow
> going.
> 
> Can anyone provide an overview of the steps needed?
> 
> Thanks!
>   [1] 
> https://urldefense.us/v3/__https://forums.servethehome.com/index.php?resources*supermicro-x9-x10-x11-fan-speed-control.20*__;Ly8!!G2kpM7uM-TzIFchu!ikpXmktiCoxQwp2t5-l7gnU4fmOH2kdwp1q1O1459i3EZ3_j1c6dZsxNl9slmVvN$
>  
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]