panicsel-developers Mailing List for Panicsel IPMI project (Page 3)
Brought to you by:
arcress
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(6) |
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(3) |
Feb
(5) |
Mar
(12) |
Apr
(4) |
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(7) |
Oct
(3) |
Nov
|
Dec
(1) |
| 2004 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
(7) |
Jul
(9) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
|
From: Cress, A. R <and...@in...> - 2003-03-10 14:49:33
|
Again, this is from bad FRU/SDR information put into the system. However, I will add some bounds checking to make sure the value doesn't go beyond the buffer. Andy -----Original Message----- From: Guo, Min Sent: Monday, March 10, 2003 1:37 AM To: Cress, Andrew R Cc: pan...@li... Subject: Segment fault happened when run fruconfig. Hi Here I encounter one issue when run fruconfig on langley. Can you tell me whether it is a bug of fruconfig? We can get the fru header, but can not access the corresponding board information address. Thanks Guo Min ---------------------------------------------------------------------------- ------------------------------------------------- ./fruconfig fruconfig: version 1.1 -- BMC version 0.48, IPMI version 1.5 Mainboard FRU Size : 256 Segmentation fault ./fruconfig -x fruconfig: version 1.1 -- BMC version 0.48, IPMI version 1.5 ipmi_cmd_ia: request (len=13): 10 20 00 0a 00 d0 fc ff bf 01 00 00 00 req.data=0xbffffcd0, dlen=1: 00 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=3): 00 01 00 load_fru: inv ret = 0, cc = 0 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 00 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 10 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 01 04 17 c6 54 53 52 4c 54 32 cb 41 44 4c 41 32 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 20 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 33 30 30 30 34 35 c0 c1 00 00 00 00 00 00 00 97 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 30 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 01 06 00 66 6c 33 c5 49 6e 74 65 6c c4 53 43 42 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 40 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 32 cc 4b 52 43 32 32 32 31 30 31 39 38 31 ca 41 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 50 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 34 36 30 34 34 2d 36 30 39 c0 c0 c1 00 00 00 d5 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 60 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 01 0a 00 c5 49 6e 74 65 6c c7 4c 41 4e 47 4c 45 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 70 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 59 c0 c0 c0 c0 c0 c6 54 53 52 4c 54 32 c1 00 00 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 80 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 90 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 a0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4f ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 b0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 c0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 d0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 e0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 f0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 37 20 00 06 00 d0 fc ff bf 00 00 00 00 req.data=0xbffffcd0, dlen=0: ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=16): cc 45 d0 38 54 72 d6 11 00 80 de b4 d5 47 03 00 system_guid: ret = 0, cc = 0 system guid (16): cc 45 d0 38 54 72 d6 11 00 80 de b4 d5 47 03 00 00 Mainboard FRU Size : 256 FRU Header: e0 e1 e2 e3 e4 e5 e6 e7 FRU Body (size=9088/256): 0000: e0 e1 e2 e3 e4 e5 e6 e7 0008: e8 e9 ea eb ec ed ee ef 0016: 01 04 17 c6 54 53 52 4c 0024: 54 32 cb 41 44 4c 41 32 0032: 33 30 30 30 34 35 c0 c1 0040: 00 00 00 00 00 00 00 97 0048: 01 06 00 66 6c 33 c5 49 0056: 6e 74 65 6c c4 53 43 42 0064: 32 cc 4b 52 43 32 32 32 0072: 31 30 31 39 38 31 ca 41 0080: 34 36 30 34 34 2d 36 30 0088: 39 c0 c0 c1 00 00 00 d5 0096: 01 0a 00 c5 49 6e 74 65 0104: 6c c7 4c 41 4e 47 4c 45 0112: 59 c0 c0 c0 c0 c0 c6 54 0120: 53 52 4c 54 32 c1 00 00 0128: 00 00 00 00 00 00 00 00 0136: 00 00 00 00 00 00 00 00 0144: 00 00 00 00 00 00 00 00 0152: 00 00 00 00 00 00 00 00 0160: 00 00 00 00 00 00 00 00 0168: 00 00 00 00 00 00 00 4f 0176: ff ff ff ff ff ff ff ff 0184: ff ff ff ff ff ff ff ff 0192: ff ff ff ff ff ff ff ff 0200: ff ff ff ff ff ff ff ff 0208: ff ff ff ff ff ff ff ff 0216: ff ff ff ff ff ff ff ff 0224: ff ff ff ff ff ff ff ff 0232: ff ff ff ff ff ff ff ff 0240: ff ff ff ff ff ff ff ff 0248: ff ff ff ff ff ff ff ff Segmentation fault ---------------------------------------------------------------------------- --------------- When I check the source , I found the error happens in the following code. Show_fru() /* show board fields */ pfru = &frubuf[(frubuf[3] * 8)]; //here frubuf[3] is 227 '?', and address fru[1816] can not be acessed. lang = pfru[2]; pfru += 6; /* skip board header */ ---------------------------------------------------------------------------- --------------------------------------- |
|
From: Cress, A. R <and...@in...> - 2003-03-10 14:46:05
|
Guo Min,
I'll change sensor to check for bogus values, so that it won't seg fault,
but that length
is clearly illegal for sensor type 0x01 (full). It appears that it should
be an OEM type record.
You probably got bogus values in your SDRs from the wrong FRU/SDR diskette.
Andy
-----Original Message-----
From: Guo, Min [mailto:mi...@in...]
Sent: Monday, March 10, 2003 12:13 AM
To: pan...@li...
Subject: [Panicsel-developers] Segment fault happened when run Sensor on
langley.
> Hi, when I run the sensor on Langley.
> Kernel 2.4.18 MV build
> --------------------------------------------------------------------------
> -------------------------------------------------
> sensor: version 1.6
> SDR Full 01 01 3a sensor: 20 10 Baseboard 1.25V = 7f OK 1.24 Volts
> SDR Full 02 01 39 sensor: 20 11 Baseboard 2.5V = 7e OK 2.47 Volts
> SDR Full 03 01 39 sensor: 20 12 Baseboard 3.3V = c0 OK 3.30 Volts
> SDR Full 04 01 3b sensor: 20 13 Baseboard 3.3VSB = d8 OK 3.26 Volts
> SDR Full 05 01 39 sensor: 20 14 Baseboard 5.0V = bf OK 4.97 Volts
> SDR Full 06 01 38 sensor: 20 15 Baseboard 12V = c1 OK 11.97 Volts
> SDR Full 07 01 39 sensor: 20 16 Baseboard -12V = 37 OK -12.04 Volts
> SDR Full 08 01 39 sensor: 20 17 Baseboard VBAT = ca OK 3.15 Volts
> SDR Full 09 01 38 sensor: 20 b8 Processor VRM = 7c OK 1.46 Volts
> SDR Full 0a 01 39 sensor: 20 30 Baseboard Temp = 1d OK 29.00 degrees C
> SDR Full 0b 01 3b sensor: 20 33 Basebrd FanBoost = 1d OK 29.00 degrees C
> SDR Full 0c 01 3a sensor: 20 98 Processor1 Temp = 24 OK 36.00 degrees C
> SDR Full 0d 01 39 sensor: 20 a0 Proc1 FanBoost = 24 OK 36.00 degrees C
> SDR Full 0e 01 3a sensor: 20 99 Processor2 Temp = 25 OK 37.00 degrees C
> SDR Full 0f 01 39 sensor: 20 a1 Proc2 FanBoost = 25 OK 37.00 degrees C
> SDR Full 10 01 38 sensor: 20 76 PwrDstBd Temp = 1d OK 29.00 degrees C
> SDR Full 11 01 37 sensor: 20 77 PDB FanBoost = 1d OK 29.00 degrees C
> SDR Full 12 01 38 sensor: 20 73 PwrDstBrd Fan = f1 OK 14460.00 RPM
> SDR Full 13 01 3b sensor: 20 40 80mm Sys Fan (R) = 59 OK 3827.00 RPM
> SDR Full 14 01 3b sensor: 20 42 80mm Sys Fan (L) = 57 OK 3741.00 RPM
> SDR Full 15 01 3b sensor: 20 44 40mm Sys Fan (R) = 94 OK 6512.00 RPM
> SDR Full 16 01 3b sensor: 20 45 40mm Sys Fan (L) = db OK 9636.00 RPM
> SDR Comp 17 02 25 sensor: 20 01 Power Unit = 00 c0 00 00 OK
> SDR Comp 18 02 27 sensor: 20 03 BMC Watchdog = 00 c0 00 00 OK
> SDR Comp 19 02 2a sensor: 20 04 Scrty Violation = 00 c0 00 00 OK
> SDR Comp 1a 02 29 sensor: 20 05 Physical Scrty = 00 e0 00 00 OK
> SDR Comp 1b 02 25 sensor: 20 06 POST Error = 00 c0 00 00 OK
> SDR Comp 1c 02 27 sensor: 20 07 Critical Int = 00 c0 00 00 OK
> SDR Comp 1d 02 21 sensor: 20 08 Memory = 00 c0 00 00 OK
> SDR Comp 1e 02 2b sensor: 20 09 Logging Disabled = 00 c0 00 00 OK
> SDR Comp 1f 02 29 sensor: 20 71 Power Supply 2 = 00 c0 01 00 Warn-lo
> SDR Comp 20 02 2b sensor: 20 90 Processor 1 Stat = 00 c0 80 00 OK*
> SDR Comp 21 02 2b sensor: 20 91 Processor 2 Stat = 00 c0 80 00 OK*
> SDR Comp 22 02 20 sensor: 20 e0 DIMM1 = 00 c0 04 00 BelowCrit
> SDR Comp 23 02 20 sensor: 20 e1 DIMM2 = 00 c0 00 00 OK
> SDR Comp 24 02 20 sensor: 20 e2 DIMM3 = 00 c0 00 00 OK
> SDR Comp 25 02 20 sensor: 20 e3 DIMM4 = 00 c0 04 00 BelowCrit
> SDR Comp 26 02 20 sensor: 20 e4 DIMM5 = 00 c0 00 00 OK
> SDR Comp 27 02 20 sensor: 20 e5 DIMM6 = 00 c0 00 00 OK
> SDR Comp 28 02 27 sensor: 20 80 Proc Missing = 00 c0 00 00 OK
> SDR Comp 29 02 27 sensor: 20 83 System Event = 00 c0 00 00 OK
> SDR Comp 2a 02 26 sensor: 20 85 SMI Timeout = 00 c0 00 00 OK
> SDR Comp 2b 02 29 sensor: 20 86 Sensor Failure = 00 c0 00 00 OK
> SDR Comp 2c 02 25 sensor: 20 82 ACPI State = 00 c0 01 00 Warn-lo
> SDR Comp 2d 02 21 sensor: 20 84 Button = 00 c0 00 00 OK
> SDR Comp 2e 02 24 sensor: 20 88 SMI State = 00 c0 00 00 OK
> SDR Comp 2f 02 24 sensor: 20 87 NMI State = 00 c0 00 00 OK
> SDR FRU 30 11 17 dev: 02 00 15 01 PwrDstBd FRU
> SDR FRU 31 11 1b dev: 04 00 0a 02 Pwr Supply 2 FRU
> SDR FRU 32 11 15 dev: 05 00 20 01 DIMM 1 SPD
> SDR FRU 33 11 15 dev: 06 00 20 02 DIMM 2 SPD
> SDR FRU 34 11 15 dev: 07 00 20 03 DIMM 3 SPD
> SDR FRU 35 11 15 dev: 08 00 20 04 DIMM 4 SPD
> SDR FRU 36 11 15 dev: 09 00 20 05 DIMM 5 SPD
> SDR FRU 37 11 15 dev: 0a 00 20 06 DIMM 6 SPD
> SDR IPMB 38 12 1b dev: 20 00 07 01 Basbrd Mgmt Ctlr
> SDR IPMB 39 12 1a dev: 28 00 07 01 Chs Bridge Ctlr
> SDR OEM 3a c0 09 manuf=Intel: [02][02][00][02]pq
> SDR OEM 3b c0 07 manuf=Intel: [03]4([fc]
> SDR OEM 3c c0 16 manuf=Intel: SDR Ve=[00]ion 1.00.02
> Segmentation fault
> --------------------------------------------------------------------------
> ----------------------------------
> When I check the source , I found the error happens in the following
> code
> len = sdr[4] + 5; //here the len is 15
> if (fdebug) printf("ShowSDR: len=%d, type=%x\n",len,sdr[3]);
> memset(sens,0,4);
> switch(sdr[3])
> {
> case 0x01: /* Full sensor record */
> sdr01 = (SDR01REC *)sdr;
> ioff = 48;
> ilen = len - ioff; //here ilen is -33
> memcpy(idstr,&sdr[ioff],ilen); //So here segment fault
> happened.
> --------------------------------------------------------------------------
> --------------------------------------------
> On Soultion way.
> + if (ilen <0)
> + return
> --------------------------------------------------------------------------
> ---------------------------------------------
> Best Regards
> Guo Min
> Intel China Software Lab
> iNet: 8-752-1325
> External: 86-21-52574545 Ext. 1325
> Home: (86) 21 - 62088661 (Pacific Standard time + 16 hours)
>
> The content of this email message solely contains my own personal views,
> and not those of my employer.
>
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Panicsel-developers mailing list
Pan...@li...
https://lists.sourceforge.net/lists/listinfo/panicsel-developers
|
|
From: Guo, M. <mi...@in...> - 2003-03-10 09:04:09
|
Hi, Andy
I Checked the alarm test suite into the test subdir.
I had reorganized the source tree in you util sudir. Here is my
changelog, I think it is better to maintain the source code, and
it has resolved the "separate IPMI API calls into a library, rather than a
source/object file" requirement in the TODO list. If you think it is
reasonable,
could you please apply changes to your source.
For your convince will send the whole patch to you.
Thanks
Guo Min
a) move the files
alarms.c fruconfig.c hwreset.c imbapi.c pefconfig.c sensor.c
showsel.c tmconfig.c wdt.c
to a new sub dir in util named apptool
b) move the files
imbapi.c imb_api.h ipmicmd.c ipmicmd.h ipmi_ioctls.h ipmimv.c
to a new sub dir in util named lib
c) move the files
fruconfig.8 hwreset.8 pefconfig.8 sensor.8 showsel.8 tmconfig.8
to a new sub dir in util named man
d) move the file
bmclan.mib
to a new sub dir in util named mib
Rewrite the make files for each sub dir
for Lib)
see Makefile_lib
for apptool)
see Makefile_apptool
for util dir master tool)
see Makefile_util)
for the Master Make file in panicsel dir
Here is the patch for the
--- panicsel/makefile 2003-02-28 06:15:19.000000000 +0800
+++ panicsel_update/makefile 2003-03-10 21:44:05.000000000 +0800
@@ -48,17 +48,17 @@
cp -uf LICENSE $(RTO)
cp -uf UserGuide $(RTO)
cp -uf ChangeLog $(RTO)
- cd util ; cp -uf $(EXELIST) ../$(RTARG)/usr/sbin
- cd util ; cp -uf $(MANLIST) ../$(MTO)
- cd util ; cp -uf $(MIB) ../$(RTO)
+ cd util/apptool ; cp -uf $(EXELIST) ../../$(RTARG)/usr/sbin
+ cd util/man ; cp -uf $(MANLIST) ../../$(MTO)
+ cd util/mib ; cp -uf $(MIB) ../../$(RTO)
# cp -uf test/dopanic $(RTO)
gzip -f $(MTO)/*.8
- rpm -bb --root $(ROOT)/$(RTARG) $(RSPEC)
+ rpmbuild -bb --root $(ROOT)/$(RTARG) $(RSPEC)
# rpm -bb --root $(ROOT)/$(RTARG) --target=x86_pentium3 $(RSPEC)
rm -rf $(RTARG)
srpm: tarball
- rpm -bs $(RSPEC)
+ rpmbuild -bs $(RSPEC)
tarball: $(TARGS)
echo "$(RTARG)/" >$(NOTF)
|
|
From: Guo, M. <mi...@in...> - 2003-03-10 06:39:57
|
Hi Here I encounter one issue when run fruconfig on langley. Can you tell me whether it is a bug of fruconfig? We can get the fru header, but can not access the corresponding board information address. Thanks Guo Min ---------------------------------------------------------------------------- ------------------------------------------------- ./fruconfig fruconfig: version 1.1 -- BMC version 0.48, IPMI version 1.5 Mainboard FRU Size : 256 Segmentation fault ./fruconfig -x fruconfig: version 1.1 -- BMC version 0.48, IPMI version 1.5 ipmi_cmd_ia: request (len=13): 10 20 00 0a 00 d0 fc ff bf 01 00 00 00 req.data=0xbffffcd0, dlen=1: 00 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=3): 00 01 00 load_fru: inv ret = 0, cc = 0 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 00 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 10 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 01 04 17 c6 54 53 52 4c 54 32 cb 41 44 4c 41 32 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 20 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 33 30 30 30 34 35 c0 c1 00 00 00 00 00 00 00 97 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 30 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 01 06 00 66 6c 33 c5 49 6e 74 65 6c c4 53 43 42 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 40 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 32 cc 4b 52 43 32 32 32 31 30 31 39 38 31 ca 41 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 50 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 34 36 30 34 34 2d 36 30 39 c0 c0 c1 00 00 00 d5 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 60 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 01 0a 00 c5 49 6e 74 65 6c c7 4c 41 4e 47 4c 45 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 70 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 59 c0 c0 c0 c0 c0 c6 54 53 52 4c 54 32 c1 00 00 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 80 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 90 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 a0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4f ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 b0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 c0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 d0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 e0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 11 20 00 0a 00 d0 fc ff bf 04 00 00 00 req.data=0xbffffcd0, dlen=4: 00 f0 00 10 ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=17): 10 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ipmi_cmd_ia: request (len=13): 37 20 00 06 00 d0 fc ff bf 00 00 00 00 req.data=0xbffffcd0, dlen=0: ipmi_cmd_ia: sendImbRequest status=0, ccode=0 ipmi_cmd_ia: response (len=16): cc 45 d0 38 54 72 d6 11 00 80 de b4 d5 47 03 00 system_guid: ret = 0, cc = 0 system guid (16): cc 45 d0 38 54 72 d6 11 00 80 de b4 d5 47 03 00 00 Mainboard FRU Size : 256 FRU Header: e0 e1 e2 e3 e4 e5 e6 e7 FRU Body (size=9088/256): 0000: e0 e1 e2 e3 e4 e5 e6 e7 0008: e8 e9 ea eb ec ed ee ef 0016: 01 04 17 c6 54 53 52 4c 0024: 54 32 cb 41 44 4c 41 32 0032: 33 30 30 30 34 35 c0 c1 0040: 00 00 00 00 00 00 00 97 0048: 01 06 00 66 6c 33 c5 49 0056: 6e 74 65 6c c4 53 43 42 0064: 32 cc 4b 52 43 32 32 32 0072: 31 30 31 39 38 31 ca 41 0080: 34 36 30 34 34 2d 36 30 0088: 39 c0 c0 c1 00 00 00 d5 0096: 01 0a 00 c5 49 6e 74 65 0104: 6c c7 4c 41 4e 47 4c 45 0112: 59 c0 c0 c0 c0 c0 c6 54 0120: 53 52 4c 54 32 c1 00 00 0128: 00 00 00 00 00 00 00 00 0136: 00 00 00 00 00 00 00 00 0144: 00 00 00 00 00 00 00 00 0152: 00 00 00 00 00 00 00 00 0160: 00 00 00 00 00 00 00 00 0168: 00 00 00 00 00 00 00 4f 0176: ff ff ff ff ff ff ff ff 0184: ff ff ff ff ff ff ff ff 0192: ff ff ff ff ff ff ff ff 0200: ff ff ff ff ff ff ff ff 0208: ff ff ff ff ff ff ff ff 0216: ff ff ff ff ff ff ff ff 0224: ff ff ff ff ff ff ff ff 0232: ff ff ff ff ff ff ff ff 0240: ff ff ff ff ff ff ff ff 0248: ff ff ff ff ff ff ff ff Segmentation fault ---------------------------------------------------------------------------- --------------- When I check the source , I found the error happens in the following code. Show_fru() /* show board fields */ pfru = &frubuf[(frubuf[3] * 8)]; //here frubuf[3] is 227 '?', and address fru[1816] can not be acessed. lang = pfru[2]; pfru += 6; /* skip board header */ ---------------------------------------------------------------------------- --------------------------------------- |
|
From: Guo, M. <mi...@in...> - 2003-03-10 05:15:52
|
> Hi, when I run the sensor on Langley.
> Kernel 2.4.18 MV build
> --------------------------------------------------------------------------
> -------------------------------------------------
> sensor: version 1.6
> SDR Full 01 01 3a sensor: 20 10 Baseboard 1.25V = 7f OK 1.24 Volts
> SDR Full 02 01 39 sensor: 20 11 Baseboard 2.5V = 7e OK 2.47 Volts
> SDR Full 03 01 39 sensor: 20 12 Baseboard 3.3V = c0 OK 3.30 Volts
> SDR Full 04 01 3b sensor: 20 13 Baseboard 3.3VSB = d8 OK 3.26 Volts
> SDR Full 05 01 39 sensor: 20 14 Baseboard 5.0V = bf OK 4.97 Volts
> SDR Full 06 01 38 sensor: 20 15 Baseboard 12V = c1 OK 11.97 Volts
> SDR Full 07 01 39 sensor: 20 16 Baseboard -12V = 37 OK -12.04 Volts
> SDR Full 08 01 39 sensor: 20 17 Baseboard VBAT = ca OK 3.15 Volts
> SDR Full 09 01 38 sensor: 20 b8 Processor VRM = 7c OK 1.46 Volts
> SDR Full 0a 01 39 sensor: 20 30 Baseboard Temp = 1d OK 29.00 degrees C
> SDR Full 0b 01 3b sensor: 20 33 Basebrd FanBoost = 1d OK 29.00 degrees C
> SDR Full 0c 01 3a sensor: 20 98 Processor1 Temp = 24 OK 36.00 degrees C
> SDR Full 0d 01 39 sensor: 20 a0 Proc1 FanBoost = 24 OK 36.00 degrees C
> SDR Full 0e 01 3a sensor: 20 99 Processor2 Temp = 25 OK 37.00 degrees C
> SDR Full 0f 01 39 sensor: 20 a1 Proc2 FanBoost = 25 OK 37.00 degrees C
> SDR Full 10 01 38 sensor: 20 76 PwrDstBd Temp = 1d OK 29.00 degrees C
> SDR Full 11 01 37 sensor: 20 77 PDB FanBoost = 1d OK 29.00 degrees C
> SDR Full 12 01 38 sensor: 20 73 PwrDstBrd Fan = f1 OK 14460.00 RPM
> SDR Full 13 01 3b sensor: 20 40 80mm Sys Fan (R) = 59 OK 3827.00 RPM
> SDR Full 14 01 3b sensor: 20 42 80mm Sys Fan (L) = 57 OK 3741.00 RPM
> SDR Full 15 01 3b sensor: 20 44 40mm Sys Fan (R) = 94 OK 6512.00 RPM
> SDR Full 16 01 3b sensor: 20 45 40mm Sys Fan (L) = db OK 9636.00 RPM
> SDR Comp 17 02 25 sensor: 20 01 Power Unit = 00 c0 00 00 OK
> SDR Comp 18 02 27 sensor: 20 03 BMC Watchdog = 00 c0 00 00 OK
> SDR Comp 19 02 2a sensor: 20 04 Scrty Violation = 00 c0 00 00 OK
> SDR Comp 1a 02 29 sensor: 20 05 Physical Scrty = 00 e0 00 00 OK
> SDR Comp 1b 02 25 sensor: 20 06 POST Error = 00 c0 00 00 OK
> SDR Comp 1c 02 27 sensor: 20 07 Critical Int = 00 c0 00 00 OK
> SDR Comp 1d 02 21 sensor: 20 08 Memory = 00 c0 00 00 OK
> SDR Comp 1e 02 2b sensor: 20 09 Logging Disabled = 00 c0 00 00 OK
> SDR Comp 1f 02 29 sensor: 20 71 Power Supply 2 = 00 c0 01 00 Warn-lo
> SDR Comp 20 02 2b sensor: 20 90 Processor 1 Stat = 00 c0 80 00 OK*
> SDR Comp 21 02 2b sensor: 20 91 Processor 2 Stat = 00 c0 80 00 OK*
> SDR Comp 22 02 20 sensor: 20 e0 DIMM1 = 00 c0 04 00 BelowCrit
> SDR Comp 23 02 20 sensor: 20 e1 DIMM2 = 00 c0 00 00 OK
> SDR Comp 24 02 20 sensor: 20 e2 DIMM3 = 00 c0 00 00 OK
> SDR Comp 25 02 20 sensor: 20 e3 DIMM4 = 00 c0 04 00 BelowCrit
> SDR Comp 26 02 20 sensor: 20 e4 DIMM5 = 00 c0 00 00 OK
> SDR Comp 27 02 20 sensor: 20 e5 DIMM6 = 00 c0 00 00 OK
> SDR Comp 28 02 27 sensor: 20 80 Proc Missing = 00 c0 00 00 OK
> SDR Comp 29 02 27 sensor: 20 83 System Event = 00 c0 00 00 OK
> SDR Comp 2a 02 26 sensor: 20 85 SMI Timeout = 00 c0 00 00 OK
> SDR Comp 2b 02 29 sensor: 20 86 Sensor Failure = 00 c0 00 00 OK
> SDR Comp 2c 02 25 sensor: 20 82 ACPI State = 00 c0 01 00 Warn-lo
> SDR Comp 2d 02 21 sensor: 20 84 Button = 00 c0 00 00 OK
> SDR Comp 2e 02 24 sensor: 20 88 SMI State = 00 c0 00 00 OK
> SDR Comp 2f 02 24 sensor: 20 87 NMI State = 00 c0 00 00 OK
> SDR FRU 30 11 17 dev: 02 00 15 01 PwrDstBd FRU
> SDR FRU 31 11 1b dev: 04 00 0a 02 Pwr Supply 2 FRU
> SDR FRU 32 11 15 dev: 05 00 20 01 DIMM 1 SPD
> SDR FRU 33 11 15 dev: 06 00 20 02 DIMM 2 SPD
> SDR FRU 34 11 15 dev: 07 00 20 03 DIMM 3 SPD
> SDR FRU 35 11 15 dev: 08 00 20 04 DIMM 4 SPD
> SDR FRU 36 11 15 dev: 09 00 20 05 DIMM 5 SPD
> SDR FRU 37 11 15 dev: 0a 00 20 06 DIMM 6 SPD
> SDR IPMB 38 12 1b dev: 20 00 07 01 Basbrd Mgmt Ctlr
> SDR IPMB 39 12 1a dev: 28 00 07 01 Chs Bridge Ctlr
> SDR OEM 3a c0 09 manuf=Intel: [02][02][00][02]pq
> SDR OEM 3b c0 07 manuf=Intel: [03]4([fc]
> SDR OEM 3c c0 16 manuf=Intel: SDR Ve=[00]ion 1.00.02
> Segmentation fault
> --------------------------------------------------------------------------
> ----------------------------------
> When I check the source , I found the error happens in the following
> code
> len = sdr[4] + 5; //here the len is 15
> if (fdebug) printf("ShowSDR: len=%d, type=%x\n",len,sdr[3]);
> memset(sens,0,4);
> switch(sdr[3])
> {
> case 0x01: /* Full sensor record */
> sdr01 = (SDR01REC *)sdr;
> ioff = 48;
> ilen = len - ioff; //here ilen is -33
> memcpy(idstr,&sdr[ioff],ilen); //So here segment fault
> happened.
> --------------------------------------------------------------------------
> --------------------------------------------
> On Soultion way.
> + if (ilen <0)
> + return
> --------------------------------------------------------------------------
> ---------------------------------------------
> Best Regards
> Guo Min
> Intel China Software Lab
> iNet: 8-752-1325
> External: 86-21-52574545 Ext. 1325
> Home: (86) 21 - 62088661 (Pacific Standard time + 16 hours)
>
> The content of this email message solely contains my own personal views,
> and not those of my employer.
>
|
|
From: Guo, M. <mi...@in...> - 2003-03-10 01:59:29
|
Hi Platform Cossbay, Redhat 8.0. RPM version 4.1 When I run the make ,the system outputs rpm -bs panicsel.spec -bs: unknown option make: *** [srpm] Error 1 So change the rpm to rpmbuild, we can compile the source successfully. Thanks Guo Min |
|
From: Guo, M. <mi...@in...> - 2003-03-07 03:39:35
|
Hi
I upgrade the bmcpanic.c patch to 2.5.62,and it can work on my
Langley machine.
Thanks
Guo Min
The content of this email message solely contains my own personal views,
and not those of my employer.
----------------------------------------------------------------------------
-------------------------------------------------------------------
diff -Naru linux-2.5.62/arch/i386/kernel/reboot.c
linux-2.5.62+panicsel/arch/i386/kernel/reboot.c
--- linux-2.5.62/arch/i386/kernel/reboot.c 2003-03-07
16:33:50.000000000 +0800
+++ linux-2.5.62+panicsel/arch/i386/kernel/reboot.c 2003-03-06 22:27:16.
000000000 +0800
@@ -221,6 +221,10 @@
: "i" ((void *) (0x1000 - sizeof
(real_mode_switch) - 100)));
}
+#ifdef CONFIG_IPMI_PANIC_ACTION
+extern void ipmi_reset(int mode);
+#endif
+
void machine_restart(char * __unused)
{
#if CONFIG_SMP
@@ -277,6 +281,9 @@
}
}
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ ipmi_reset(1);
+#endif
machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
}
@@ -288,5 +295,8 @@
{
if (pm_power_off)
pm_power_off();
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ ipmi_reset(0);
+#endif
}
diff -Naru linux-2.5.62/Documentation/IPMI.txt
linux-2.5.62+panicsel/Documentation/IPMI.txt
--- linux-2.5.62/Documentation/IPMI.txt 2003-03-07 16:33:37.000000000 +0800
+++ linux-2.5.62+panicsel/Documentation/IPMI.txt 2003-03-06 22:26:54.
000000000 +0800
@@ -5,6 +5,18 @@
<mi...@mv...>
<mi...@ac...>
+The Intelligent Platform Management Interface, or IPMI, is a
+standard for controlling intelligent devices that monitor a system.
+It provides for dynamic discovery of sensors in the system and the
+ability to monitor the sensors and be informed when the sensor's
+values change or go outside certain boundaries. It also has a
+standardized database for field-replacable units (FRUs) and a watchdog
+timer.
+
+To use this, you need an interface to an IPMI controller in your
+system (called a Baseboard Management Controller, or BMC) and
+management software that can use the IPMI system.
+
This document describes how to use the IPMI driver for Linux. If you
are not familiar with IPMI itself, see the web site at
http://www.intel.com/design/servers/ipmi/index.htm. IPMI is a big
diff -Naru linux-2.5.62/drivers/char/ipmi/ipmi_msghandler.c
linux-2.5.62+panicsel/drivers/char/ipmi/ipmi_msghandler.c
--- linux-2.5.62/drivers/char/ipmi/ipmi_msghandler.c 2003-03-07 16:34:18.
000000000 +0800
+++ linux-2.5.62+panicsel/drivers/char/ipmi/ipmi_msghandler.c 2003-03-06
22:27:16.000000000 +0800
@@ -45,6 +45,14 @@
#include <linux/notifier.h>
#include <linux/init.h>
+#ifdef CONFIG_IPMI_PANIC_ACTION
+#define uchar unsigned char
+extern int ipmi_panic_init(void);
+extern int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun,
+ uchar *sbuf, int slen, uchar *rbuf, int rlen,
+ int *nret, uchar *cc);
+#endif
+
struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
static int ipmi_init_msghandler(void);
@@ -345,7 +353,7 @@
unsigned int i;
for (i=intf->curr_seq;
- i!=(intf->curr_seq-1);
+ (i+1)%IPMI_IPMB_NUM_SEQ != intf->curr_seq;
i=(i+1)%IPMI_IPMB_NUM_SEQ)
{
if (! intf->seq_table[i].inuse)
@@ -437,6 +445,7 @@
return rv;
}
+static int fIPMIok = 0; /* true if an IPMI interface is valid */
int ipmi_create_user(unsigned int if_num,
struct ipmi_user_hndl *handler,
@@ -480,6 +489,7 @@
goto out_unlock;
}
+ fIPMIok = 1; /* at least one IPMI interface is valid */
new_user->handler = handler;
new_user->handler_data = handler_data;
new_user->intf = ipmi_interfaces[if_num];
@@ -906,8 +916,6 @@
probably, so abort. */
spin_unlock_irqrestore(&(intf->seq_lock),
flags);
- ipmi_free_recv_msg(recv_msg);
- ipmi_free_smi_msg(smi_msg);
goto out_err;
}
@@ -1794,8 +1802,13 @@
return rv;
}
+extern void machine_restart(char * __unused);
+extern void machine_power_off(void);
+extern char *panic_string;
+
#ifdef CONFIG_IPMI_PANIC_EVENT
+#ifndef CONFIG_IPMI_PANIC_ACTION
static void dummy_smi_done_handler(struct ipmi_smi_msg *msg)
{
}
@@ -1828,12 +1841,9 @@
data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */
data[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */
- /* These used to have the first three bytes of the panic string,
- but not only is that not terribly useful, it's not available
- any more. */
- data[3] = 0;
- data[6] = 0;
- data[7] = 0;
+ data[3] = panic_string[0];
+ data[6] = panic_string[1];
+ data[7] = panic_string[2];
smi_msg.done = dummy_smi_done_handler;
recv_msg.done = dummy_recv_done_handler;
@@ -1857,6 +1867,30 @@
intf->my_lun);
}
}
+#endif
+
+void ipmi_reset(int mode)
+{
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ unsigned char imode;
+ unsigned char cc;
+ int rc, i;
+
+ /* Input mode param: 0 = soft reset, 1 = power down, 2 = power cycle */
+ if (!fIPMIok || mode == 0 || mode > 3) {
+ machine_restart(NULL); /* normal Linux reset (arch/i386/) */
+ return;
+ }
+ /*
+ * IPMI Chassis Reset modes:
+ * 0 = power down, 1 = power up, 2 = power cycle, 3 = hard reset
+ */
+ if (mode == 1) imode = 0;
+ else imode = mode;
+ rc = ipmi_send_recv(0x02,0x00,0,&imode,1,NULL,0,&i,&cc);
+#endif
+ return;
+}
#endif /* CONFIG_IPMI_PANIC_EVENT */
static int has_paniced = 0;
@@ -1875,14 +1909,55 @@
/* For every registered interface, set it to run to completion. */
for (i=0; i<MAX_IPMI_INTERFACES; i++) {
intf = ipmi_interfaces[i];
- if (intf == NULL)
- continue;
-
+ if (intf == NULL) continue;
intf->handlers->set_run_to_completion(intf->send_info, 1);
}
#ifdef CONFIG_IPMI_PANIC_EVENT
- send_panic_events();
+ if (fIPMIok) {
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ unsigned char alarms, cc;
+ unsigned char obuf[16];
+ unsigned char ibuf[16];
+ int olen, rc;
+
+ /* Get Alarm LED values */
+ obuf[0] = 0x03; // PRIVATE_BUS_ID;
+ obuf[1] = 0x41; // ALARMS_PANEL_READ;
+ obuf[2] = 1; // one byte of alarms data
+ obuf[3] = 0; // initial alarms value
+ olen = 3;
+ rc = ipmi_send_recv(0x52,0x06,0,obuf,olen,ibuf,4,&i,&cc);
+ alarms = ibuf[0];
+ printk("ipmi_panic: get alarms rc=%d cc=%x, alarms=%02x\n",
+ rc,cc,alarms);
+ if (alarms == 0) alarms = 0x0F; /* 0=err, fallback to
default */
+ if (rc == 0) { // valid, so ok to set alarm LED
+ /* Set Crit Alarm LED */
+ obuf[0] = 0x03; // PRIVATE_BUS_ID;
+ obuf[1] = 0x40; // ALARMS_PANEL_WRITE;
+ obuf[2] = 1; // one byte of alarms data
+ obuf[3] = (alarms & 0x0D) | 0xF0; // turn on critical
alarm
+ olen = 4;
+ rc = ipmi_send_recv(0x52,0x06,0,obuf,olen,NULL,0,&i,&cc);
+ printk("ipmi_panic: set crit alarm rc=%d cc=%x\n",rc,cc);
+ }
+ /* Log the OS Critical Stop to the SEL (BMC firmware log).
*/
+ obuf[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */
+ obuf[1] = 0x03; /* This is for IPMI 1.0. */
+ obuf[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */
+ obuf[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */
+ obuf[5] = 0xa1; /* Runtime stop OEM bytes 2 & 3. */
+ obuf[3] = panic_string[0];
+ obuf[6] = panic_string[1];
+ obuf[7] = panic_string[2];
+ olen = 8;
+ rc = ipmi_send_recv(0x02,0x04,0,obuf,olen,NULL,0,&i,&cc);
+ printk("ipmi_panic: log OS Critical Stop rc=%d
cc=%x\n",rc,cc);
+#else
+ send_panic_events();
+#endif
+ }
#endif
return NOTIFY_DONE;
@@ -1914,6 +1989,9 @@
notifier_chain_register(&panic_notifier_list, &panic_block);
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ ipmi_panic_init();
+#endif
initialized = 1;
printk(KERN_INFO "ipmi: message handler initialized\n");
@@ -1971,3 +2049,6 @@
EXPORT_SYMBOL(ipmi_get_my_address);
EXPORT_SYMBOL(ipmi_set_my_LUN);
EXPORT_SYMBOL(ipmi_get_my_LUN);
+#ifdef CONFIG_IPMI_PANIC_ACTION
+EXPORT_SYMBOL(ipmi_reset);
+#endif
diff -Naru linux-2.5.62/drivers/char/ipmi/ipmi_panic.c
linux-2.5.62+panicsel/drivers/char/ipmi/ipmi_panic.c
--- linux-2.5.62/drivers/char/ipmi/ipmi_panic.c 1970-01-01
08:00:00.000000000 +0800
+++ linux-2.5.62+panicsel/drivers/char/ipmi/ipmi_panic.c 2003-03-06
22:27:16.000000000 +0800
@@ -0,0 +1,515 @@
+/*
+ * ipmi_panic.c
+ *
+ * This code is needed to run a streamlined IPMI KCS command when
+ * the rest of the system may be dead (panic time). It must wait
+ * for completion of the receive function also.
+ * There will be zero or one BMC, with KCS as a minimum and perhaps
+ * other interfaces, so doing KCS to a default BMC LUN is valid here.
+ *
+ * Note that CONFIG_IPMI_HANDLER should be =y (rather than =m) to
+ * ensure that this handler is loaded early enough to cover boot
+ * time panic conditions. CONFIG_IPMI_PANIC_ACTION can only be
+ * defined if CONFIG_IPMI_HANDLER=y.
+ *
+ * Author: Andy Cress <and...@in...>
+ *
+ * Change History:
+ * 01/31/03 Andy Cress - created for kernel 2.5.44 with OpenIPMI
+ *
+ * Copyright 2003 Intel Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/semaphore.h>
+#include <linux/delay.h>
+
+#define uchar unsigned char
+
+#define KCS_READY_DELAY 5
+#define BMC_RESPONSE_DELAY 5
+#define BMC_RETRY_DELAY 60
+
+#if defined(__ia64__)
+#define KCS_BASE 0x8a2
+#else
+#define KCS_BASE 0xca2
+#endif
+#define KCS_STATUS_REG (KCS_BASE + 1)
+#define KCS_COMMAND_REG (KCS_BASE + 1)
+#define KCS_DATAIN_REG (KCS_BASE + 0)
+#define KCS_DATAOUT_REG (KCS_BASE + 0)
+
+/* State bits based on S1 & S0 below */
+#define KCS_STATE_MASK 0xC0
+#define KCS_IDLE_STATE 0x00
+#define KCS_READ_STATE 0x40
+#define KCS_WRITE_STATE 0x80
+#define KCS_ERROR_STATE 0xC0
+
+#define KCS_IBF 0x02
+#define KCS_OBF 0x01
+#define KCS_SMS_ATN 0x04
+
+#define SEND_INIT 1
+#define SEND_START 2
+#define SEND_NEXT 3
+#define SEND_END 4
+#define RECV_START 5
+#define RECV_INIT 6
+#define RECV_NEXT 7
+#define RECV_INIT2 8
+#define RECV_END 9
+#define END 10
+#define ERROR 0
+
+/* SMS Transfer Stream Control Codes */
+#define GET_STATUS_ABORT 0x60
+#define WRITE_START 0x61
+#define WRITE_END 0x62
+#define KCS_READ 0x68
+
+#define MAX_INVALID_RESPONSE_COUNT 2
+#define MIN_BMC_RESPONSE_SIZE 3
+#define MAX_IMB_PACKET_SIZE 33
+#define MAX_BMC_RESPONSE_SIZE (MIN_BMC_RESPONSE_SIZE + MAX_IMB_PACKET_SIZE)
+#define MAX_XFER_LENGTH (MAX_IMB_PACKET_SIZE * 2)
+
+#define MAX_BUFFER_SIZE 64
+
+typedef struct bmc_response
+ {
+ unsigned char lun :2;
+ unsigned char netfn :6;
+ unsigned char cmd;
+ unsigned char cc;
+ unsigned char data[1];
+ }BMC_RESPONSE;
+
+typedef struct bmc_request
+ {
+ unsigned char lun :2;
+ unsigned char netfn :6;
+ unsigned char cmd;
+ unsigned char data[1];
+ }BMC_REQUEST;
+
+/* GET_DEVICE_ID RESPONSE (11 bytes) */
+typedef struct device_id_response
+ {
+ unsigned char device_id;
+
+ unsigned char device_revision :4;
+ unsigned char reserved :3;
+ unsigned char provides_sdr :1;
+
+ unsigned char major_firmware_revision :7;
+ #define NORMAL_OPERATION 0
+ #define DEVICE_BUSY 1
+ unsigned char device_available :1;
+
+ unsigned char minor_firmware_revision;
+ unsigned char ipmi_version_major :4;
+ unsigned char ipmi_version_minor :4;
+
+ unsigned char supports_sensor_device :1;
+ unsigned char supports_sdr_device :1;
+ unsigned char supports_sel_device :1;
+ unsigned char supports_fru_device :1;
+ unsigned char supports_ipmb_receiver :1;
+ unsigned char supports_ipmb_generator :1;
+ unsigned char supports_bridge :1;
+ unsigned char supports_chassis_device :1;
+
+ unsigned char manufacturer_id1;
+ unsigned char manufacturer_id2;
+ unsigned char manufacturer_id3;
+ unsigned short product_id;
+ } DEVICE_ID_RESPONSE;
+
+/*************************************/
+
+#if defined(__ia64__)
+static char kcs_new = 1;
+#else
+static char kcs_new = 0;
+#endif
+DECLARE_MUTEX(kcs_sem);
+
+/*************************************/
+
+/*
+ * kcs chip mashing stuff
+ */
+static int wait_while_ibf(void)
+{
+ unsigned char status_byte;
+
+ status_byte = inb_p(KCS_STATUS_REG);
+ if ((status_byte & KCS_IBF) == 0) return (0);
+ mdelay(KCS_READY_DELAY);
+ status_byte = inb_p(KCS_STATUS_REG);
+ if (status_byte & KCS_IBF) return (-1);
+ return (0);
+}
+
+static int is_obf_set(void)
+{
+ unsigned char cs;
+ cs = inb_p(KCS_STATUS_REG);
+ return ((cs & KCS_OBF) == KCS_OBF);
+}
+
+static int wait_until_obf(void)
+{
+ int retries = 0;
+
+ while (retries < 2) {
+ if (is_obf_set()) return (0);
+ mdelay(KCS_READY_DELAY);
+ retries++;
+ }
+ return (-ETIMEDOUT);
+}
+
+static unsigned char get_kcs_state(void)
+{
+ unsigned char cs;
+
+ cs = inb_p(KCS_STATUS_REG);
+ return (cs & KCS_STATE_MASK);
+}
+
+static unsigned char read_kcs_data(void)
+{
+ unsigned char data;
+
+ data = inb_p(KCS_DATAOUT_REG);
+ return (data);
+}
+
+static void write_kcs_data(unsigned char data)
+{
+ outb_p(data, KCS_DATAIN_REG);
+}
+
+static void write_kcs_cmd(unsigned char cmd)
+{
+ outb_p(cmd, KCS_COMMAND_REG);
+}
+
+static int clear_obf(void)
+{
+ read_kcs_data();
+ return (0);
+}
+
+static int kcs_xfer(BMC_REQUEST * request, int request_len,
+ BMC_RESPONSE * response, int *response_len)
+{
+ unsigned char *xmit_buffer, *recv_buffer;
+ int i = 0, rc = 0, state = SEND_INIT, bad = 0;
+
+ xmit_buffer = (unsigned char *) request;
+ recv_buffer = (unsigned char *) response;
+
+ while (1) {
+ if (state == END)
+ break;
+ else if (bad > 2) {
+ printk("[ipmi_panic] Maximum retries exceeded.\n");
+ rc = -EIO;
+ break;
+ }
+ switch (state) {
+ case SEND_INIT:
+ {
+ i = 0;
+ state = SEND_START;
+ wait_while_ibf();
+ if (kcs_new) clear_obf();
+ }
+ case SEND_START:
+ {
+ state = SEND_NEXT;
+ write_kcs_cmd(WRITE_START);
+ wait_while_ibf();
+ }
+ case SEND_NEXT:
+ {
+ if (i == (request_len - 1)) {
+ state = SEND_END;
+ break;
+ }
+ if (get_kcs_state() != KCS_WRITE_STATE) {
+ state = ERROR;
+ break;
+ }
+ write_kcs_data(xmit_buffer[i++]);
+ wait_while_ibf();
+ if (kcs_new) clear_obf();
+ break;
+ }
+ case SEND_END:
+ {
+ if (!kcs_new) wait_while_ibf();
+ write_kcs_cmd(WRITE_END);
+ wait_while_ibf();
+ if (get_kcs_state() != KCS_WRITE_STATE) {
+ state = ERROR;
+ break;
+ }
+ if (kcs_new) clear_obf();
+ write_kcs_data(xmit_buffer[i++]);
+ wait_while_ibf();
+ state = RECV_START;
+ }
+ case RECV_START:
+ {
+ switch (get_kcs_state()) {
+ case KCS_ERROR_STATE:
+ {
+ state = ERROR;
+ break;
+ }
+ case KCS_WRITE_STATE:
+ case KCS_IDLE_STATE:
+ {
+ mdelay(BMC_RESPONSE_DELAY);
+ break;
+ }
+ case KCS_READ_STATE:
+ {
+ i = 0;
+ memset(recv_buffer, 0,
+ *response_len);
+ state = RECV_INIT;
+ break;
+ }
+ }
+ break;
+ }
+ case RECV_INIT:
+ {
+ switch (get_kcs_state()) {
+ case KCS_ERROR_STATE:
+ case KCS_WRITE_STATE:
+ {
+ state = ERROR;
+ break;
+ }
+ case KCS_IDLE_STATE:
+ {
+ state = RECV_END;
+ break;
+ }
+ case KCS_READ_STATE:
+ {
+ if (is_obf_set())
+ state = RECV_NEXT;
+ else mdelay(1);
+ break;
+ }
+ default:
+ {
+ mdelay(1);
+ break;
+ }
+ }
+ break;
+ }
+ case RECV_NEXT:
+ {
+ if (i >= *response_len) {
+ rc = -EOVERFLOW;
+ state = ERROR;
+ break;
+ }
+ recv_buffer[i++] = read_kcs_data();
+ if (!kcs_new) wait_while_ibf();
+ write_kcs_data(KCS_READ);
+ if (kcs_new) wait_while_ibf();
+ state = RECV_INIT2;
+ break;
+ }
+ case RECV_INIT2:
+ {
+ switch (get_kcs_state()) {
+ case KCS_ERROR_STATE:
+ case KCS_WRITE_STATE:
+ {
+ state = ERROR;
+ break;
+ }
+ case KCS_IDLE_STATE:
+ {
+ if (kcs_new) {
+ if (wait_until_obf() ==
0) {
+ clear_obf();
+ state = RECV_END;
+ } else {
+ state = ERROR;
+ }
+ } else {
+ state = RECV_END;
+ }
+ break;
+ }
+ case KCS_READ_STATE:
+ {
+ if (kcs_new) {
+ if (wait_until_obf() ==
0)
+ state = RECV_NEXT;
+ else state = ERROR;
+ } else {
+ if (is_obf_set())
+ state = RECV_NEXT;
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case RECV_END:
+ {
+ if ((i < MIN_BMC_RESPONSE_SIZE) ||
+ (response->netfn != (request->netfn |
0x01))
+ || (response->cmd != request->cmd)) {
+ if (request->cmd == 0x01 &&
+ request->netfn == 0x06 &&
+ response->netfn == 0x2b) /*ok*/;
+ else { /* flag the error */
+ printk("[ipmi_panic]
Request/Response CMD/NETFN mismatch error\n");
+
+ printk(" i=%d,
RQcmd/RQnetfn=0x%x/0x%x,RScmd/RSnetfn=0x%x/0x%x\n",
+ i, request->cmd,
request->netfn,
+ response->cmd,
response->netfn);
+ mdelay(BMC_RETRY_DELAY);
+ bad++;
+ state = SEND_INIT;
+ break;
+ }
+ }
+
+ *response_len = i;
+ rc = 0;
+ state = END;
+ break;
+ }
+ case ERROR:
+ default:
+ {
+ printk("[ipmi_panic] BMC in bad state.
Retrying transfer\n");
+ mdelay(BMC_RETRY_DELAY);
+ bad++;
+ state = SEND_INIT;
+ break;
+ }
+ }
+ }
+ return (rc);
+}
+
+int ipmi_send_recv(uchar cmd, uchar netfn, uchar lun, uchar *sbuf, int
slen,
+ uchar *rbuf, int rlen, int *nret, uchar *cc)
+{
+ uchar bmc_outbuf[MAX_BUFFER_SIZE];
+ uchar bmc_inbuf[MAX_BUFFER_SIZE];
+ BMC_REQUEST *bmc_req;
+ BMC_RESPONSE *bmc_resp;
+ int bmc_outlen;
+ int bmc_inlen;
+ int rc = 0;
+
+ if (kcs_new == 2) return (-ENXIO);
+
+ memset(bmc_outbuf,0, sizeof(bmc_outbuf));
+ memset(bmc_inbuf,0, sizeof(bmc_inbuf));
+ bmc_req = (BMC_REQUEST *)bmc_outbuf;
+ bmc_resp = (BMC_RESPONSE *)bmc_inbuf;
+ bmc_req->cmd = cmd;
+ bmc_req->netfn = netfn;
+ bmc_req->lun = lun;
+ bmc_outlen = slen + 2;
+ bmc_inlen = sizeof(bmc_inbuf);
+ if (slen > 0) memcpy(bmc_req->data,sbuf,slen);
+
+ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen);
+ if (bmc_resp->cc == 0xcc) /* flaky NMI fixup */
+ rc = kcs_xfer(bmc_req, bmc_outlen, bmc_resp, &bmc_inlen); /*retry*/
+
+ /* copy the response */
+ *cc = bmc_resp->cc;
+ if (bmc_inlen > rlen) bmc_inlen = rlen;
+ *nret = bmc_inlen;
+ if (bmc_inlen > 0) memcpy(rbuf,bmc_resp->data,bmc_inlen);
+
+ return(rc);
+}
+
+int ipmi_panic_init(void)
+{
+ int i, rc;
+ uchar cc;
+ uchar bdev[16];
+ DEVICE_ID_RESPONSE *dev_id;
+
+ printk("ipmi_panic driver at io 0x%x\n", KCS_BASE);
+ if ((inb_p(KCS_STATUS_REG) == 0xFF) &&
+ (inb_p(KCS_DATAIN_REG) == 0xFF)) {
+ printk("--KCS ISA window not present, exiting.\n");
+ return (-ENXIO);
+ }
+
+ /* Get Device ID */
+ rc = ipmi_send_recv(0x01,0x06,0,NULL,0,bdev,sizeof(bdev),&i,&cc);
+ if (rc != 0) kcs_new = 2; /* bad */
+ else if (cc != 0) kcs_new = 2; /* bad */
+ else
+ {
+ dev_id = (DEVICE_ID_RESPONSE *)&bdev[0];
+ printk("--BMC version %x.%x, IPMI version %d.%d\n",
+ dev_id->major_firmware_revision,
+ dev_id->minor_firmware_revision,
+ dev_id->ipmi_version_major, dev_id->ipmi_version_minor);
+ if ((dev_id->ipmi_version_major == 0) &&
+ (dev_id->ipmi_version_minor == 9)) {
+ printk("--Using legacy KCS state machine\n");
+ kcs_new = 0;
+ } else {
+ printk("--Using new KCS state machine\n");
+ kcs_new = 1;
+ }
+ }
+ /* dont care about chipset vendor, but test Lancewood & IPF to be
sure*/
+
+ return(rc);
+}
+
+/* end ipmi_panic.c */
diff -Naru linux-2.5.62/drivers/char/ipmi/Kconfig
linux-2.5.62+panicsel/drivers/char/ipmi/Kconfig
--- linux-2.5.62/drivers/char/ipmi/Kconfig 2003-03-07
16:34:23.000000000 +0800
+++ linux-2.5.62+panicsel/drivers/char/ipmi/Kconfig 2003-03-06 22:46:58.
000000000 +0800
@@ -7,8 +7,14 @@
tristate 'IPMI top-level message handler'
help
This enables the central IPMI message handler, required for IPMI
- to work. Note that you must have this enabled to do any other IPMI
- things. See IPMI.txt for more details.
+ to work.
+
+ IPMI is a standard for managing sensors (temperature,
+ voltage, etc.) in a system.
+
+ See Documentation/IPMI.txt for more details on the driver.
+
+ If unsure, say N.
config IPMI_PANIC_EVENT
bool 'Generate a panic event to all BMCs on a panic'
@@ -36,5 +42,11 @@
depends on IPMI_HANDLER
help
This enables the IPMI watchdog timer.
+config IPMI_PANIC_ACTION
+ int 'Action after Panic (0=reset,1=power down,2=power cycle)'
+ requires IPMI_HANDLER=y
+ default "0"
+ help
+ Set the Action after Panic
endmenu
diff -Naru linux-2.5.62/drivers/char/ipmi/Makefile
linux-2.5.62+panicsel/drivers/char/ipmi/Makefile
--- linux-2.5.62/drivers/char/ipmi/Makefile 2003-03-07
16:34:54.000000000 +0800
+++ linux-2.5.62+panicsel/drivers/char/ipmi/Makefile 2003-03-06 22:27:16.
000000000 +0800
@@ -4,7 +4,7 @@
ipmi_kcs_drv-objs := ipmi_kcs_sm.o ipmi_kcs_intf.o
-obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o
+obj-$(CONFIG_IPMI_HANDLER) += ipmi_msghandler.o ipmi_panic.o
obj-$(CONFIG_IPMI_DEVICE_INTERFACE) += ipmi_devintf.o
obj-$(CONFIG_IPMI_KCS) += ipmi_kcs_drv.o
obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
diff -Naru linux-2.5.62/drivers/char/Kconfig
linux-2.5.62+panicsel/drivers/char/Kconfig
--- linux-2.5.62/drivers/char/Kconfig 2003-03-07 16:33:38.000000000 +0800
+++ linux-2.5.62+panicsel/drivers/char/Kconfig 2003-03-07
16:22:02.000000000 +0800
@@ -999,5 +999,6 @@
out to lunch past a certain margin. It can reboot the system
or merely print a warning.
+
endmenu
diff -Naru linux-2.5.62/kernel/panic.c linux-2.5.62+panicsel/kernel/panic.c
--- linux-2.5.62/kernel/panic.c 2003-03-07 16:34:58.000000000 +0800
+++ linux-2.5.62+panicsel/kernel/panic.c 2003-03-06
22:27:07.000000000 +0800
@@ -20,6 +20,10 @@
asmlinkage void sys_sync(void); /* it's really int */
int panic_timeout;
+char *panic_string;
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ extern void ipmi_reset(int mode);
+#endif
struct notifier_block *panic_notifier_list;
@@ -53,6 +57,7 @@
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
+ panic_string = buf;
printk(KERN_EMERG "Kernel panic: %s\n",buf);
if (in_interrupt())
printk(KERN_EMERG "In interrupt handler - not syncing\n");
@@ -81,7 +86,11 @@
* choosing not too. It might crash, be corrupt or do
* more harm than good for other reasons.
*/
+#ifdef CONFIG_IPMI_PANIC_ACTION
+ ipmi_reset(CONFIG_IPMI_PANIC_ACTION);
+#else
machine_restart(NULL);
+#endif
}
#ifdef __sparc__
{
diff -Naru linux-2.5.62/scripts/elfconfig.h
linux-2.5.62+panicsel/scripts/elfconfig.h
--- linux-2.5.62/scripts/elfconfig.h 1970-01-01 08:00:00.000000000 +0800
+++ linux-2.5.62+panicsel/scripts/elfconfig.h 2003-03-07
16:05:20.000000000 +0800
@@ -0,0 +1,4 @@
+#define KERNEL_ELFCLASS ELFCLASS32
+#define KERNEL_ELFDATA ELFDATA2LSB
+#define HOST_ELFCLASS ELFCLASS32
+#define HOST_ELFDATA ELFDATA2LSB
------------------------------------------------------
|
|
From: Cress, A. R <and...@in...> - 2003-03-06 17:20:20
|
A new 1.2.9 version of panicsel has been released, and it incorporates much
of the input from this list, such as:
- patches to sensor for floatval & HP netserver 1000
- adding -l option to sensor
- cleanup of unused code in kernel patch(es)
And other stuff too.
Andy
Here is the ChangeLog for it:
02/26/03 ARCress ver 1.2.9
showsel: more descriptive messages if empty, or nearly full.
trimmed output to fit more on one line,
decode panic type bits for OS Critical Stop
bmclan.mib: added OS Critical Stop definition
pefconfig: show/set PEF Control value, etc.
fruconfig: added GetSystemGUID also
sensor: schulz change for float & HP netserver 1000r
guomin change for simpler output with -l
alarms: alarms handling utility added
wdt: watchdog timer utility added
test/watchdogtest: added /dev/watchdog test tool
test/panicsel-k.sh: pattern is "bmc_panic" now.
kern/bmcpanic-2.4.18.patch: reworked for ipmi_send_recv,
added some type bits
kern/bmcpanic-2.4.19.patch: reworked as above
kern/bmcpanic-2.4.20.patch: new
|
|
From: Cress, A. R <and...@in...> - 2003-02-25 22:50:44
|
Guo Min,
I merged this into the source base (now sensor v1.6).
I did make a few adjustments also.
I'll post the results tomorrow.
Thanks,
Andy
-----Original Message-----
From: Guo, Min
Sent: Monday, February 24, 2003 2:09 AM
To: Cress, Andrew R
Cc: 'pan...@li...'
Subject: About panicsel util's output format.
Hi, Andy
I found some outputs of your panicsel tools are hard to understand
because there are few explanation and indicators in the outputs,
I would like to revise the output format and make it more readable, How do
you think about of it?
Here I add the function that can list all the sensors to your
sensor.c file, and I would like to add some more function to your util and
do more contribution,
How about your opinions?
Thanks
Guo Min
----------------------------------------------------------------------------
-------------------------------------
--- sensor_bk.c 2003-02-24 19:30:42.000000000 +0800
+++ sensor.c 2003-02-24 22:20:59.000000000 +0800
@@ -51,6 +51,7 @@
char progname[] = "sensor";
char progver[] = "1.4";
char fdebug = 0;
+int flist = 0;
char tmpstr[20]; /* temp string */
/* sensor_dstatus
@@ -584,6 +585,9 @@
val = decodeValue(sens[0],sdr01);
if (sdr01->sens_base <= NUNITS) j = sdr01->sens_base;
else j = 0;
+ if (flist)
+ printf("Full sensor:%s nums:%02x\n",idstr,sdr01->sens_num);
+ else
printf("SDR Full %02x %02x %02x sensor: %02x %02x %s = %02x %s %.2f
%s\n",
sdr01->recid, sdr01->rectype, sdr01->reclen,
sdr01->sens_ownid, sdr01->sens_num, idstr,
@@ -603,6 +607,9 @@
/* if rc != 0, leave sens values zero */
i = bitnum(sens[2]);
if (fdebug) printf("bitnum = %d\n",i);
+ if (flist)
+ printf("Compact sensor:%s
nums:%02x\n",idstr,sdr02->sens_num);
+ else
printf("SDR Comp %02x %02x %02x sensor: %02x %02x %s = %02x %02x
%02x %02x %s\n",
sdr02->recid, sdr02->rectype, sdr02->reclen,
sdr02->sens_ownid, sdr02->sens_num, idstr,
@@ -610,11 +617,14 @@
break;
case 0x08: /* Entity Association record */
sdr08 = (SDR08REC *)sdr;
+ if (!flist)
+ {
printf("SDR Asso %x %02x %02x %02x %02x %02x: ",
sdr08->recid, sdr08->rectype, sdr08->reclen,
sdr08->contid, sdr08->continst, sdr08->flags);
for (i = 0; i < 8; i++) printf("%02x ",sdr08->edata[i]);
printf("\n");
+ }
break;
case 0x11: /* FRU record */
sdr11 = (SDR11REC *)sdr;
@@ -624,6 +634,9 @@
idstr[ilen] = 0; /* stringify */
if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%d, s0=%x\n",
ilen,idstr[0],sizeof(SDR11REC),sdr[ioff]);
+ if (flist)
+ printf("FRU sensor:%s
chan_num:%02x\n",idstr,sdr11->chan_num);
+ else
printf("SDR FRU %02x %02x %02x dev: %02x %02x %02x %02x %s\n",
sdr11->recid, sdr11->rectype, sdr11->reclen,
sdr11->dev_slave_adr, sdr11->chan_num,
@@ -638,6 +651,9 @@
idstr[ilen] = 0; /* stringify */
if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%d, s0=%x\n",
ilen,idstr[0],sizeof(SDR12REC),sdr[ioff]);
+ if (flist)
+ printf("IPMB sensor:%s
chan_num:%02x\n",idstr,sdr12->chan_num);
+ else
printf("SDR IPMB %02x %02x %02x dev: %02x %02x %02x %02x %s\n",
sdr12->recid, sdr12->rectype, sdr12->reclen,
sdr12->dev_slave_adr, sdr12->chan_num,
@@ -646,14 +662,18 @@
break;
case 0x14: /* BMC Message Channel Info record */
sdr14 = (SDR14REC *)sdr;
+ if(!flist){
printf("SDR BMsg %x %02x %02x: ",
sdr14->recid, sdr14->rectype, sdr14->reclen );
for (i = 0; i < 8; i++) printf("%02x ",sdr14->mdata[i]);
printf("%s %s %02x\n",decode_itype(sdr14->mint),
decode_itype(sdr14->eint), sdr14->rsvd);
+ }
break;
case 0xc0: /* OEM record (#343 = Intel) */
sdrc0 = (SDRc0REC *)sdr;
+ if(!flist)
+ {
mfgid = sdrc0->manuf_id[0] + (sdrc0->manuf_id[1] << 8)
+ (sdrc0->manuf_id[2] << 16);
printf("SDR OEM %02x %02x %02x manuf=",
@@ -666,13 +686,16 @@
else printf("%c",c);
}
printf("\n");
+ }
break;
default:
/* also saw type = 0x08 & 0x14 on STL2s */
+ if (!flist){
printf("SDR (type=0x%02x): ", sdr[3]);
for (i = 0; i < len; i++) printf("%02x ",sdr[i]);
printf("\n");
}
+ }
return;
}
@@ -684,11 +707,12 @@
uchar sdrdata[MAX_BUFFER_SIZE];
int sz, i;
- while ( (c = getopt( argc, argv,"cswx?")) != EOF )
+ while ( (c = getopt( argc, argv,"cswxl?")) != EOF )
switch(c) {
case 'x': fdebug = 1; break;
+ case 'l': flist = 1; break;
default:
- printf("Usage: %s [-x]\n", progname);
+ printf("Usage: %s [-x -l]\n", progname);
exit(1);
}
-------------------------------------------------------------
Best Regards
Guo Min
Intel China Software Lab
iNet: 8-752-1325
External: 86-21-52574545 Ext. 1325
Home: (86) 21 - 62088661 (Pacific Standard time + 16 hours)
The content of this email message solely contains my own personal views,
and not those of my employer.
|
|
From: Cress, A. R <and...@in...> - 2003-02-25 22:48:40
|
Sounds fine. I'll try them out here to verify the changes on several other systems. Andy -----Original Message----- From: Hannes Schulz [mailto:sc...@sc...] Sent: Tuesday, February 25, 2003 12:12 PM To: pan...@li... Subject: [Panicsel-developers] 2 Patches for util/sensor.c Patch 1 corrects the calculation from raw readings to floatval. Patch 2 is somewhat specific to the HP netserver 1000r: the BMC returns additional bytes whan asked for a SDR-reservation and SDR-data. What do you think ? Hannes |
|
From: Hannes S. <sc...@sc...> - 2003-02-25 17:12:29
|
Patch 1 corrects the calculation from raw readings to floatval. Patch 2 is somewhat specific to the HP netserver 1000r: the BMC returns additional bytes whan asked for a SDR-reservation and SDR-data. What do you think ? Hannes |
|
From: Guo, M. <mi...@in...> - 2003-02-24 09:00:47
|
Hi, Andy
I found some outputs of your panicsel tools are hard to understand because there are few explanation and indicators in the outputs,
I would like to revise the output format and make it more readable, How do you think about of it?
Here I add the function that can list all the sensors to your sensor.c file, and I would like to add some more function to your util and do more contribution,
How about your opinions?
Thanks
Guo Min
-----------------------------------------------------------------------------------------------------------------
--- sensor_bk.c 2003-02-24 19:30:42.000000000 +0800
+++ sensor.c 2003-02-24 22:20:59.000000000 +0800
@@ -51,6 +51,7 @@
char progname[] = "sensor";
char progver[] = "1.4";
char fdebug = 0;
+int flist = 0;
char tmpstr[20]; /* temp string */
/* sensor_dstatus
@@ -584,6 +585,9 @@
val = decodeValue(sens[0],sdr01);
if (sdr01->sens_base <= NUNITS) j = sdr01->sens_base;
else j = 0;
+ if (flist)
+ printf("Full sensor:%s nums:%02x\n",idstr,sdr01->sens_num);
+ else
printf("SDR Full %02x %02x %02x sensor: %02x %02x %s = %02x %s %.2f %s\n",
sdr01->recid, sdr01->rectype, sdr01->reclen,
sdr01->sens_ownid, sdr01->sens_num, idstr,
@@ -603,6 +607,9 @@
/* if rc != 0, leave sens values zero */
i = bitnum(sens[2]);
if (fdebug) printf("bitnum = %d\n",i);
+ if (flist)
+ printf("Compact sensor:%s nums:%02x\n",idstr,sdr02->sens_num);
+ else
printf("SDR Comp %02x %02x %02x sensor: %02x %02x %s = %02x %02x %02x %02x %s\n",
sdr02->recid, sdr02->rectype, sdr02->reclen,
sdr02->sens_ownid, sdr02->sens_num, idstr,
@@ -610,11 +617,14 @@
break;
case 0x08: /* Entity Association record */
sdr08 = (SDR08REC *)sdr;
+ if (!flist)
+ {
printf("SDR Asso %x %02x %02x %02x %02x %02x: ",
sdr08->recid, sdr08->rectype, sdr08->reclen,
sdr08->contid, sdr08->continst, sdr08->flags);
for (i = 0; i < 8; i++) printf("%02x ",sdr08->edata[i]);
printf("\n");
+ }
break;
case 0x11: /* FRU record */
sdr11 = (SDR11REC *)sdr;
@@ -624,6 +634,9 @@
idstr[ilen] = 0; /* stringify */
if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%d, s0=%x\n",
ilen,idstr[0],sizeof(SDR11REC),sdr[ioff]);
+ if (flist)
+ printf("FRU sensor:%s chan_num:%02x\n",idstr,sdr11->chan_num);
+ else
printf("SDR FRU %02x %02x %02x dev: %02x %02x %02x %02x %s\n",
sdr11->recid, sdr11->rectype, sdr11->reclen,
sdr11->dev_slave_adr, sdr11->chan_num,
@@ -638,6 +651,9 @@
idstr[ilen] = 0; /* stringify */
if (fdebug) printf("ilen=%d, istr0=%c, sizeof=%d, s0=%x\n",
ilen,idstr[0],sizeof(SDR12REC),sdr[ioff]);
+ if (flist)
+ printf("IPMB sensor:%s chan_num:%02x\n",idstr,sdr12->chan_num);
+ else
printf("SDR IPMB %02x %02x %02x dev: %02x %02x %02x %02x %s\n",
sdr12->recid, sdr12->rectype, sdr12->reclen,
sdr12->dev_slave_adr, sdr12->chan_num,
@@ -646,14 +662,18 @@
break;
case 0x14: /* BMC Message Channel Info record */
sdr14 = (SDR14REC *)sdr;
+ if(!flist){
printf("SDR BMsg %x %02x %02x: ",
sdr14->recid, sdr14->rectype, sdr14->reclen );
for (i = 0; i < 8; i++) printf("%02x ",sdr14->mdata[i]);
printf("%s %s %02x\n",decode_itype(sdr14->mint),
decode_itype(sdr14->eint), sdr14->rsvd);
+ }
break;
case 0xc0: /* OEM record (#343 = Intel) */
sdrc0 = (SDRc0REC *)sdr;
+ if(!flist)
+ {
mfgid = sdrc0->manuf_id[0] + (sdrc0->manuf_id[1] << 8)
+ (sdrc0->manuf_id[2] << 16);
printf("SDR OEM %02x %02x %02x manuf=",
@@ -666,13 +686,16 @@
else printf("%c",c);
}
printf("\n");
+ }
break;
default:
/* also saw type = 0x08 & 0x14 on STL2s */
+ if (!flist){
printf("SDR (type=0x%02x): ", sdr[3]);
for (i = 0; i < len; i++) printf("%02x ",sdr[i]);
printf("\n");
}
+ }
return;
}
@@ -684,11 +707,12 @@
uchar sdrdata[MAX_BUFFER_SIZE];
int sz, i;
- while ( (c = getopt( argc, argv,"cswx?")) != EOF )
+ while ( (c = getopt( argc, argv,"cswxl?")) != EOF )
switch(c) {
case 'x': fdebug = 1; break;
+ case 'l': flist = 1; break;
default:
- printf("Usage: %s [-x]\n", progname);
+ printf("Usage: %s [-x -l]\n", progname);
exit(1);
}
-------------------------------------------------------------
Best Regards
Guo Min
Intel China Software Lab
iNet: 8-752-1325
External: 86-21-52574545 Ext. 1325
Home: (86) 21 - 62088661 (Pacific Standard time + 16 hours)
The content of this email message solely contains my own personal views,
and not those of my employer.
|
|
From: Cress, A. R <and...@in...> - 2003-02-04 22:20:52
|
The new panicsel release 1.2.8 supports the OpenIPMI driver (http://openipmi.sourceforge.net). The bmcpanic kernel patch for 2.5.44 leverages the OpenIPMI driver patch, and the panicsel utilities now also support the /dev/ipmi0 interface, in addition to the /dev/imb and /dev/ipmikcs device interfaces previously supported. See http://panicsel.sourceforge.net for more information. Comments are welcome. Andy Cress |
|
From: Cress, A. R <and...@in...> - 2003-01-29 13:32:31
|
Guo Min.
Exactly. The code needed for panic handler is much smaller when it can
leverage OpenIPMI.
Andy
> -----Original Message-----
> From: Guo, Min
> Sent: Wednesday, January 29, 2003 3:48 AM
> To: Cress, Andrew R
> Cc: pan...@li...
> Subject: RE: How about remove useless functions from BMCPANIC.patch?
>
>
> Hi,Andy
>
> I found OpenIPMI has realized some functions such as insert OS
> critical message to SEL, so how about add
> our features(Get and Set LED when panic happened) to the IPMI?
>
> Thanks
> Guo Min
> --------------------------------------------------------------------------
> --------------------------------------------------------------------------
> ------------------------
> --- linux-2.5.58/drivers/char/ipmi/ipmi_msghandler.c Wed Jan 15 17:43:16
> 2003
> +++ linux-2.5.58-panicsel/drivers/char/ipmi/ipmi_msghandler.c Wed Jan 29
> 01:39:21 2003
> @@ -1857,6 +1857,94 @@
> intf->my_lun);
> }
> }
> +
> +static unsigned char getAlarmLED(void)
> +{
> + struct ipmi_msg msg;
> + unsigned char data[8];
> + unsigned char alarm;
> + struct ipmi_system_interface_addr addr;
> + struct ipmi_smi_msg smi_msg;
> + struct ipmi_recv_msg recv_msg;
> + int rv;
> +
> +
> + /* Fill in an event telling that we have failed. */
> +
> + addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
> + addr.channel = IPMI_BMC_CHANNEL;
> + addr.lun = 0;
> +
> + msg.netfn = 0x06; /* Net function application. */
> + msg.cmd = 0x52; /* write and read. */
> + msg.data = data;
> + msg.data_len = 3;
> +
> + data[0] = 0x03; /* private bus ID */
> + data[1] = 0x41; /* Alarm panel read. */
> + data[2] = 0x01; /* read count */
> + data[3] = 0x00; /* default set to 0 */
> +
> +
> +
> + alarm = 0;
> +
> +
> + rv = ipmi_request_supply_msgs(NULL,
> + (struct ipmi_addr *) &addr,
> + 0,
> + &msg,
> + &smi_msg,
> + &recv_msg,
> + 1);
> +
> + if (rv) {
> + printk(KERN_WARNING "IPMI GetAlarmLED: %d\n", rv);
> + alarm=0;
> + return alarm;
> + }else{
> + alarm=recv_msg.msg.data[3];
> + return alarm;
> + }
> +} /*end getAlarmLED*/
> +
> +static void setAlarmLED(unsigned char alarm)
> +{
> + struct ipmi_msg msg;
> + unsigned char data[8];
> + struct ipmi_system_interface_addr addr;
> + struct ipmi_smi_msg smi_msg;
> + struct ipmi_recv_msg recv_msg;
> + int rv;
> +
> +
> + /* Fill in an event telling that we have failed. */
> +
> + addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
> + addr.channel = IPMI_BMC_CHANNEL;
> + addr.lun = 0;
> +
> + msg.netfn = 0x06; /* Net function application. */
> + msg.cmd = 0x52; /* write and read. */
> + msg.data = data;
> + msg.data_len = 3;
> +
> + data[0] = 0x03; /* private bus ID */
> + data[1] = 0x40; /* Alarm panel read. */
> + data[2] = 0; /* read count */
> + data[3] = ((alarm & 0x0D) | 0xF0); /* set critical LED on */
> +
> +
> + rv = ipmi_request_supply_msgs(NULL,
> + (struct ipmi_addr *) &addr,
> + 0,
> + &msg,
> + &smi_msg,
> + &recv_msg,
> + 1);
> +} /*end setAlarmLED*/
> +
> +
> #endif /* CONFIG_IPMI_PANIC_EVENT */
>
> static int has_paniced = 0;
> @@ -1867,6 +1955,7 @@
> {
> int i;
> ipmi_smi_t intf;
> + unsigned char alarm;
>
> if (has_paniced)
> return NOTIFY_DONE;
> @@ -1883,8 +1972,10 @@
>
> #ifdef CONFIG_IPMI_PANIC_EVENT
> send_panic_events();
> + alarm = getAlarmLED();
> + if (alarm != 0)
> + setAlarmLED(alarm);
> #endif
> -
> return NOTIFY_DONE;
> }
>
> --------------------------------------------------------------------------
> ---------------------------------
>
>
>
> -----Original Message-----
> From: Cress, Andrew R
> Sent: Tuesday, January 28, 2003 9:55 PM
> To: Guo, Min
> Cc: pan...@li...
> Subject: RE: How about remove useless functions from
> BMCPANIC.patch?
>
>
> Guo Min,
>
> Yes it is a function that is no longer used, and it should be
> removed in the patch for 2.5. I'm working on a new patch for 2.5.58, and
> it will be significantly different, because it will be based on the
> OpenIPMI driver.
>
> Andy
>
> -----Original Message-----
> From: Guo, Min
> Sent: Monday, January 27, 2003 7:39 PM
> To: Cress, Andrew R
> Cc: pan...@li...
> Subject: How about remove useless functions from
> BMCPANIC.patch?
>
>
> Hi, Andrew,
>
> After I read the bmcpanic.patch, I found
> there are some functions and comments can be deleted,
> such as ReadSEL, so how about remove the code from
> the patch?
>
> If you agree, I would like to supply a clean
> patch for 2.5.58.
>
> Thanks
> Guo Min
>
|
|
From: Guo, M. <mi...@in...> - 2003-01-29 08:50:41
|
Hi,Andy
I found OpenIPMI has realized some functions such as insert OS
critical message to SEL, so how about add
our features(Get and Set LED when panic happened) to the IPMI?
Thanks
Guo Min
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------------------
--- linux-2.5.58/drivers/char/ipmi/ipmi_msghandler.c Wed Jan 15 17:43:16
2003
+++ linux-2.5.58-panicsel/drivers/char/ipmi/ipmi_msghandler.c Wed Jan 29
01:39:21 2003
@@ -1857,6 +1857,94 @@
intf->my_lun);
}
}
+
+static unsigned char getAlarmLED(void)
+{
+ struct ipmi_msg msg;
+ unsigned char data[8];
+ unsigned char alarm;
+ struct ipmi_system_interface_addr addr;
+ struct ipmi_smi_msg smi_msg;
+ struct ipmi_recv_msg recv_msg;
+ int rv;
+
+
+ /* Fill in an event telling that we have failed. */
+
+ addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
+ addr.channel = IPMI_BMC_CHANNEL;
+ addr.lun = 0;
+
+ msg.netfn = 0x06; /* Net function application. */
+ msg.cmd = 0x52; /* write and read. */
+ msg.data = data;
+ msg.data_len = 3;
+
+ data[0] = 0x03; /* private bus ID */
+ data[1] = 0x41; /* Alarm panel read. */
+ data[2] = 0x01; /* read count */
+ data[3] = 0x00; /* default set to 0 */
+
+
+
+ alarm = 0;
+
+
+ rv = ipmi_request_supply_msgs(NULL,
+ (struct ipmi_addr *) &addr,
+ 0,
+ &msg,
+ &smi_msg,
+ &recv_msg,
+ 1);
+
+ if (rv) {
+ printk(KERN_WARNING "IPMI GetAlarmLED: %d\n", rv);
+ alarm=0;
+ return alarm;
+ }else{
+ alarm=recv_msg.msg.data[3];
+ return alarm;
+ }
+} /*end getAlarmLED*/
+
+static void setAlarmLED(unsigned char alarm)
+{
+ struct ipmi_msg msg;
+ unsigned char data[8];
+ struct ipmi_system_interface_addr addr;
+ struct ipmi_smi_msg smi_msg;
+ struct ipmi_recv_msg recv_msg;
+ int rv;
+
+
+ /* Fill in an event telling that we have failed. */
+
+ addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
+ addr.channel = IPMI_BMC_CHANNEL;
+ addr.lun = 0;
+
+ msg.netfn = 0x06; /* Net function application. */
+ msg.cmd = 0x52; /* write and read. */
+ msg.data = data;
+ msg.data_len = 3;
+
+ data[0] = 0x03; /* private bus ID */
+ data[1] = 0x40; /* Alarm panel read. */
+ data[2] = 0; /* read count */
+ data[3] = ((alarm & 0x0D) | 0xF0); /* set critical LED on */
+
+
+ rv = ipmi_request_supply_msgs(NULL,
+ (struct ipmi_addr *) &addr,
+ 0,
+ &msg,
+ &smi_msg,
+ &recv_msg,
+ 1);
+} /*end setAlarmLED*/
+
+
#endif /* CONFIG_IPMI_PANIC_EVENT */
static int has_paniced = 0;
@@ -1867,6 +1955,7 @@
{
int i;
ipmi_smi_t intf;
+ unsigned char alarm;
if (has_paniced)
return NOTIFY_DONE;
@@ -1883,8 +1972,10 @@
#ifdef CONFIG_IPMI_PANIC_EVENT
send_panic_events();
+ alarm = getAlarmLED();
+ if (alarm != 0)
+ setAlarmLED(alarm);
#endif
-
return NOTIFY_DONE;
}
----------------------------------------------------------------------------
-------------------------------
> -----Original Message-----
> From: Cress, Andrew R
> Sent: Tuesday, January 28, 2003 9:55 PM
> To: Guo, Min
> Cc: pan...@li...
> Subject: RE: How about remove useless functions from BMCPANIC.patch?
>
>
>
> Guo Min,
>
> Yes it is a function that is no longer used, and it should be removed in
> the patch for 2.5. I'm working on a new patch for 2.5.58, and it will be
> significantly different, because it will be based on the OpenIPMI driver.
>
>
> Andy
>
> -----Original Message-----
> From: Guo, Min
> Sent: Monday, January 27, 2003 7:39 PM
> To: Cress, Andrew R
> Cc: pan...@li...
> Subject: How about remove useless functions from
> BMCPANIC.patch?
>
>
> Hi, Andrew,
>
> After I read the bmcpanic.patch, I found there are
> some functions and comments can be deleted,
> such as ReadSEL, so how about remove the code from the
> patch?
>
> If you agree, I would like to supply a clean patch
> for 2.5.58.
>
> Thanks
> Guo Min
>
|
|
From: Cress, A. R <and...@in...> - 2003-01-28 13:51:52
|
Guo Min, Yes it is a function that is no longer used, and it should be removed in the patch for 2.5. I'm working on a new patch for 2.5.58, and it will be significantly different, because it will be based on the OpenIPMI driver. Andy > -----Original Message----- > From: Guo, Min > Sent: Monday, January 27, 2003 7:39 PM > To: Cress, Andrew R > Cc: pan...@li... > Subject: How about remove useless functions from BMCPANIC.patch? > > > Hi, Andrew, > > After I read the bmcpanic.patch, I found there are some > functions and comments can be deleted, > such as ReadSEL, so how about remove the code from the patch? > > If you agree, I would like to supply a clean patch for > 2.5.58. > > Thanks > Guo Min > |
|
From: Guo, M. <mi...@in...> - 2002-12-27 09:26:34
|
Hi,Andrew I want to check my test suites into your cvs if you agree, so could you please give me the permission? Thank you very much! Best Regards Guo Min Intel China Software Lab iNet: 8-752-1325 External: 86-21-52574545 Ext. 1325 Home: (86) 21 - 62088661 (Pacific Standard time + 16 hours) The content of this email message solely contains my own personal views, and not those of my employer. |
|
From: Cress, A. R <and...@in...> - 2002-12-09 16:41:55
|
Guo Min, Good catch. That is a bug. I simply didn't check whether the community name was already set before putting in the one from the snmpd.conf file. The other values have simpler checks because they are empty before it starts to check for the Linux config values. I have fixed it in pefconfig v1.12, and I'll post this to the sourceforge site soon. Andy > -----Original Message----- > From: Guo, Min > Sent: Friday, December 06, 2002 12:57 AM > To: Cress, Andrew R > Cc: 'pan...@li...' > Subject: RE: About test suites for panicsel > > Hi, Andy: > > Thank you ! > > Here I encountered a problem. > > I set the local machine's ip as its alter ip address, then run > pefconfig -A 127.0.0.1 -C private ,but when I run the "pefconfig -r " to > read the information out ,the > community is still "public", the detailed information is as below. > > So could you please take at look at it and see whether it is a bug > of pefconfig? > > Thanks > Guo Min > The content of this email message solely contains my own personal views, > and not those of my employer. > > > > pefconfig -A 127.0.0.1 -C private > pefconfig ver 1.11 > -- BMC version 0.48, IPMI version 1.5 > Code 0 SEL Ver 81 Support 15 > pefconfig: GetPefEntry ... > PEFilter(1): 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(2): 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(3): 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(4): 04 c0 01 01 00 ff ff 05 05 03 01 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(5): 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(6): 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(7): 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(8): 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(9): 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 > 00 > PEFilter(10): 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(11): 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(12): 0c 80 01 01 00 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 > 00 > pefconfig: SetPefEntry(12) ... > PEFilter(1): 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(2): 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(3): 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(4): 04 c0 01 01 00 ff ff 05 05 03 01 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(5): 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(6): 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(7): 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(8): 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(9): 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 > 00 > PEFilter(10): 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(11): 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(12): 0c 80 01 01 00 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 > 00 > pefconfig: GetLanEntry ... > Lan Param(0) Set in progress: 00 > Lan Param(1) Auth type support: 17 > Lan Param(2) Auth type enables: 01 01 01 01 00 > Lan Param(3) IP address: 172 16 211 198 > Lan Param(4) IP addr src: 01 > Lan Param(5) MAC addr: 00 03 47 d5 b3 cc > Lan Param(6) Subnet mask: 255 255 255 0 > Lan Param(7) IPv4 header: 40 40 10 > Lan Param(10) BMC grat ARP : 01 > Lan Param(11) grat ARP interval: 04 > Lan Param(12) Def gateway IP: 172 16 211 241 > Lan Param(13) Def gateway MAC: 00 00 00 00 00 00 > Lan Param(14) Sec gateway IP: 0 0 0 0 > Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00 > Lan Param(16) Community string: public > Lan Param(17) Num dest: 04 > Lan Param(18) Dest type: 01 00 01 00 69 > Lan Param(19) Dest address: 01 00 00 [127 0 0 1] ff 00 00 00 00 00 > Lan Param(192) DHCP Server IP: 0 0 0 0 > Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00 > Lan Param(194) DHCP Enable: 00 > Lan Param(201) Channel Access Mode(Lan): 02 00 > pefconfig: SetLanEntry ... > SetChanAcc(lan), ret = 0 > GetChanAcc(lan), ret = 0, new value = 22 > PEF Alerts Disabled > Access = Always Avail > eth0 ip=172.16.211.198 mac=00:03:47:d5:b3:cc > SetLanEntry(3), ret = 0 > SetLanEntry(4), ret = 0 > SetLanEntry(5), ret = 0 > SetLanEntry(6), ret = 0 > alert dest ip=127.0.0.1 mac=00:00:0c:07:ac:d3 > snmp community public > SetLanEntry(16), ret = 0 > SetLanEntry(18), ret = 0 > SetLanEntry(19), ret = 0 > SetChanAcc(lan), ret = 0 > GetChanAcc(lan), ret = 0, new value = 02 > PEF Alerts Enabled > Access = Always Avail > > > >pefconfig -r > > PEFilter(1): 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(2): 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(3): 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 > 00 > PEFilter(4): 04 c0 01 01 00 ff ff 05 05 03 01 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(5): 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(6): 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(7): 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(8): 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(9): 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 > 00 > PEFilter(10): 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(11): 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 > 00 > PEFilter(12): 0c 80 01 01 00 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 > 00 > pefconfig: GetLanEntry ... > Lan Param(0) Set in progress: 00 > Lan Param(1) Auth type support: 17 > Lan Param(2) Auth type enables: 01 01 01 01 00 > Lan Param(3) IP address: 172 16 211 198 > Lan Param(4) IP addr src: 01 > Lan Param(5) MAC addr: 00 03 47 d5 b3 cc > Lan Param(6) Subnet mask: 255 255 255 0 > Lan Param(7) IPv4 header: 40 40 10 > Lan Param(10) BMC grat ARP : 01 > Lan Param(11) grat ARP interval: 04 > Lan Param(12) Def gateway IP: 172 16 211 241 > Lan Param(13) Def gateway MAC: 00 00 00 00 00 00 > Lan Param(14) Sec gateway IP: 0 0 0 0 > Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00 > Lan Param(16) Community string: public > Lan Param(17) Num dest: 04 > Lan Param(18) Dest type: 01 00 01 00 69 > Lan Param(19) Dest address: 01 00 00 [127 0 0 1] 00 00 0c 07 ac d3 > Lan Param(192) DHCP Server IP: 0 0 0 0 > Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00 > Lan Param(194) DHCP Enable: 00 > Lan Param(201) Channel Access Mode(Lan): 22 00 > -----Original Message----- > From: Cress, Andrew R > Sent: Thursday, December 05, 2002 11:37 PM > To: Guo, Min > Cc: 'pan...@li...' > Subject: RE: About test suites for panicsel > > Guo Min, > > Here are the comments I had looking through the tests you have. > > For showsel option -w, it would be good to also verify that after > running it, the SEL entries appear in /var/log/messages as expected. > > For showsel option -s, there may not be any OS Critical Stop > messages, unless you have previously forced a panic (as with dopanic). > > For pefconfig -n 9, it should not succeed, since it shouldn't permit > overwriting one of the built-in entries at that offset. > > For pefconfig -n 14, I believe that it may need to have the 12 & 13 > entries filled first. > > For pefconfig -C, you may want to use something other than "public", > since that is the default and it would be hard to tell if it set the > specified string or the default string. > > For the tmconfig basic test, you should probably use tmconfig -r to > find out if the utility runs, without changing anything. > > About tmconfig: > On a Langley-Pr, "tmconfig" without options, should set up the TMode > shared parameters. > On a Langley-Tu or CoosBay, "tmconfig -s" is the mode to set up > BMode shared parameters. > > For the hwreset power cycle, I don't think that the ACPI > configuration matters. > > Andy > > -----Original Message----- > From: Guo, Min > Sent: Wednesday, December 04, 2002 10:21 PM > To: Cress, Andrew R > Cc: pan...@li... > Subject: RE: About test suites for panicsel > > Hi, Andrew: > > I write some test cases to test the panicsel and its > kernel patch. I publish them here, and could you please give me some > comments? I divide the test cases into two parts ,one is the > test suites don't need to reboot machine, the other is the test suites > need to reboot machine. > > Because the test suites are too long, so I also send > it out as attachment. > > ----------------------------------The test suites (don't > need to reboot > machine)------------------------------------------------------------------ > ------------- > [...] > > showsel_test > pefconfig_test > tmconfig_test > > -----------------------------The test suites need reboot > machine----------------------- > > [...] > Best Regards > Guo Min > The content of this email message solely contains my own > personal views, > and not those of my employer. > > << File: panicsel_apptool_test.sh >> << File: > panicsel_test_needreboot.sh >> |
|
From: Guo, M. <mi...@in...> - 2002-12-09 07:12:53
|
Hi, Andrew: I revised some parts of the test suites according to your comments. Below are my test suites. Thanks Guo Min <<panicsel_apptool_test.sh>> <<panicsel_test_needreboot.sh>> > -----Original Message----- > From: Cress, Andrew R > Sent: Thursday, December 05, 2002 11:37 PM > To: Guo, Min > Cc: 'pan...@li...' > Subject: RE: About test suites for panicsel > > Guo Min, > > Here are the comments I had looking through the tests you have. > > For showsel option -w, it would be good to also verify that after running > it, the SEL entries appear in /var/log/messages as expected. > > For showsel option -s, there may not be any OS Critical Stop messages, > unless you have previously forced a panic (as with dopanic). > > For pefconfig -n 9, it should not succeed, since it shouldn't permit > overwriting one of the built-in entries at that offset. > > For pefconfig -n 14, I believe that it may need to have the 12 & 13 > entries filled first. > > For pefconfig -C, you may want to use something other than "public", since > that is the default and it would be hard to tell if it set the specified > string or the default string. > > For the tmconfig basic test, you should probably use tmconfig -r to find > out if the utility runs, without changing anything. > > About tmconfig: > On a Langley-Pr, "tmconfig" without options, should set up the TMode > shared parameters. > On a Langley-Tu or CoosBay, "tmconfig -s" is the mode to set up BMode > shared parameters. > > For the hwreset power cycle, I don't think that the ACPI configuration > matters. > > Andy > > -----Original Message----- > From: Guo, Min > Sent: Wednesday, December 04, 2002 10:21 PM > To: Cress, Andrew R > Cc: pan...@li... > Subject: RE: About test suites for panicsel > > Hi, Andrew: > > I write some test cases to test the panicsel and its kernel > patch. I publish them here, and could you please give me some > comments? I divide the test cases into two parts ,one is the test > suites don't need to reboot machine, the other is the test suites > need to reboot machine. > > Because the test suites are too long, so I also send it out > as attachment. > > ----------------------------------The test suites (don't need to > reboot > machine)------------------------------------------------------------------ > ------------- > [...] > > showsel_test > pefconfig_test > tmconfig_test > > -----------------------------The test suites need reboot > machine----------------------- > > [...] > Best Regards > Guo Min > The content of this email message solely contains my own personal > views, > and not those of my employer. > > << File: panicsel_apptool_test.sh >> << File: > panicsel_test_needreboot.sh >> |
|
From: Guo, M. <mi...@in...> - 2002-12-06 05:59:33
|
Hi, Andy: Thank you ! Here I encountered a problem. I set the local machine's ip as its alter ip address, then run pefconfig -A 127.0.0.1 -C private ,but when I run the "pefconfig -r " to read the information out ,the community is still "public", the detailed information is as below. So could you please take at look at it and see whether it is a bug of pefconfig? Thanks Guo Min The content of this email message solely contains my own personal views, and not those of my employer. > pefconfig -A 127.0.0.1 -C private pefconfig ver 1.11 -- BMC version 0.48, IPMI version 1.5 Code 0 SEL Ver 81 Support 15 pefconfig: GetPefEntry ... PEFilter(1): 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(2): 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(3): 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(4): 04 c0 01 01 00 ff ff 05 05 03 01 00 00 00 00 00 00 00 00 00 00 PEFilter(5): 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 00 PEFilter(6): 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 00 PEFilter(7): 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 00 PEFilter(8): 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 00 PEFilter(9): 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 00 PEFilter(10): 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 00 PEFilter(11): 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 00 PEFilter(12): 0c 80 01 01 00 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 00 pefconfig: SetPefEntry(12) ... PEFilter(1): 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(2): 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(3): 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(4): 04 c0 01 01 00 ff ff 05 05 03 01 00 00 00 00 00 00 00 00 00 00 PEFilter(5): 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 00 PEFilter(6): 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 00 PEFilter(7): 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 00 PEFilter(8): 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 00 PEFilter(9): 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 00 PEFilter(10): 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 00 PEFilter(11): 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 00 PEFilter(12): 0c 80 01 01 00 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 00 pefconfig: GetLanEntry ... Lan Param(0) Set in progress: 00 Lan Param(1) Auth type support: 17 Lan Param(2) Auth type enables: 01 01 01 01 00 Lan Param(3) IP address: 172 16 211 198 Lan Param(4) IP addr src: 01 Lan Param(5) MAC addr: 00 03 47 d5 b3 cc Lan Param(6) Subnet mask: 255 255 255 0 Lan Param(7) IPv4 header: 40 40 10 Lan Param(10) BMC grat ARP : 01 Lan Param(11) grat ARP interval: 04 Lan Param(12) Def gateway IP: 172 16 211 241 Lan Param(13) Def gateway MAC: 00 00 00 00 00 00 Lan Param(14) Sec gateway IP: 0 0 0 0 Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00 Lan Param(16) Community string: public Lan Param(17) Num dest: 04 Lan Param(18) Dest type: 01 00 01 00 69 Lan Param(19) Dest address: 01 00 00 [127 0 0 1] ff 00 00 00 00 00 Lan Param(192) DHCP Server IP: 0 0 0 0 Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00 Lan Param(194) DHCP Enable: 00 Lan Param(201) Channel Access Mode(Lan): 02 00 pefconfig: SetLanEntry ... SetChanAcc(lan), ret = 0 GetChanAcc(lan), ret = 0, new value = 22 PEF Alerts Disabled Access = Always Avail eth0 ip=172.16.211.198 mac=00:03:47:d5:b3:cc SetLanEntry(3), ret = 0 SetLanEntry(4), ret = 0 SetLanEntry(5), ret = 0 SetLanEntry(6), ret = 0 alert dest ip=127.0.0.1 mac=00:00:0c:07:ac:d3 snmp community public SetLanEntry(16), ret = 0 SetLanEntry(18), ret = 0 SetLanEntry(19), ret = 0 SetChanAcc(lan), ret = 0 GetChanAcc(lan), ret = 0, new value = 02 PEF Alerts Enabled Access = Always Avail >pefconfig -r PEFilter(1): 01 c0 01 01 00 ff ff 01 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(2): 02 c0 01 01 00 ff ff 02 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(3): 03 c0 01 01 00 ff ff 04 ff 01 95 0a 00 00 00 00 00 00 00 00 00 PEFilter(4): 04 c0 01 01 00 ff ff 05 05 03 01 00 00 00 00 00 00 00 00 00 00 PEFilter(5): 05 c0 01 01 00 ff ff 08 ff 6f 06 00 00 00 00 00 00 00 00 00 00 PEFilter(6): 06 c0 01 01 00 ff ff 0c 08 6f 02 00 00 00 00 00 00 00 00 00 00 PEFilter(7): 07 c0 01 01 00 ff ff 0f 06 6f 01 00 00 00 00 00 00 00 00 00 00 PEFilter(8): 08 c0 01 01 00 ff ff 07 ff 6f 1c 00 00 00 00 00 00 00 00 00 00 PEFilter(9): 09 c0 01 01 00 ff ff 13 ff 6f 3e 03 00 00 00 00 00 00 00 00 00 PEFilter(10): 0a c0 01 01 00 ff ff 23 03 6f 0e 00 00 00 00 00 00 00 00 00 00 PEFilter(11): 0b c0 01 01 00 ff ff 12 ff 6f 02 00 00 00 00 00 00 00 00 00 00 PEFilter(12): 0c 80 01 01 00 ff ff 20 ff 6f ff 00 00 00 00 00 00 00 00 00 00 pefconfig: GetLanEntry ... Lan Param(0) Set in progress: 00 Lan Param(1) Auth type support: 17 Lan Param(2) Auth type enables: 01 01 01 01 00 Lan Param(3) IP address: 172 16 211 198 Lan Param(4) IP addr src: 01 Lan Param(5) MAC addr: 00 03 47 d5 b3 cc Lan Param(6) Subnet mask: 255 255 255 0 Lan Param(7) IPv4 header: 40 40 10 Lan Param(10) BMC grat ARP : 01 Lan Param(11) grat ARP interval: 04 Lan Param(12) Def gateway IP: 172 16 211 241 Lan Param(13) Def gateway MAC: 00 00 00 00 00 00 Lan Param(14) Sec gateway IP: 0 0 0 0 Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00 Lan Param(16) Community string: public Lan Param(17) Num dest: 04 Lan Param(18) Dest type: 01 00 01 00 69 Lan Param(19) Dest address: 01 00 00 [127 0 0 1] 00 00 0c 07 ac d3 Lan Param(192) DHCP Server IP: 0 0 0 0 Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00 Lan Param(194) DHCP Enable: 00 Lan Param(201) Channel Access Mode(Lan): 22 00 > -----Original Message----- > From: Cress, Andrew R > Sent: Thursday, December 05, 2002 11:37 PM > To: Guo, Min > Cc: 'pan...@li...' > Subject: RE: About test suites for panicsel > > Guo Min, > > Here are the comments I had looking through the tests you have. > > For showsel option -w, it would be good to also verify that after running > it, the SEL entries appear in /var/log/messages as expected. > > For showsel option -s, there may not be any OS Critical Stop messages, > unless you have previously forced a panic (as with dopanic). > > For pefconfig -n 9, it should not succeed, since it shouldn't permit > overwriting one of the built-in entries at that offset. > > For pefconfig -n 14, I believe that it may need to have the 12 & 13 > entries filled first. > > For pefconfig -C, you may want to use something other than "public", since > that is the default and it would be hard to tell if it set the specified > string or the default string. > > For the tmconfig basic test, you should probably use tmconfig -r to find > out if the utility runs, without changing anything. > > About tmconfig: > On a Langley-Pr, "tmconfig" without options, should set up the TMode > shared parameters. > On a Langley-Tu or CoosBay, "tmconfig -s" is the mode to set up BMode > shared parameters. > > For the hwreset power cycle, I don't think that the ACPI configuration > matters. > > Andy > > -----Original Message----- > From: Guo, Min > Sent: Wednesday, December 04, 2002 10:21 PM > To: Cress, Andrew R > Cc: pan...@li... > Subject: RE: About test suites for panicsel > > Hi, Andrew: > > I write some test cases to test the panicsel and its kernel > patch. I publish them here, and could you please give me some > comments? I divide the test cases into two parts ,one is the test > suites don't need to reboot machine, the other is the test suites > need to reboot machine. > > Because the test suites are too long, so I also send it out > as attachment. > > ----------------------------------The test suites (don't need to > reboot > machine)------------------------------------------------------------------ > ------------- > [...] > > showsel_test > pefconfig_test > tmconfig_test > > -----------------------------The test suites need reboot > machine----------------------- > > [...] > Best Regards > Guo Min > The content of this email message solely contains my own personal > views, > and not those of my employer. > > << File: panicsel_apptool_test.sh >> << File: > panicsel_test_needreboot.sh >> |
|
From: Cress, A. R <and...@in...> - 2002-12-05 15:34:42
|
Guo Min, Here are the comments I had looking through the tests you have. For showsel option -w, it would be good to also verify that after running it, the SEL entries appear in /var/log/messages as expected. For showsel option -s, there may not be any OS Critical Stop messages, unless you have previously forced a panic (as with dopanic). For pefconfig -n 9, it should not succeed, since it shouldn't permit overwriting one of the built-in entries at that offset. For pefconfig -n 14, I believe that it may need to have the 12 & 13 entries filled first. For pefconfig -C, you may want to use something other than "public", since that is the default and it would be hard to tell if it set the specified string or the default string. For the tmconfig basic test, you should probably use tmconfig -r to find out if the utility runs, without changing anything. About tmconfig: On a Langley-Pr, "tmconfig" without options, should set up the TMode shared parameters. On a Langley-Tu or CoosBay, "tmconfig -s" is the mode to set up BMode shared parameters. For the hwreset power cycle, I don't think that the ACPI configuration matters. Andy > -----Original Message----- > From: Guo, Min > Sent: Wednesday, December 04, 2002 10:21 PM > To: Cress, Andrew R > Cc: pan...@li... > Subject: RE: About test suites for panicsel > > Hi, Andrew: > > I write some test cases to test the panicsel and its kernel patch. I > publish them here, and could you please give me some > comments? I divide the test cases into two parts ,one is the test suites > don't need to reboot machine, the other is the test suites > need to reboot machine. > > Because the test suites are too long, so I also send it out as > attachment. > > ----------------------------------The test suites (don't need to reboot > machine)------------------------------------------------------------------ > ------------- [...] > showsel_test > pefconfig_test > tmconfig_test > > -----------------------------The test suites need reboot > machine----------------------- > [...] > Best Regards > Guo Min > The content of this email message solely contains my own personal views, > and not those of my employer. > > << File: panicsel_apptool_test.sh >> << File: > panicsel_test_needreboot.sh >> |
|
From: Guo, M. <mi...@in...> - 2002-12-05 03:23:43
|
Hi, Andrew:
I write some test cases to test the panicsel and its kernel patch. I
publish them here, and could you please give me some
comments? I divide the test cases into two parts ,one is the test suites
don't need to reboot machine, the other is the test suites
need to reboot machine.
Because the test suites are too long, so I also send it out as
attachment.
----------------------------------The test suites (don't need to reboot
machine)--------------------------------------------------------------------
-----------
#!/bin/sh
#$Id: panicsel_apptool_test.sh,v 1.1 2002/12/03 06:53:52 panichandler Exp $
linux_type="redhat"
basic_test()
{
showsel > /dev/null 2>&1
if [ "$?" -eq 0 ];then
echo "BASIC_PASS: The tool can run correctly"
return 0
else
echo "BASIC_PASS: The tool can not run correctly"
return 1
fi
}
showsel_ov()
{
showsel -v|grep version|grep -v BMC > /dev/null
if [ "$?" -eq "0" ];then
showsel -v|grep "free space" > /dev/null 2>&1
if [ "$?" -eq 0 ];then
echo "PASS:Showsel option -v testing"
return 0
else
echo "FAIL: Showsel testing -v fail"
fi
else
echo "FAIL: Showsel testing -v fail"
return 1
fi
}
showsel_oc()
{
message_original=`showsel|wc -l`
showsel -c > /dev/null 2>&1
message_now=`showsel|wc -l`
if [ "$message_original" -ge "$message_now" ];then
echo "PASS:Showsel option -c testing"
return 0
else
echo "FAIL:Showsel option -c testing"
return 1
fi
}
check_os()
{
if [ -d "/usr/src/redhat" ];then
linux_type="redhat"
fi
if [ -d "/usr/src/hardhat" ];then
linux_type="hardhat"
fi
}
check_driver()
{
lsmod|grep "ipmi_comb" > /dev/null 2>&1
if [ $? -eq 0 ];then
echo "The ipmi_comb driver has been inserted already"
Major=`cat /proc/devices|grep imb|awk '{print $1}'`
if [ ! -c /dev/imb ];then
mknod /dev/imb c $Major 0
fi
return 1
fi
modprobe "ipmi_comb" > /dev/null 2>&1
if [ $? -eq 0 ];then
echo "The ipmi_comb driver be inserted corretly"
else
echo "There are no ipmi driver or ipmi driver can not be
inserted correctly"
exit 1
fi
lsmod|grep "ipmi_comb" > /dev/null 2>&1
if [ $? -eq 0 ];then
Major=`cat /proc/devices|grep imb|awk '{print $1}'`
if [ ! -c /dev/imb ];then
mknod /dev/imb c $Major 0
fi
fi
}
showsel_ow()
{
cp -f /var/log/messages /tmp/tempbackup
if [ ! -d /usr/share/panicsel ];then
mkdir /usr/share/panicsel
fi
if [ -f /usr/share/panicsel/sel.idx ];then
rm -f sel.idx
fi
showsel -w > /dev/null 2>&1
idx=`cat /usr/share/panicsel/sel.idx`
if [ -n "$idx" ];then
echo "PASS: showsel option w"
else
echo "PASS: Showsel option w"
fi
}
###########################################
#test show OS critical message correctly###
###########################################
showsel_os()
{
rm -f showseloutputs
showsel -s >> showseloutputs
osnumber=`grep "OS Critical Stop" showseloutputs|wc -l`
showsel -s > /dev/null 2>&1
if [ $? -eq 0 ] || [ $osnumber -gt 0 ];then
echo " PASS: Showsel option s "
return 0
else
echo " FAIL: Showsel option s "
return 1
fi
}
set -x
showsel_test()
{
check_os
check_driver
basic_test
if [ "$?" -eq 0 ];then
showsel_ov
showsel_oc
showsel_ow
showsel_os
fi
}
#####################################################################
#test pefconfig can read PEF entry ###
#####################################################################
pefconfig_basic()
{
if [ -f pefconfigoutput ];then
rm -rf pefconfigoutput
fi;
pefconfig -r > pefconfigoutput 2>&1
pefnumber=`grep PEFilter pefconfigoutput|wc -l`
lannumber=`grep Lan pefconfigoutput|wc -l`
if [ $pefnumber -eq 12 ];then
echo " PASS: pefconfig basic requirement "
return 0
else
echo "FAIL: pefconfig basic requirement"
return 1
fi;
}
#####################################################################
#test pefconfig can enable or disable the new PEF 0x20 events ###
#####################################################################
pefconfig_od()
{
if [ -f /tmp/pefconfigoutputd ];then
rm /tmp/pefconfigoutputd
fi
pefconfig -d > /tmp/pefconfigoutputd 2>&1
disable=`cat /tmp/pefconfigoutputd|grep "Access = Disabled"`
if [ -n "$disable" ];then
echo "PASS: pefconfig disable OS critical Event "
return 0
else
echo "FAIL: pefconfig disable OS critical Event "
return 1
fi
}
#####################################################################
#test pefconfig can write new entry at different offset than 12 ###
#####################################################################
ts_pefconfign()
{
if [ -f pefconfigoutputn9 ];then
rm -rf pefconfigoutputn9
fi;
if [ -f pefconfigoutputn14 ];then
rm -rf pefconfigoutputn14
fi;
pefconfig -n 9 > pefconfigoutputn9 2>&1
lessnumber=`grep "PEFilter(9)" pefconfigoutputn9|wc -l`
pefconfig -n 14 > pefconfigoutputn14
morenumber=`grep "PEFilter(14)" pefconfigoutputn14|wc -l`
if [ $lessnumber -eq 2 ] && [ $morenumber -eq 2 ];then
echo "PASS: pefconfig parameter n "
return 0
else
echo " FAIL: pefconfig parameter n"
return 1
fi
}
#####################################################################
#test pefconfig can output more debug information ###
#####################################################################
ts_pefconfigx()
{
if [ -f pefconfigoutput ];then
rm -rf pefconfigoutput
fi;
if [ -f pefconfigoutputx ];then
rm -rf pefconfigoutputx
fi;
pefconfig -x >> pefconfigoutputx
test=`grep "PEF record" pefconfigoutputx`
if [ ! -z test ];then
echo "PASS: pefconfig parameter x "
return 0
else
echo "FAIL: pefconfig parameter x"
return 1
fi;
}
##############################################################
#Basic function for testing pefconfig configuration
################################################################
get_host_ip_address()
{
ifconfig|grep "inet addr"|grep -v "127.0.0.1"|awk '{print $2}'|cut
-d: -f2
}
get_host_mac_address()
{
ifconfig|grep eth0|awk '{print $5}'
}
get_route_ip_address()
{
netstat -rn|grep eth0|grep UG|awk '{print $2}'
#cat /proc/net/arp|grep -v "HW"|awk '{print $1}'
}
get_route_mac_address()
{
routeip=`get_route_ip_address`
cat /proc/net/arp|grep -v "HW"|grep $routeip|awk '{print $4}'
}
get_subnet_mask_address()
{
ifconfig|grep Mask|grep -v "127.0.0.1"|awk '{print $4}'|cut -d: -f2
}
get_alert_ip_address()
{
cat /etc/snmp/snmpd.conf|grep trapsink|cut -f2 -d' '
}
get_alert_mac_address()
{
routip=get_route_ip_address
arping -c 1 $routeip > /dev/null 2>&1
arping -c 2 $1|grep reply|tail -1|awk '{print $5}'|cut -c2-18
}
get_pef_ip_address()
{
cat $1|grep $2|grep -v "Param"|awk '{print $2}'|cut -d= -f2
}
get_pef_mac_address()
{
cat $1|grep $2|grep -v "Param"|awk '{print $3}'|cut -d= -f2
}
check_pef()
{
cat $1|grep "SetLanEntry"|grep "($2"|awk '{print $4}'
}
upper()
{
echo $1|tr 'a-z' 'A-Z'
}
####################################################
#Test pefconfig set host ip and mac addresses
###################################################
ts_pefconfig_sethost()
{
rm /tmp/pefconfig_host
ip=`get_host_ip_address`
mac=`get_host_mac_address`
pefconfig -I $ip -M $mac > /tmp/pefconfig_host 2>&1
setip=`get_pef_ip_address /tmp/pefconfig_host eth0`
setmac=`get_pef_mac_address /tmp/pefconfig_host eth0`
setmac=`upper $setmac`
isip=`check_pef /tmp/pefconfig_host 3`
ismac=`check_pef /tmp/pefconfig_host 4`
tet_infoline "test pefconfig parameter -IP -M"
if [ $ip == $setip ] && [ $mac == $setmac ] \
&& [ $isip -eq 0 ] && [ $ismac -eq 0 ];then
echo "PASS:Pefconfig Set host ip and Mac address"
return 0
else
echo "FAIL:Pefconfig Set host ip and Mac address"
return 1
fi
}
###############################################################
##Test pefconfig set route ip and mac addresses
###############################################################
ps_pefconfig_setroute()
{
ip=`get_route_ip_address`
count=`get_route_ip_address`
mac=`get_route_mac_address`
pefconfig -G $ip -H $mac > /tmp/pefconfig_route 2>&1
setip=`get_pef_ip_address /tmp/pefconfig_route gateway`
setmac=`get_pef_mac_address /tmp/pefconfig_route gateway`
setmac=`upper $setmac`
isip=`check_pef /tmp/pefconfig_route 12`
ismac=`check_pef /tmp/pefconfig_route 13`
tet_infoline "test pefconfig parameter -G -H"
if [ $ip == $setip ] && [ $mac == $setmac ] \
&& [ $isip -eq 0 ] && [ $ismac -eq 0 ];then
echo "PASS:Pefconfig Set route ip and mac address"
return 0
else
echo "FAIL:Pefconfig Set route ip and mac address"
return 1
fi
}
get_alert_setip_address()
{
cat $1|grep $2|awk '{print $3}'|cut -d= -f2
}
get_alert_setmac_address()
{
cat $1|grep $2|awk '{print $4}'|cut -d= -f2
}
ps_pefconfig_setalert()
{
rm -f /tmp/pefconfig_alert
ip=`get_host_ip_address`
mac=`get_host_mac_address`
pefconfig -A $ip -B $mac > /tmp/pefconfig_alert 2>&1
setip=`get_alert_setip_address /tmp/pefconfig_alert alert`
setmac=`get_alert_setmac_address /tmp/pefconfig_alert alert`
setmac=`upper $setmac`
isip=`check_pef /tmp/pefconfig_alert 18`
ismac=`check_pef /tmp/pefconfig_alert 19`
tet_infoline "test pefconfig parameter -A -B"
if [ $ip == $setip ] && [ $mac == $setmac ] \
&& [ $isip -eq 0 ] && [ $ismac -eq 0 ];then
echo "PASS:Pefconfig Set alert"
return 0
else
echo "FAIL:Pefconfig Set Alert"
return 1
fi
}
###########################################################
#Test pefconfig set community
###########################################################
ts_pefconfig_setcommunity()
{
rm -f /tmp/pefconfig_comm
pefconfig -C public > /tmp/pefconfig_comm 2>&1
pef_comm=`cat /tmp/pefconfig_comm|grep Community|awk '{print $5}'`
tet_infoline "test pefconfig parameter -C"
if [ $pef_comm == "public" ];then
echo "PASS:Pefconfig set community"
return 0
else
echo "FAIL:Pefconfig set community"
return 1
fi
}
get_pef_subnet()
{
a=`cat $1|grep Subnet|awk '{print $5}'`
b=`cat $1|grep Subnet|awk '{print $6}'`
c=`cat $1|grep Subnet|awk '{print $7}'`
d=`cat $1|grep Subnet|awk '{print $8}'`
echo $a.$b.$c.$d
}
##############################################################
#Test pefconfig set subnet mask
###############################################################
ts_pefconfig_setsubnet()
{
subnet=`get_subnet_mask_address`;
pefconfig -S $subnet > /tmp/pefconfig_subnet 2>&1
tet_infoline "test the pefconfig parameter -S"
pef_subnet=`get_pef_subnet /tmp/pefconfig_subnet`
if [ $subnet == $pef_subnet ];then
echo "PASS:Pefconfig get sub net mask address"
return 0
else
echo "FAIL: Pefconfig get sub net mask address"
return 1
fi
}
pefconfig_test()
{
pefconfig_basic
if [ "$?" -eq 0 ];then
ts_pefconfign
ts_pefconfigx
ts_pefconfig_sethost
ts_pefconfig_setroute
ts_pefconfig_setsubnet
else
"System does not support pefconfig function"
fi
}
#*****************************************************/
#Test the tmconfig util******************************/
#*****************************************************/
EntryTest()
{
which tmconfig > /dev/null 2>&1
if [ $? -ne 0 ];then
if [ -f /usr/share/panicsel/tmconfig ];then
cp -f /usr/share/panicsel/tmconfig /usr/sbin
else
echo "Tmconfig:there are no tmconfig util"
exit 1
fi
fi
tmconfig > /dev/null 2>&1
if [ $? -ne 0 ];then
echo "Tmconfig:hardware does not support tmconfig util"
exit 1
else
return 0
fi
}
TestPara()
{
result=`cat $1|grep $2|awk '{print $4}'|cut -d , -f 1`
if [ $result -eq 0 ];then
echo "PASS:Tmconfig" $2
return 0
else
echo "FAIL:Tmconfig" $2
return 1
fi
}
ps_tmconfigr()
{
infoline="Test tmconfig parameter r"
EntryTest
tmconfig -r > /dev/null 2>&1
if [ $? -eq 0 ];then
echo "PASS:" $infoline
return 0
else
echo "FAIL:" $infoline
return 1
fi
}
ps_tmconfigs()
{
infoline="Test tmconfig parameter n"
EntryTest
tmconfig -s > /tmp/tmconfigs 2>&1
TestPara /tmp/tmconfigs "SetChanAcc(ser)"
}
tmconfig_test()
{
ps_tmconfigr
ps_tmconfigs
}
showsel_test
pefconfig_test
tmconfig_test
-----------------------------The test suites need reboot
machine-----------------------
#!/bin/sh
#$Id: panicsel_test_needreboot.sh,v 1.3 2002/12/05 03:44:10 panichandler Exp
$
env()
{
if [ -x /usr/local/bin/showsel ];then
PATH_EXEC="/usr/local/bin"
fi
if [ -x /usr/sbin/showsel ];then
PATH_EXEC="/usr/sbin"
fi
}
check_os()
{
if [ -d "/usr/src/redhat" ];then
linux_type="redhat"
fi
if [ -d "/usr/src/hardhat" ];then
linux_type="hardhat"
fi
}
check_driver()
{
lsmod|grep "ipmi_comb" > /dev/null 2>&1
if [ $? -eq 0 ];then
echo "The ipmi_comb driver has been inserted already"
Major=`cat /proc/devices|grep imb|awk '{print $1}'`
if [ ! -c /dev/imb ];then
mknod /dev/imb c $Major 0
return 0
fi
fi
modprobe "ipmi_comb" > /dev/null 2>&1
if [ $? -eq 0 ];then
echo "The ipmi_comb driver be inserted corretly"
else
echo "There are no ipmi driver or ipmi driver can not be
inserted correctly"
exit 1
fi
lsmod|grep "ipmi_comb" > /dev/null 2>&1
if [ $? -eq 0 ];then
Major=`cat /proc/devices|grep imb|awk '{print $1}'`
if [ ! -c /dev/imb ];then
mknod /dev/imb c $Major 0
fi
fi
}
prepare()
{
env
check_driver
}
Test_kernelpatch()
{
oldnum=0
newnum=0
prepare
DIR=`pwd`
if [ -f /tmp/mark ];then
MARK=`cat /tmp/mark`
else
MARK=0
fi
$PATH_EXEC/pefconfig -A $1 -C public
if [ $? -ne 0 ];then
echo "Pefconfig incorrectly,pls check your machine"
exit 1
fi
cd /usr/share/panicsel
if [ "$MARK" -ne "1" ];then
cd $DIR
cp -f ./dopanic /usr/share/panicsel/
echo "Init a panic for panicsel..."
$PATH_EXEC/showsel -s|grep -c "OS Critical Stop" >
/tmp/ocs_num
sync
sleep 2
echo 1 > /tmp/mark
cd /usr/share/panicsel
insmod -f ./dopanic
fi
echo "check the result for panicsel..."
read oldnum < /tmp/ocs_num
$PATH_EXEC/showsel -s |grep -c "OS Critical Stop" > /tmp/ocs_num
read newnum < /tmp/ocs_num
let oldnum=oldnum+1
if [ $newnum -eq $oldnum ]
then
echo "PASS:KernelPactch:Panic sel insert record"
return 0
else
echo "FAIL: Kernel PatchPanic sel insert record"
return 1
fi
rm -f /tmp/mark
}
ts_hwresetr()
{
prepare
if [ -f /tmp/count ];then
COUNT=`cat /tmp/count`
else
COUNT=0
fi
if [ "$COUNT" -ne "1" ];then
$PATH_EXEC/showsel -c >/dev/null 2>&1
echo 1 > /tmp/count
$PATH_EXEC/hwreset #reset the system
fi
$PATH_EXEC/showsel > /tmp/hwreset 2>&1
isevent=`cat /tmp/hwreset|grep "System Event"`
isboot=`cat /tmp/hwreset|grep "System Boot"`
if [ -n "$isevent" ] && [ -n "$isboot" ];then
echo "PASS:Panicsel power reset"
return 0
else
echo "FAIL:Panicsel power reset"
return 1
fi
rm -f /tmp/count
}
ts_hwresetc()
{
prepare
if [ -f /tmp/hwresetc ];then
MARK=`cat /tmp/hwresetc`
else
MARK=0
fi
if [ "$MARK" -ne "1" ];then
$PATH_EXEC/showsel -c >/dev/null 2>&1
echo 1 > /tmp/hwresetc
$PATH_EXEC/hwreset -c #reset the system
fi
$PATH_EXEC/showsel>/tmp/hwresetc 2>&1
number=`cat /tmp/hwresetc|grep "ACPI"|wc -l`
power=`cat /tmp/hwresetc|grep "Power Off/Down"`
if [ $number -eq 2 ] || [ -n "$power" ];then
echo "PASS:Panicsel power cycle"
return 0
else
echo "FAIL:Panicsel power cycle"
return 1
fi
rm -f /tmp/hwresetc
}
Best Regards
Guo Min
The content of this email message solely contains my own personal views,
and not those of my employer.
<<panicsel_apptool_test.sh>> <<panicsel_test_needreboot.sh>>
|
|
From: Cress, A. R <and...@in...> - 2002-11-27 14:35:07
|
Guo Min,
Here are some ideas. I hope this is what you are seeking.
testing the kernel patch:
run pefconfig to set it up
invoke dopanic and verify that:
- the critical LED is on (visual)
- the OS Critical Stop message is in the SEL (via showsel after
reboot, or via DPC)
- the SNMP message is sent (check at the destination)
- the correct action is taken (reboot, power cycle, or power down)
I guess not all of this can be automatically verified and some manual steps
are needed.
testing the utilities:
- showsel
-c clears log (run normal & note free space, then run -c, then run
normal again)
-v just shows version (and free space)
- pefconfig
test options (various, see man page)
One key thing that was a problem before was the LAN password (-P).
Note that you can also clear the password with -P "" .
Another thing that isn't obvious is extracting the SNMP destination
from the Linux /etc/snmp/snmpd.conf
You need to edit the snmpd.conf file, hopefully this is documented
well enough.
In order to test the SNMP alert functionality, you will have to run
dopanic as above.
To test the LAN connections, you can use ISC console, or dpccli (a
UNIX utilitiy also from EST).
- tmconfig
For Langley-Tu (TSRLT2), only -r & -s make sense
For Langley-Pr (TSRLP2), TMode is supported in the firmware.
- hwreset
test each of the options: -c -d -n -r -s -x
There are two utilities that are provided in the source, but are not
officially supported yet:
sensor and fruconfig.
sensor works ok, but fruconfig has a bug that corrupts the FRU/SDR
checksum, so don't run it yet.
Andy
> -----Original Message-----
> From: Guo, Min
> Sent: Wednesday, November 27, 2002 4:39 AM
> To: Cress, Andrew R
> Cc: pan...@li...; Wang, Frank; Xie, May
> Subject: About test suites for panicsel
>
> Hi
>
> Thanks for your perfect work.
>
> I am glad to make some contributions to the project about test
> suites,so could you please
> give me some requirements and suggestions about the format of test suites.
>
>
> Thanks
>
>
> Best Regards
> Guo Min
> The content of this email message solely contains my own personal views.
>
|
|
From: Guo, M. <mi...@in...> - 2002-11-27 09:41:34
|
Hi Thanks for your perfect work. I am glad to make some contributions to the project about test suites,so could you please give me some requirements and suggestions about the format of test suites. Thanks Best Regards Guo Min The content of this email message solely contains my own personal views. |
|
From: Cress, A. R <and...@in...> - 2002-11-08 13:50:17
|
Steve,
I haven't looked at it yet. I'll check it out.
Andy
-----Original Message-----
From: Steven A. DuChene [mailto:lin...@mi...]
Sent: Thursday, November 07, 2002 5:26 PM
To: Cress, Andrew R
Cc: pan...@li...
Subject: [Panicsel-developers] python class/module for IPMI access
Andy:
Have you looked at the python class/module that Doug White wrote
as part of the IPMI for FreeBSD project. He talks about it using
inb and outb types of access. Do you think this would work on a
Linux system too?
BTW, great job on the panicsel web page and the design doc.
Lots of good info there.
--
Steven A. DuChene lin...@mi...
sdu...@mi...
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Panicsel-developers mailing list
Pan...@li...
https://lists.sourceforge.net/lists/listinfo/panicsel-developers
|