Skip to content

Expand shared Compact sensor records into one sensor per instance (#100) - #197

Merged
bertysentry merged 1 commit into
mainfrom
100-shared-sensor-records
Oct 19, 2026
Merged

bertysentry merged 1 commit into
mainfrom
100-shared-sensor-records

Conversation

@bertysentry

Copy link
Copy Markdown
Contributor

Closes #100.

What

A Compact sensor record with a share count of N describes N sensors with consecutive sensor numbers (IPMI 2.0 section 43.2, table 43-2 bytes 24-25). The fields were parsed, but sensors() read only the first sensor of the record.

  • IpmiClient.readSensors() reads each instance of a shared record with its own Get Sensor Reading; a share count that would run past sensor number 255 is cut there.
  • Sensor carries its index among the sensors sharing the record: number() adds it, entityInstance() adds it when the record says the entity instance increments, name() appends the instance modifier (offset + index for a numeric modifier, base-26 letters for an alpha one: A..Z, AA...). When the ID string already ends with a number, that number is taken as the first instance's and incremented, so Dell's Drive 0 (15 sensors) and Drive 15 (9 sensors) become Drive 0 to Drive 23 rather than Drive 0 0.
  • names() globs match the expanded names; a refused instance (an empty slot answering CBh) costs that instance only, as before for a single sensor.
  • The single-sensor output is unchanged (the golden-output test passes as is). The TODO in CompactSensorRecord is gone.
  • Docs: a Shared records section on the sensors page, and an Upgrading from 2.0.00 entry.

Why it matters

The issue said mainstream rack BMCs rarely share records. A survey of the 40 lab BMCs on 2026-10-19 shows the opposite for Dell: every iDRAC (6, 8, F200) shares records, for drive slots and DIMM slots, and no other vendor does (Lenovo IMM/XCC, HPE iLO 5, Cisco IMC, Supermicro, Fujitsu iRMC, GIGABYTE: none). ipmitool parses the share fields and never uses them; ipmiutil lists one Drive line; FreeIPMI expands behind --shared-sensors.

Live results

Card Before After
Dell iDRAC 6 (idrac-hegel) one Drive sensor (128) Drive 0 to Drive 5 (128-133), drives 0 and 1 present
Dell iDRAC 8 (idrac-ecs1, R630) 171 sensors: Drive 0, Drive 15, A , B 215 sensors: Drive 0 to Drive 23 (slots 8-23 "scanning disabled"), A 1 to A 12 (present), B 1 to B 12

Tests

aSharedRecordYieldsOneSensorPerInstance: numeric modifier from 0 (Drive 0..2), Dell-style ID string (Drive 15, Drive 16), alpha modifier from 25 with the entity instance incrementing (Temp Z, Temp AA), a refused instance, name globs on the expanded names, one Get Sensor Reading per instance. mvn clean verify site passes (checkstyle 0, SpotBugs 0, CPD 0).

🤖 Generated with Claude Code

A Compact record with a share count of N describes N sensors with
consecutive numbers (IPMI 2.0 section 43.2); sensors() read the first
one only. Every Dell iDRAC in the lab shares records: drive slots
("Drive 0" x 15 and "Drive 15" x 9 on iDRAC 8, "Drive" x 6 on an
R-series iDRAC 6) and DIMM slots ("A " x 12, "B " x 12), so an R630
lost 44 sensors.

readSensors() now reads each instance with its own Get Sensor Reading,
and Sensor carries its index: number() adds it, entityInstance() adds
it when the record says the entity instance increments, name() appends
the instance modifier (offset + index for a numeric modifier, base-26
letters for an alpha one). An ID string that already ends with a number,
as Dell writes it, has that number incremented instead, so the slots are
named Drive 0 to Drive 23 rather than Drive 0 0. The names() globs match
the expanded names, and a refused instance (an empty slot answering CBh)
costs that instance only.

Live: idrac-hegel lists Drive 0-5 (two present), idrac-ecs1 goes from
171 to 215 sensors (Drive 0-23, A 1-12, B 1-12). No other vendor in the
lab shares records, and their output is unchanged.

Closes #100

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T23:36:36.426546Z 7e25c41 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bertysentry
bertysentry merged commit c84a934 into main Oct 19, 2026
4 checks passed
@bertysentry
bertysentry deleted the 100-shared-sensor-records branch October 19, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compact sensor record sharing (share count / entity instance sharing / ID instance modifier) is parsed but never expanded

1 participant