Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to list discrete sensors #55

Open
lukeyeager opened this issue Apr 5, 2023 · 1 comment
Open

How to list discrete sensors #55

lukeyeager opened this issue Apr 5, 2023 · 1 comment

Comments

@lukeyeager
Copy link
Contributor

When I compare the results of ipmitool sensor list with the list of sensors in the result from RetrieveSDRRepository(), I see many more sensors returned by ipmitool. They are all "discrete" (binary?) sensors - here is an example:

Presence         | 0x0        | discrete   | 0x0180| na        | na        | na        | na        | na        | na

From a printf I added, it looks to me like the filtering happens on this line:

if fsrLayer := packet.Layer(ipmi.LayerTypeFullSensorRecord); fsrLayer != nil {

Is there any way to list those filtered sensors using this library rather than discarding them?

@gebn
Copy link
Owner

gebn commented Apr 6, 2023

Not currently, as I only needed SDR Type 0x1 (Full Sensor Record), which is defined in 43.1 here. Discrete sensors are likely each represented by an SDR Type 0x2 (Compact Sensor Record), specified in 43.2, though it would be worth confirming with IPMItool's raw output mode before doing any work. SDRRepository would have to become a struct, as it is currently a map of only FSRs. Shouldn't be too tricky to write - less work than implementing FSR. Happy to review a PR!

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

No branches or pull requests

2 participants