0

Here is the output from $ipmitool -sensor, they show all DIMM info. But FreeIPMI only have the DIMM info that have been plug-in. How can I get all Memory DIMM information by using FreeIPMI API in C?

$ sudo ipmitool sensor
CPU Temp         | 59.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 99.000    | 104.000   | 104.000   
System Temp      | 35.000     | degrees C  | ok    | -10.000   | -5.000    | 0.000     | 80.000    | 85.000    | 90.000    
Peripheral Temp  | 49.000     | degrees C  | ok    | -10.000   | -5.000    | 0.000     | 80.000    | 85.000    | 90.000    
DIMMA1 Temp      | na         |            | na    | na        | na        | na        | na        | na        | na        
DIMMA2 Temp      | na         |            | na    | na        | na        | na        | na        | na        | na        
DIMMB1 Temp      | 36.000     | degrees C  | ok    | -5.000    | 0.000     | 5.000     | 80.000    | 85.000    | 90.000    
DIMMB2 Temp      | na         |            | na    | na        | na        | na        | na        | na        | na        
FAN1             | 3800.000   | RPM        | ok    | 300.000   | 500.000   | 700.000   | 25300.000 | 25400.000 | 25500.000 
FAN2             | 4100.000   | RPM        | ok    | 300.000   | 500.000   | 700.000   | 25300.000 | 25400.000 | 25500.000 
FAN3             | 4100.000   | RPM        | ok    | 300.000   | 500.000   | 700.000   | 25300.000 | 25400.000 | 25500.000 
FANA             | 4400.000   | RPM        | ok    | 300.000   | 500.000   | 700.000   | 25300.000 | 25400.000 | 25500.000 
12V              | 12.000     | Volts      | ok    | 10.173    | 10.299    | 10.740    | 12.945    | 13.260    | 13.386    
5VCC             | 4.922      | Volts      | ok    | 4.246     | 4.298     | 4.480     | 5.390     | 5.546     | 5.598     
3.3VCC           | 3.248      | Volts      | ok    | 2.789     | 2.823     | 2.959     | 3.554     | 3.656     | 3.690     
VBAT             | 3.047      | Volts      | ok    | 2.375     | 2.487     | 2.599     | 3.775     | 3.887     | 3.999     
Vcpu             | 1.809      | Volts      | ok    | 1.242     | 1.260     | 1.395     | 1.899     | 2.088     | 2.106     
VDIMMAB          | 1.191      | Volts      | ok    | 0.948     | 0.975     | 1.047     | 1.344     | 1.425     | 1.443     
VDIMMCD          | 1.209      | Volts      | ok    | 0.948     | 0.975     | 1.047     | 1.344     | 1.425     | 1.443     
5VSB             | 4.974      | Volts      | ok    | 4.246     | 4.298     | 4.480     | 5.390     | 5.546     | 5.598     
3.3VSB           | 3.197      | Volts      | ok    | 2.789     | 2.823     | 2.959     | 3.554     | 3.656     | 3.690     
1.5V PCH         | 1.509      | Volts      | ok    | 1.320     | 1.347     | 1.401     | 1.644     | 1.671     | 1.698     
1.2V BMC         | 1.218      | Volts      | ok    | 1.020     | 1.047     | 1.092     | 1.344     | 1.371     | 1.398     
1.05V PCH        | 1.041      | Volts      | ok    | 0.870     | 0.897     | 0.942     | 1.194     | 1.221     | 1.248     
Chassis Intru    | 0x0        | discrete   | 0x0000| na        | na        | na        | na        | na        | na     

About the Memory information, I know that DIMMA1, A2 and B2 are not been plug-in, and DIMMB1 is 36.0 degree in Temperature.

And here is the output from ipmimonitoring-sensors of FreeIPMI:

Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State, Sensor Reading, Sensor Units, Sensor Event/Reading Type Code, Sensor Event Bitmask, Sensor Event String
4, Processor 1 CPU Temp, 1, Temperature, Nominal, 60.00, C, 1h, C0h, 'OK'
71, System Board 1 System Temp, 11, Temperature, Nominal, 36.00, C, 1h, C0h, 'OK'
138, System Board 2 Peripheral Temp, 14, Temperature, Nominal, 50.00, C, 1h, C0h, 'OK'
339, Memory Device 68 DIMMB1 Temp, 180, Temperature, Nominal, 37.00, C, 1h, C0h, 'OK'
473, Fan 1 FAN1, 65, Fan, Nominal, 3800.00, RPM, 1h, C0h, 'OK'
540, Fan 2 FAN2, 66, Fan, Nominal, 4100.00, RPM, 1h, C0h, 'OK'
607, Fan 3 FAN3, 67, Fan, Nominal, 4000.00, RPM, 1h, C0h, 'OK'
674, Fan 5 FANA, 69, Fan, Nominal, 4300.00, RPM, 1h, C0h, 'OK'
741, System Board 17 12V, 48, Voltage, Nominal, 12.00, V, 1h, C0h, 'OK'
808, System Board 33 5VCC, 49, Voltage, Nominal, 4.92, V, 1h, C0h, 'OK'
875, System Board 32 3.3VCC, 50, Voltage, Nominal, 3.25, V, 1h, C0h, 'OK'
942, System Board 18 VBAT, 51, Voltage, Nominal, 3.05, V, 1h, C0h, 'OK'
1009, Processor 2 Vcpu, 52, Voltage, Nominal, 1.81, V, 1h, C0h, 'OK'
1076, Memory Device 1 VDIMMAB, 53, Voltage, Nominal, 1.19, V, 1h, C0h, 'OK'
1143, Memory Device 2 VDIMMCD, 55, Voltage, Nominal, 1.21, V, 1h, C0h, 'OK'
1210, System Board 15 5VSB, 56, Voltage, Nominal, 4.97, V, 1h, C0h, 'OK'
1277, System Board 16 3.3VSB, 57, Voltage, Nominal, 3.20, V, 1h, C0h, 'OK'
1344, System Board 19 1.5V PCH, 60, Voltage, Nominal, 1.51, V, 1h, C0h, 'OK'
1411, System Board 20 1.2V BMC, 61, Voltage, Nominal, 1.22, V, 1h, C0h, 'OK'
1478, System Board 21 1.05V PCH, 62, Voltage, Nominal, 1.04, V, 1h, C0h, 'OK'
1545, System Chassis Chassis Intru, 170, Physical Security, Nominal, N/A, N/A, 6Fh, 0h, 'OK'

But no information for the DIMMA1, A2 and B2, because they are not plug-in. So I trace the code of impi-monitoring-sensor.c

if ((sensor_count = ipmi_monitoring_sensor_readings_by_record_id (ctx,
                                                                  hostname,
                                                                  ipmi_config,
                                                                  sensor_reading_flags,
                                                                  NULL, /* record_ids */
                                                                  0,    /* record_ids_length */
                                                                  NULL,
                                                                  NULL)) < 0)

and the config

static void
_init_ipmi_config (struct ipmi_monitoring_ipmi_config *ipmi_config)
{
  assert (ipmi_config);

  ipmi_config->driver_type = driver_type;
  ipmi_config->disable_auto_probe = disable_auto_probe;
  ipmi_config->driver_address = driver_address;
  ipmi_config->register_spacing = register_spacing;
  ipmi_config->driver_device = driver_device;

  ipmi_config->protocol_version = protocol_version;
  ipmi_config->username = username;
  ipmi_config->password = password;
  ipmi_config->k_g = k_g;
  ipmi_config->k_g_len = k_g_len;
  ipmi_config->privilege_level = privilege_level;
  ipmi_config->authentication_type = authentication_type;
  ipmi_config->cipher_suite_id = cipher_suite_id;
  ipmi_config->session_timeout_len = session_timeout;
  ipmi_config->retransmission_timeout_len = retransmission_timeout;

  ipmi_config->workaround_flags = workaround_flags;
}

I can assume the motherboard has 4 DIMM slot, and if they are not found in the FreeIPMI sensor output, I can guess they are not been plug-in. But how do I know the all DIMM slot in the motherboard by IPMI command?

charles.cc.hsu
  • 689
  • 11
  • 15
  • What is the motherboard? Where the IPMI is implemented? I see no standard temperature sensor on consumer DIMM modules, there is only memory and small SPD EEPROM chip for model and timings, how it is possible to get temperature of memory? What if the "DIMM temperature" comes not from the DIMM module, or only some of modules have temperature sensor? Temperature should not be used to detect modules in DIMM slots. Probably, IPMI is not for DIMM detection (and DMI is - use dmidecode command on target linux with ssh). – osgx Jun 01 '17 at 00:00
  • As I understanding, there are SDR records read by IPMI sdr command, will get a linked list, one by one, contain the value and the name for each record. `Manufacturer: Supermicro Product Name: X10SDV-8C-TLN4F+` got from `sudo dmidecode -t 2`. – charles.cc.hsu Jun 01 '17 at 00:24
  • What `dmidecode` says about your dimms, their count and name (model)? – osgx Jun 01 '17 at 00:35
  • `Number Of Devices is 4, DDR4, Manufacturer: Undefined` by command `$sudo dmidecode --type memory` – charles.cc.hsu Jun 01 '17 at 05:53
  • Are there 4 DDR4 with any nonzero fields like "Installed size"? – osgx Jun 01 '17 at 12:00

1 Answers1

0

FreeIPMI maintainer here. Generically speaking, most of the tools in FreeIPMI will not output information about a sensor if it is "not available". (Internally, that maps to a variety of things that I won't detail.) It appears ipmitool outputs some sensor info by default regardless of availability.

Per your question regarding using an IPMI command. Using FreeIPMI's ipmi-sensors, you can see the remaining DIMMs by using -v (or possibly -vv).

Per your question in title regarding API, in the libipmimonitoring API, the key flag is IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS. Look for that in the example code and you'll probably see what to do.

Albert Chu
  • 313
  • 1
  • 5
  • I just compiled `ipmimonitoring-sensors.c` in `/freeipmi-1.5.5/contrib/libipmimonitoring`, and used the parameter you mentioned `-v` or `--v`, but it still not work. there are not information for the non-plugin DIMM. BTW, now we did not need the temperature of DIMM, we only want to know the DIMM type and slot information. So I've traced the source code of `dmidecode` to get that. See [Get hardware information from existed files in Linux using C](https://stackoverflow.com/a/44483790/3309645). – charles.cc.hsu Jun 14 '17 at 00:56
  • The -v option is for the ipmi-sensors tool, not the libipmimonitoring example. – Albert Chu Jun 14 '17 at 11:04