All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] IPMI sysfs support for 2.6.16.x
@ 2007-02-17 17:36 Paul Reilly
  2007-02-17 23:22 ` Corey Minyard
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paul Reilly @ 2007-02-17 17:36 UTC (permalink / raw)
  To: lm-sensors


Hello,
I am trying to get IPMI Sensors working on kernel 2.6.16.33.
I have a PenguinComputing Altus Server with inbuilt BMC, and lm-sensors
suggests I need bmcsensors. Googling I followed the instructions here:
http://bmcsensors-26.sourceforge.net/

It appears I need to do 2 things:

(A) patch my kernel for ipmi sysfs support
(B) patch my kernel again with the IPMI sensors patch

I would love to just use 2.6.17 and skip (A), but I am required to
use 2.6.16.33 kernel only. So:

Doing (A) works so far. The patchfile contains patches for 8 files, and
worked for all except the file "ipmi_si_intf.c" which failed on several chunks:

patching file drivers/char/ipmi/ipmi_si_intf.c
Hunk #1 succeeded at 110 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 196 (offset -5 lines).
Hunk #3 FAILED at 984.
Hunk #4 succeeded at 1183 with fuzz 2 (offset 19 lines).
Hunk #5 succeeded at 1331 with fuzz 2 (offset 59 lines).
Hunk #6 FAILED at 1915.
Hunk #7 succeeded at 1929 with fuzz 1 (offset 31 lines).
Hunk #8 succeeded at 1972 (offset 31 lines).
Hunk #9 succeeded at 1985 (offset 31 lines).
Hunk #10 FAILED at 2088.
Hunk #11 FAILED at 2167.
Hunk #12 succeeded at 2329 (offset -26 lines).
Hunk #13 FAILED at 2422.
Hunk #14 succeeded at 2431 with fuzz 1 (offset -31 lines).
Hunk #15 succeeded at 2552 with fuzz 1 (offset -36 lines).
Hunk #16 FAILED at 2574.
6 out of 16 hunks FAILED -- saving rejects to file
drivers/char/ipmi/ipmi_si_intf.c.rej

I tried patching manually, but it was beyond me. For example chunk 3
refers to static LIST_HEAD(smi_infos);  which is not present in my 2.6.16.33 
ipmi_si_intf.c

How can I tell which 2.6.16.X  branch these patches are meant for?
Perhaps they apply on an earlier or later 2.6.16.x series kernel.

Can I just copy the whole drivers/char/ipmi/  dir from a 2.6.17 kernel,
and put it in my 2.6.16.33 ?

Thanks,

Paul
-- 


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

* [lm-sensors] IPMI sysfs support for 2.6.16.x
  2007-02-17 17:36 [lm-sensors] IPMI sysfs support for 2.6.16.x Paul Reilly
@ 2007-02-17 23:22 ` Corey Minyard
  2007-02-18  0:16 ` Paul Reilly
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Corey Minyard @ 2007-02-17 23:22 UTC (permalink / raw)
  To: lm-sensors

Paul Reilly wrote:
> Hello,
> I am trying to get IPMI Sensors working on kernel 2.6.16.33.
> I have a PenguinComputing Altus Server with inbuilt BMC, and lm-sensors
> suggests I need bmcsensors. Googling I followed the instructions here:
> http://bmcsensors-26.sourceforge.net/
>
> It appears I need to do 2 things:
>
> (A) patch my kernel for ipmi sysfs support
> (B) patch my kernel again with the IPMI sensors patch
>
> I would love to just use 2.6.17 and skip (A), but I am required to
> use 2.6.16.33 kernel only. So:
>
> Doing (A) works so far. The patchfile contains patches for 8 files, and
> worked for all except the file "ipmi_si_intf.c" which failed on several chunks:
>
> patching file drivers/char/ipmi/ipmi_si_intf.c
> Hunk #1 succeeded at 110 with fuzz 2 (offset -2 lines).
> Hunk #2 succeeded at 196 (offset -5 lines).
> Hunk #3 FAILED at 984.
> Hunk #4 succeeded at 1183 with fuzz 2 (offset 19 lines).
> Hunk #5 succeeded at 1331 with fuzz 2 (offset 59 lines).
> Hunk #6 FAILED at 1915.
> Hunk #7 succeeded at 1929 with fuzz 1 (offset 31 lines).
> Hunk #8 succeeded at 1972 (offset 31 lines).
> Hunk #9 succeeded at 1985 (offset 31 lines).
> Hunk #10 FAILED at 2088.
> Hunk #11 FAILED at 2167.
> Hunk #12 succeeded at 2329 (offset -26 lines).
> Hunk #13 FAILED at 2422.
> Hunk #14 succeeded at 2431 with fuzz 1 (offset -31 lines).
> Hunk #15 succeeded at 2552 with fuzz 1 (offset -36 lines).
> Hunk #16 FAILED at 2574.
> 6 out of 16 hunks FAILED -- saving rejects to file
> drivers/char/ipmi/ipmi_si_intf.c.rej
>
> I tried patching manually, but it was beyond me. For example chunk 3
> refers to static LIST_HEAD(smi_infos);  which is not present in my 2.6.16.33 
> ipmi_si_intf.c
>
> How can I tell which 2.6.16.X  branch these patches are meant for?
> Perhaps they apply on an earlier or later 2.6.16.x series kernel.
>   
They are critical bugfix only releases.  There's not much difference 
between 2.6.16 and 2.6.16.x.
> Can I just copy the whole drivers/char/ipmi/  dir from a 2.6.17 kernel,
> and put it in my 2.6.16.33 ?
>   
That is probably the easiest way to handle this.  There may be one or 
two things that need to be fixed, but not much.

-corey


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

* [lm-sensors] IPMI sysfs support for 2.6.16.x
  2007-02-17 17:36 [lm-sensors] IPMI sysfs support for 2.6.16.x Paul Reilly
  2007-02-17 23:22 ` Corey Minyard
@ 2007-02-18  0:16 ` Paul Reilly
  2007-02-19  8:10 ` Philip Pokorny
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Reilly @ 2007-02-18  0:16 UTC (permalink / raw)
  To: lm-sensors


> > Can I just copy the whole drivers/char/ipmi/  dir from a 2.6.17 kernel,
> > and put it in my 2.6.16.33 ?
> >
> That is probably the easiest way to handle this.  There may be one or
> two things that need to be fixed, but not much.

OK, Thanks Corey. I tried that and it bails out during the kernel compile
with problems with function declarations:

  CC      drivers/char/ipmi/ipmi_msghandler.o
drivers/char/ipmi/ipmi_msghandler.c: In function
?€˜ipmi_init_msghandler?€™:
drivers/char/ipmi/ipmi_msghandler.c:3762: warning: implicit declaration of
function ?€˜atomic_notifier_chain_register?€™
drivers/char/ipmi/ipmi_msghandler.c: In function
?€˜cleanup_ipmi?€™:
drivers/char/ipmi/ipmi_msghandler.c:3782: warning: implicit declaration of
function ?€˜atomic_notifier_chain_unregister?€™
  CC      drivers/char/ipmi/ipmi_devintf.o
  CC      drivers/char/ipmi/ipmi_si_intf.o
drivers/char/ipmi/ipmi_si_intf.c:240: warning: type defaults to
?€˜int?€™ in declaration of
?€˜ATOMIC_NOTIFIER_HEAD?€™
drivers/char/ipmi/ipmi_si_intf.c:240: warning: parameter names (without types)
in function declaration
drivers/char/ipmi/ipmi_si_intf.c: In function
?€˜register_xaction_notifier?€™:
drivers/char/ipmi/ipmi_si_intf.c:243: warning: implicit declaration of function
?€˜atomic_notifier_chain_register?€™
drivers/char/ipmi/ipmi_si_intf.c:243: error:
?€˜xaction_notifier_list?€™ undeclared (first use in this
function)
drivers/char/ipmi/ipmi_si_intf.c:243: error: (Each undeclared identifier is
reported only once
drivers/char/ipmi/ipmi_si_intf.c:243: error: for each function it appears in.)
drivers/char/ipmi/ipmi_si_intf.c: In function
?€˜start_next_msg?€™:
drivers/char/ipmi/ipmi_si_intf.c:305: warning: implicit declaration of function
?€˜atomic_notifier_call_chain?€™
drivers/char/ipmi/ipmi_si_intf.c:305: error:
?€˜xaction_notifier_list?€™ undeclared (first use in this
function)
make[3]: *** [drivers/char/ipmi/ipmi_si_intf.o] Error 1
make[2]: *** [drivers/char/ipmi] Error 2
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2


This is what I did:
# rm -rf linux-2.6.16.33/drivers/char/ipmi/
# cp -pR linux-2.6.17.1/drivers/char/ipmi/ linux-2.6.16.33/drivers/char/
# cp linux-2.6.17.1/include/linux/ipmi* linux-2.6.16.33/include/linux/
# patch -p1 < /sources/local/bmcsensors/ipmisensors-20060805-0622.diff
patching file drivers/char/ipmi/ipmi_msghandler.c
Hunk #1 succeeded at 1749 (offset 5 lines).
Hunk #2 succeeded at 3839 (offset 8 lines).
patching file drivers/hwmon/Kconfig
Hunk #1 succeeded at 164 (offset -16 lines).
patching file drivers/hwmon/Makefile
Hunk #1 succeeded at 24 with fuzz 1 (offset -2 lines).
patching file drivers/hwmon/ipmisensors.c
patching file drivers/hwmon/ipmisensors.h
patching file include/linux/ipmi.h
Hunk #1 succeeded at 288 (offset 4 lines).
patching file include/linux/ipmi_msgdefs.h

# cd linux-2.6.16.33
# make menuconfig
# make

Should I be doing something different with the include files?
Any tips on how to fix this?

Paul
-- 


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

* [lm-sensors] IPMI sysfs support for 2.6.16.x
  2007-02-17 17:36 [lm-sensors] IPMI sysfs support for 2.6.16.x Paul Reilly
  2007-02-17 23:22 ` Corey Minyard
  2007-02-18  0:16 ` Paul Reilly
@ 2007-02-19  8:10 ` Philip Pokorny
  2007-02-19 13:40 ` Corey Minyard
  2007-02-20 13:07 ` Paul Reilly
  4 siblings, 0 replies; 6+ messages in thread
From: Philip Pokorny @ 2007-02-19  8:10 UTC (permalink / raw)
  To: lm-sensors

Paul Reilly wrote:
>>> Can I just copy the whole drivers/char/ipmi/  dir from a 2.6.17 kernel,
>>> and put it in my 2.6.16.33 ?
>>>
>>>       
>> That is probably the easiest way to handle this.  There may be one or
>> two things that need to be fixed, but not much.
>>     
>
> OK, Thanks Corey. I tried that and it bails out during the kernel compile
> with problems with function declarations:
>
> [snip]
> Should I be doing something different with the include files?
> Any tips on how to fix this?

Unless there is some specific reason that you want lm_sensors, you might
find that accessing the temperature readings directly with IPMI methods
is much easier.  Your kernel likely already has the IPMI drivers and you
may already have the ipmitool command which gives you access to all the
BMC features without needing sysfs support.

Penguin Computing has done extensive testing of ipmitool to access the
BMC both locally and remotely via IPMI over LAN.

Look at the output of 'ipmitool sdr elist' and 'ipmitool sensors'

In addition, with ipmitool you have access to the historical event logs
(ipmitool sel elist), server control ("ipmitool chassis power status"
and related "soft" for clean ACPI shutdown, "on", and "reset"), and
console access (ipmitool sol)

Give Penguin Tech Support a call if you need help getting IPMI working
on your system.

Thanks,
Phil Pokorny
Director of Field Engineering
Penguin Computing


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

* [lm-sensors] IPMI sysfs support for 2.6.16.x
  2007-02-17 17:36 [lm-sensors] IPMI sysfs support for 2.6.16.x Paul Reilly
                   ` (2 preceding siblings ...)
  2007-02-19  8:10 ` Philip Pokorny
@ 2007-02-19 13:40 ` Corey Minyard
  2007-02-20 13:07 ` Paul Reilly
  4 siblings, 0 replies; 6+ messages in thread
From: Corey Minyard @ 2007-02-19 13:40 UTC (permalink / raw)
  To: lm-sensors

Paul Reilly wrote:
>>> Can I just copy the whole drivers/char/ipmi/  dir from a 2.6.17 kernel,
>>> and put it in my 2.6.16.33 ?
>>>
>>>       
>> That is probably the easiest way to handle this.  There may be one or
>> two things that need to be fixed, but not much.
>>     
>
> OK, Thanks Corey. I tried that and it bails out during the kernel compile
> with problems with function declarations:
>
>   CC      drivers/char/ipmi/ipmi_msghandler.o
> drivers/char/ipmi/ipmi_msghandler.c: In function
> ?&#128;&#152;ipmi_init_msghandler?&#128;&#153;:
> drivers/char/ipmi/ipmi_msghandler.c:3762: warning: implicit declaration of
> function ?&#128;&#152;atomic_notifier_chain_register?&#128;&#153;
> drivers/char/ipmi/ipmi_msghandler.c: In function
> ?&#128;&#152;cleanup_ipmi?&#128;&#153;:
> drivers/char/ipmi/ipmi_msghandler.c:3782: warning: implicit declaration of
> function ?&#128;&#152;atomic_notifier_chain_unregister?&#128;&#153;
>   
You will need to change the atomic_notifier_chain_[un]register back to 
notifier_chain_[un]register.  The atomic stuff was new in 2.6.17.
>   CC      drivers/char/ipmi/ipmi_devintf.o
>   CC      drivers/char/ipmi/ipmi_si_intf.o
> drivers/char/ipmi/ipmi_si_intf.c:240: warning: type defaults to
> ?&#128;&#152;int?&#128;&#153; in declaration of
> ?&#128;&#152;ATOMIC_NOTIFIER_HEAD?&#128;&#153;
> drivers/char/ipmi/ipmi_si_intf.c:240: warning: parameter names (without types)
> in function declaration
> drivers/char/ipmi/ipmi_si_intf.c: In function
> ?&#128;&#152;register_xaction_notifier?&#128;&#153;:
> drivers/char/ipmi/ipmi_si_intf.c:243: warning: implicit declaration of function
> ?&#128;&#152;atomic_notifier_chain_register?&#128;&#153;
> drivers/char/ipmi/ipmi_si_intf.c:243: error:
> ?&#128;&#152;xaction_notifier_list?&#128;&#153; undeclared (first use in this
> function)
> drivers/char/ipmi/ipmi_si_intf.c:243: error: (Each undeclared identifier is
> reported only once
> drivers/char/ipmi/ipmi_si_intf.c:243: error: for each function it appears in.)
> drivers/char/ipmi/ipmi_si_intf.c: In function
> ?&#128;&#152;start_next_msg?&#128;&#153;:
> drivers/char/ipmi/ipmi_si_intf.c:305: warning: implicit declaration of function
> ?&#128;&#152;atomic_notifier_call_chain?&#128;&#153;
> drivers/char/ipmi/ipmi_si_intf.c:305: error:
> ?&#128;&#152;xaction_notifier_list?&#128;&#153; undeclared (first use in this
> function)
>   
Like the changes to ipmi_msghandler, the xaction stuff will need to 
change back to the non-atomic version.  Look in the original 2.6.16 code 
for how it should look.

As Phil Pokorny mentioned, IPMI is quite a bit more capable than 
lmsensors.  If you can use IPMI directly, it is very powerful.  You have 
several options of libraries and packages to use it.  ipmitool is good 
for scripting.   OpenIPMI is good for writing programs dealing with 
IPMI.  There is some learning curve involved when dealing with IPMI, though.

-Corey
> make[3]: *** [drivers/char/ipmi/ipmi_si_intf.o] Error 1
> make[2]: *** [drivers/char/ipmi] Error 2
> make[1]: *** [drivers/char] Error 2
> make: *** [drivers] Error 2
>
>
> This is what I did:
> # rm -rf linux-2.6.16.33/drivers/char/ipmi/
> # cp -pR linux-2.6.17.1/drivers/char/ipmi/ linux-2.6.16.33/drivers/char/
> # cp linux-2.6.17.1/include/linux/ipmi* linux-2.6.16.33/include/linux/
> # patch -p1 < /sources/local/bmcsensors/ipmisensors-20060805-0622.diff
> patching file drivers/char/ipmi/ipmi_msghandler.c
> Hunk #1 succeeded at 1749 (offset 5 lines).
> Hunk #2 succeeded at 3839 (offset 8 lines).
> patching file drivers/hwmon/Kconfig
> Hunk #1 succeeded at 164 (offset -16 lines).
> patching file drivers/hwmon/Makefile
> Hunk #1 succeeded at 24 with fuzz 1 (offset -2 lines).
> patching file drivers/hwmon/ipmisensors.c
> patching file drivers/hwmon/ipmisensors.h
> patching file include/linux/ipmi.h
> Hunk #1 succeeded at 288 (offset 4 lines).
> patching file include/linux/ipmi_msgdefs.h
>
> # cd linux-2.6.16.33
> # make menuconfig
> # make
>
> Should I be doing something different with the include files?
> Any tips on how to fix this?
>
> Paul
>   



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

* [lm-sensors] IPMI sysfs support for 2.6.16.x
  2007-02-17 17:36 [lm-sensors] IPMI sysfs support for 2.6.16.x Paul Reilly
                   ` (3 preceding siblings ...)
  2007-02-19 13:40 ` Corey Minyard
@ 2007-02-20 13:07 ` Paul Reilly
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Reilly @ 2007-02-20 13:07 UTC (permalink / raw)
  To: lm-sensors


Hi Philip,

Thanks for the info, and advice on taking the IPMI approach directly
rather than using lm-sensors. I had not looked at that, and perhaps
it is the best way to go. I'd like to be able to integrate the sensor
data in to Cacti to graph temperatures, fan speeds etc over time. So
if I can do that with  IPMI tool I will use that.

IPMItool certainly looks very good from what I have seen,

Best Regards,
Paul

> Unless there is some specific reason that you want lm_sensors, you might
> find that accessing the temperature readings directly with IPMI methods
> is much easier.  Your kernel likely already has the IPMI drivers and you
> may already have the ipmitool command which gives you access to all the
> BMC features without needing sysfs support.
>
> Penguin Computing has done extensive testing of ipmitool to access the
> BMC both locally and remotely via IPMI over LAN.
>
> Look at the output of 'ipmitool sdr elist' and 'ipmitool sensors'
>
> In addition, with ipmitool you have access to the historical event logs
> (ipmitool sel elist), server control ("ipmitool chassis power status"
> and related "soft" for clean ACPI shutdown, "on", and "reset"), and
> console access (ipmitool sol)
>
> Give Penguin Tech Support a call if you need help getting IPMI working
> on your system.
>
> Thanks,
> Phil Pokorny
> Director of Field Engineering
> Penguin Computing
>


-- 


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

end of thread, other threads:[~2007-02-20 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-17 17:36 [lm-sensors] IPMI sysfs support for 2.6.16.x Paul Reilly
2007-02-17 23:22 ` Corey Minyard
2007-02-18  0:16 ` Paul Reilly
2007-02-19  8:10 ` Philip Pokorny
2007-02-19 13:40 ` Corey Minyard
2007-02-20 13:07 ` Paul Reilly

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.