Code Monkey home page Code Monkey logo

entity-manager's Introduction

OpenBMC

Build Status

OpenBMC is a Linux distribution for management controllers used in devices such as servers, top of rack switches or RAID appliances. It uses Yocto, OpenEmbedded, systemd, and D-Bus to allow easy customization for your platform.

Setting up your OpenBMC project

1) Prerequisite

See the Yocto documentation for the latest requirements

Ubuntu

sudo apt install git python3-distutils gcc g++ make file wget \
    gawk diffstat bzip2 cpio chrpath zstd lz4 bzip2

Fedora

sudo dnf install git python3 gcc g++ gawk which bzip2 chrpath cpio \
    hostname file diffutils diffstat lz4 wget zstd rpcgen patch

2) Download the source

git clone https://github.com/openbmc/openbmc
cd openbmc

3) Target your hardware

Any build requires an environment set up according to your hardware target. There is a special script in the root of this repository that can be used to configure the environment as needed. The script is called setup and takes the name of your hardware target as an argument.

The script needs to be sourced while in the top directory of the OpenBMC repository clone, and, if run without arguments, will display the list of supported hardware targets, see the following example:

$ . setup <machine> [build_dir]
Target machine must be specified. Use one of:

ahe50dc                 harma                   s7106
bletchley               kudo                    s8036
daytonax                lannister               sbp1
dl360-g11               minerva                 spc621d8hm3
dl360poc                mori                    starscream
dl385-g11               mtjade                  system1
e3c246d4i               mtmitchell              tatlin-archive-x86
e3c256d4i               ncplite                 tiogapass
ethanolx                nicole                  transformers
evb-ast2500             olympus-nuvoton         vegman-n110
evb-ast2600             p10bmc                  vegman-rx20
evb-npcm750             palmetto                vegman-sx20
evb-npcm845             qcom-dc-scm-v1          witherspoon
f0b                     quanta-q71l             witherspoon-tacoma
fp5280g3                rl300-g11               x11spi
g220a                   romed8hm3               yosemite4
gbs                     romulus                 yosemitev2
genesis3                s2600wf                 zaius
greatlakes              s6q

Once you know the target (e.g. romulus), source the setup script as follows:

. setup romulus

4) Build

bitbake obmc-phosphor-image

Additional details can be found in the docs repository.

OpenBMC Development

The OpenBMC community maintains a set of tutorials new users can go through to get up to speed on OpenBMC development out here

Build Validation and Testing

Commits submitted by members of the OpenBMC GitHub community are compiled and tested via our Jenkins server. Commits are run through two levels of testing. At the repository level the makefile make check directive is run. At the system level, the commit is built into a firmware image and run with an arm-softmmu QEMU model against a barrage of CI tests.

Commits submitted by non-members do not automatically proceed through CI testing. After visual inspection of the commit, a CI run can be manually performed by the reviewer.

Automated testing against the QEMU model along with supported systems are performed. The OpenBMC project uses the Robot Framework for all automation. Our complete test repository can be found here.

Submitting Patches

Support of additional hardware and software packages is always welcome. Please follow the contributing guidelines when making a submission. It is expected that contributions contain test cases.

Bug Reporting

Issues are managed on GitHub. It is recommended you search through the issues before opening a new one.

Questions

First, please do a search on the internet. There's a good chance your question has already been asked.

For general questions, please use the openbmc tag on Stack Overflow. Please review the discussion on Stack Overflow licensing before posting any code.

For technical discussions, please see contact info below for Discord and mailing list information. Please don't file an issue to ask a question. You'll get faster results by using the mailing list or Discord.

Will OpenBMC run on my Acme Server Corp. XYZ5000 motherboard?

This is a common question, particularly regarding boards from popular COTS (commercial off-the-shelf) vendors such as Supermicro and ASRock. You can see the list of supported boards by running . setup (with no further arguments) in the root of the OpenBMC source tree. Most of the platforms supported by OpenBMC are specialized servers operated by companies running large datacenters, but some more generic COTS servers are supported to varying degrees.

If your motherboard is not listed in the output of . setup it is not currently supported. Porting OpenBMC to a new platform is a non-trivial undertaking, ideally done with the assistance of schematics and other documentation from the manufacturer (it is not completely infeasible to take on a porting effort without documentation via reverse engineering, but it is considerably more difficult, and probably involves a greater risk of hardware damage).

However, even if your motherboard is among those listed in the output of . setup, there are two significant caveats to bear in mind. First, not all ports are equally mature -- some platforms are better supported than others, and functionality on some "supported" boards may be fairly limited. Second, support for a motherboard is not the same as support for a complete system -- in particular, fan control is critically dependent on not just the motherboard but also the fans connected to it and the chassis that the board and fans are housed in, both of which can vary dramatically between systems using the same board model. So while you may be able to compile and install an OpenBMC build on your system and get some basic functionality, rough edges (such as your cooling fans running continuously at full throttle) are likely.

Features of OpenBMC

Feature List

  • Host management: Power, Cooling, LEDs, Inventory, Events, Watchdog
  • Full IPMI 2.0 Compliance with DCMI
  • Code Update Support for multiple BMC/BIOS images
  • Web-based user interface
  • REST interfaces
  • D-Bus based interfaces
  • SSH based SOL
  • Remote KVM
  • Hardware Simulation
  • Automated Testing
  • User management
  • Virtual media

Features In Progress

  • OpenCompute Redfish Compliance
  • Verified Boot

Features Requested but need help

  • OpenBMC performance monitoring

Finding out more

Dive deeper into OpenBMC by opening the docs repository.

Technical Steering Committee

The Technical Steering Committee (TSC) guides the project. Members are:

  • Benjamin Fair, Google
  • Patrick Williams, Meta
  • Roxanne Clarke, IBM
  • Sagar Dharia, Microsoft
  • Samer El-Haj-Mahmoud, Arm
  • Terry Duncan, Intel

Contact

entity-manager's People

Contributors

amboar avatar avenash-thambi avatar bjwyman avatar bradbishop avatar chaul-ampere avatar cyang29 avatar delphineccchiu avatar edtanous avatar feistjj avatar geissonator avatar hcl-bmc avatar howitzer105mm avatar jaehyoo avatar jayashree-d avatar jgeustaquio avatar kostr avatar krellan avatar nsolanki22 avatar patrickrudolph avatar potinlai avatar pstrinkle avatar quanta-yangchen avatar rashmicag avatar scron-chang avatar spinler avatar vijaykhemka avatar williamspatrick avatar yongli3 avatar zevweiss avatar zhikuiren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

entity-manager's Issues

Non IPMI-standard format FRU EEPROM support

I believe EM today supports parsing FRU EEPROMs in the standard format.

HPE servers (meta-hpe) have a FRU attached to the BMC on the baseboard that is not in the standard format but has some of the same types of data. In the HPE case, the manufacturer is assumed, and the EEPROM also contains the MAC addresses for the network controllers. So we are missing some info relative to the standard while adding additional non-standard fields, all in an HPE specific data structure.

Because of this specialized case, we created a customized service (based upon a trivial fork of EM) specifically to surface the HPE FRU EEPROM (https://github.com/HewlettPackard/openbmc-gxp-fru-device) as a dbus xyz.openbmc_project.FruDevice

It was suggested that we not keep a custom service for this, and merge into EM. I'm agreeable to this but would like thoughts on the best path forward. The most expedient path as best I can tell is to create an HPE specific build option that compiles our FRU support in. I'm also content to keep this in our separate service if the fit is not right.

sdr list can not be dynamic updated when the json config file changed.

my system has two BMCs , I need to switch the json configure files to provide two different SDR list. below is my solution:
under the entity-manager I prepared two json files(A/B) to dynamically replace BMCsensor_2U.json when the in Slot A or B
json files has been burnd to flash and can be found:

/run/initramfs/rw/cow/usr/share/entity-manager/configurations/ BMCsensor_2U.json
/run/initramfs/rw/cow/usr/share/entity-manager/configurations/ BMCsensor_2U.json
/run/initramfs/ro/usr/share/entity-manager/configurations/BMCsensor_2U.json
root@test:/usr/share/entity-manager/configurations# tree
|-- BMCsensor_2U.json
|-- BMCsensor_2U_A.json
|-- BMCsensor_2U_B.json

when in Slot A:
cp BMCsensor_2U_A.json BMCsensor_2U.json -af
change something to /etc/os-release let the json file fully reloaded.
systemctl restart xyz.openbmc_project.EntityManager.service
when in Slot B:
cp BMCsensor_2U_B.json BMCsensor_2U.json -af
change something to /etc/os-release let the json file fully reloaded.
systemctl restart xyz.openbmc_project.EntityManager.service

the issue I observed:
sometimes the BMCsensor_2U.json can not be replaced and can not be removed, reported "stale handle" even I stopped xyz.openbmc_project.EntityManager.service
sometimes BMCsensor_2U.json can be replaced by A or B, but ipmitool sdr list is still kept old.

my question: is my solution reasonable? or is it a known issue?

Not support FAN dual rotator to one present pin

Hi All,

I am working on to add dual-rotor fans in my BMC. I added the below code. But the Fan_#_b does not have present property(cause of the present pin could use only one) , it will trigger the under threshold event due to no present judgment.

How do support dual-rotor in same present pin?

{
    "Exposes": [
        {
            "Name": "Node Manager Sensor",
            "Type": "NMSensor"
        },
        {
            "Class": "AST2600-SRAM",
            "Name": "Chassis Intrusion Sensor",
            "Type": "ChassisIntrusionSensor"
        },
        {
            "BindConnector": "System Fan connector 1",
            "Index": 0,
            "MaxReading": 28000,
            "Name": "Fan 1 a",
            "Bus": 3,
            "Address": "0x20",
            "Presence": {
                "PinName": "FAN1_PRSNT_N",
                "Polarity": "Low"
            },
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 1",
            "Index": 1,
            "MaxReading": 28000,
            "Name": "Fan 1 b",
            "Bus": 3,
            "Address": "0x20",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 2",
            "Index": 2,
            "MaxReading": 28000,
            "Name": "Fan 2 a",
            "Bus": 3,
            "Address": "0x20",
            "Presence": {
                "PinName": "FAN2_PRSNT_N",
                "Polarity": "Low"
            },
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 2",
            "Index": 3,
            "MaxReading": 28000,
            "Name": "Fan 2 b",
            "Bus": 3,
            "Address": "0x20",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 3",
            "Index": 4,
            "MaxReading": 28000,
            "Name": "Fan 3 a",
            "Bus": 3,
            "Address": "0x20", 
            "Presence": {
                "PinName": "FAN3_PRSNT_N",
                "Polarity": "Low"
            },
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 3",
            "Index": 5,
            "MaxReading": 28000,
            "Name": "Fan 3 b",
            "Bus": 3,
            "Address": "0x20", 
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 4",
            "Index": 0,
            "MaxReading": 28000,
            "Name": "Fan 4 a",
            "Bus": 3,
            "Address": "0x23", 
            "Presence": {
                "PinName": "FAN4_PRSNT_N",
                "Polarity": "Low"
            },
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 4",
            "Index": 1,
            "MaxReading": 28000,
            "Name": "Fan 4 b",
            "Bus": 3,
            "Address": "0x23", 
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 5",
            "Index": 2,
            "MaxReading": 28000,
            "Name": "Fan 5 a",
            "Bus": 3,
            "Address": "0x23", 
            "Presence": {
                "PinName": "FAN5_PRSNT_N",
                "Polarity": "Low"
            },
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 5",
            "Index": 3,
            "MaxReading": 28000,
            "Name": "Fan 5 b",
            "Bus": 3,
            "Address": "0x23", 
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 6",
            "Index": 4,
            "MaxReading": 28000,
            "Name": "Fan 6 a",
            "Bus": 3,
            "Address": "0x23",
            "Presence": {
                "PinName": "FAN6_PRSNT_N",
                "Polarity": "Low"
            },
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "BindConnector": "System Fan connector 6",
            "Index": 5,
            "MaxReading": 28000,
            "Name": "Fan 6 b",
            "Bus": 3,
            "Address": "0x23", 
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "I2CFan"
        },
        {
            "Name": "System Fan connector 1",
            "PwmName": "Pwm1",
            "Pwm": 0,
            "Tachs": [
                0,1
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "System Fan connector 2",
            "PwmName": "Pwm2",
            "Pwm": 2,
            "Tachs": [
                2,3
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "System Fan connector 3",
            "PwmName": "Pwm3",
            "Pwm": 4,
            "Tachs": [
                4,5
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "System Fan connector 4",
            "PwmName": "Pwm4",
            "Pwm": 0,
            "Tachs": [
                0,1
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "System Fan connector 5",
            "PwmName": "Pwm5",
            "Pwm": 2,
            "Tachs": [
                2,3
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "System Fan connector 6",
            "PwmName": "Pwm6",
            "Pwm": 4,
            "Tachs": [
                4,5
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Class": "fan",
            "FFGainCoefficient": 5.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan_1_a",
                "Fan_2_a",
                "Fan_3_a",
                "Fan_4_a",
                "Fan_5_a",
                "Fan_6_a"
            ],
            "Name": "System_Fan",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 60.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm1",
                "Pwm2",
                "Pwm3",
                "Pwm4",
                "Pwm5",
                "Pwm6"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Zone1"
            ]
        },
        {
            "Class": "Floor",
            "Inputs": [
                "PCIe2_Inlet"
            ],
            "Name": "PCIe2_Inlet",
            "NegativeHysteresis": 1,
            "Output": [
                60.0,
                80.0
            ],
            "PositiveHysteresis": 0,
            "Reading": [
                60,
		        70
            ],
            "Type": "Stepwise",
            "Zones": [
                "Zone1"
            ]
        },
        {
            "FailSafePercent": 60,
            "MinThermalOutput": 60,
            "Name": "Zone1",
            "Type": "Pid.Zone"
        }
        
    ],
    "Name": "chassis",
    "Probe": [
        "TRUE"
    ],
    "Type": "Chassis",
    "xyz.openbmc_project.Inventory.Decorator.Asset": {
        "Manufacturer": "$PRODUCT_MANUFACTURER",
        "Model": "$PRODUCT_PRODUCT_NAME",
        "PartNumber": "$PRODUCT_PART_NUMBER",
        "SerialNumber": "$PRODUCT_SERIAL_NUMBER"
    },
    "xyz.openbmc_project.Inventory.Decorator.AssetTag": {
        "AssetTag": "$PRODUCT_ASSET_TAG"
    },
    "xyz.openbmc_project.Inventory.Item.System": {}
}

frudevice tries to create duplicated object

After apply this commit:
7fc486f

My platform will create duplicated object.

               .----------.     .--------.
.--------.     |   mux-   |-----| dev D1 |
|  root  |--+--|  locked  |     '--------'
'--------'  |  |  mux M1  |--.  .----------.
            |  '----------'  '--| MY FRU |
            |  .--------.       '----------'
            '--| dev D3 |
               '--------'

The root bus is 5, and MY FRU bus number is 50.
Can see that same object created under FruDevice

root@test:~# busctl --no-pager tree  xyz.openbmc_project.FruDevice
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/FruDevice
      |-/xyz/openbmc_project/FruDevice/MY_FRU
      `-/xyz/openbmc_project/FruDevice/MY_FRU_0

Is this right to create duplicate object?

cannot stat blocklist.json

| install: cannot stat '/home/james/git/openbmc-openbmc/build/tmp/work/arm1176jzs-openbmc-linux-gnueabi/entity-manager/0.1+git999-r0/blocklist.json': No such file or directory

Guessing this is @bradbishop's update to the meson file?

Persistent Sensor Threshold Change?

This is a question on the design. Should a sensor threshold change (i.e. Soft Shutdown) be persisted and survive BMC power cycle? It is the case with some vendor's proprietary BMC implementation.
Current OpenBMC accepts sensor threshold change from DBUS or 'ipmitool sensor thresh' command, but changes are not written back to /var/configuration/system.json, and settings will be reset after BMC power cycle.

How to describe i2c switch in json file

How to describe below i2c topology in json file?

i2c-0------- |--------------------|
             | PCA9548         ch0|----emc1413
             |                 ch1|----ina219
reset_pin----|--------------------|

Add-in card FRU behind MUX will be skipped in one situation

Commit : 7972bb9 (Stop reading devices that don't like it)

Found that this commit will cause add-in card FRU behind MUX to be skipped when the EEPROM address on add-in card is the same as the address on root bus.

e.g. There's an address 0x80 on root bus(bus 0) and there's an EEPROM address 0x80(bus 31) on add-in card behind MUX.
When failed to read bus 0 address 0x80 occurred, the address 0x80 on bus 31 won't be created on DBus and then cause user cannot read FRU content in add-on card via ipmitool fru print XX.

Could you help to comment on this issue.

isDevice16bit() is not work if ReScanBus happen.

I do ReScanBus and sometimes isDevice16bit() will detect CAT24C64 as 8bit EEPROM.
Rootcause:
When ReScanBus called, the address pointer of CAT24C64 is not move to first address.
And it fail to detect CAT24C64 is 16bit EEPROM.

Unable to activate FANs using Entity-manager.

Hi All,

I am working on to add fans in my BMC. As I am new to entity-manager, I have looked at other system's fan implementation. I have added the code. It seems I have not added code properly and I am getting improper output.
Please view my files and provide your comments.

I have created two .json file for baseboard and chassis.
I have created daytonax-baseboard.json and added content like this,

    "Exposes": [
        {
            "BindConnector": "System Fan connector 1",
            "Index": 0,
            "Name": "Fan 1a",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 1",
            "Index": 1,
            "Name": "Fan 1b",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 2",
            "Index": 2,
            "Name": "Fan 2a",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 2",
            "Index": 3,
            "Name": "Fan 2b",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 3",
            "Index": 4,
            "Name": "Fan 3a",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 3",
            "Index": 5,
            "Name": "Fan 3b",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 4",
            "Index": 6,
            "Name": "Fan 4a",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 4",
            "Index": 7,
            "Name": "Fan 4b",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 5",
            "Index": 8,
            "Name": "Fan 5a",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 5",
            "Index": 9,
            "Name": "Fan 5b",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 6",
            "Index": 10,
            "Name": "Fan 6a",
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "System Fan connector 6",
            "Index": 11,
            "Name": "Fan 6b",
            "Type": "AspeedFan"
        },
        {
            "Name": "2U System Fan connector 1",
            "Pwm": 1,
            "Status": "disabled",
            "Tachs": [
                0,
                1
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "2U System Fan connector 2",
            "Pwm": 2,
            "Status": "disabled",
            "Tachs": [
                2,
                3
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "2U System Fan connector 3",
            "Pwm": 3,
            "Status": "disabled",
            "Tachs": [
                4,
                5
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "2U System Fan connector 4",
            "Pwm": 4,
            "Status": "disabled",
            "Tachs": [
                6,
                7
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "2U System Fan connector 5",
            "Pwm": 5,
            "Status": "disabled",
            "Tachs": [
                8,
                9
            ],
            "Type": "IntelFanConnector"
        },
        {
            "Name": "2U System Fan connector 6",
            "Pwm": 6,
            "Status": "disabled",
            "Tachs": [
                10,
                11
            ],
            "Type": "IntelFanConnector"
        }, 
        {
            "Class": "fan",
            "FFGainCoefficient": 1.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan 1a",
                "Fan 1b"
            ],
            "Name": "Fan 1",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 100.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm 1"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Left"
            ]
        },
        {
            "Class": "fan",
            "FFGainCoefficient": 1.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan 2a",
                "Fan 2b"
            ],
            "Name": "Fan 2",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 100.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm 2"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Left"
            ]
        },
        {
            "Class": "fan",
            "FFGainCoefficient": 1.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan 3a",
                "Fan 3b"
            ],
            "Name": "Fan 3",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 100.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm 3"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Left"
            ]
        },
        {
            "Class": "fan",
            "FFGainCoefficient": 1.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan 4a",
                "Fan 4b"
            ],
            "Name": "Fan 4",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 100.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm 4"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Left"
            ]
        },
        {
            "Class": "fan",
            "FFGainCoefficient": 1.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan 5a",
                "Fan 5b"
            ],
            "Name": "Fan 5",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 100.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm 5"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Right"
            ]
        },
        {
            "Class": "fan",
            "FFGainCoefficient": 1.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan 6a",
                "Fan 6b"
            ],
            "Name": "Fan 6",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 100.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm 6"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Right"
            ]
        },          
        {
            "Address": "0x48",
            "Bus": 7,
            "Name": "MB_TEMP1",
            "Thresholds": [
                {
                    "Direction": "greater than",
                    "Name": "upper critical",
                    "Severity": 1,
                    "Value": 40000
                },
                {
                    "Direction": "greater than",
                    "Name": "upper non critical",
                    "Severity": 0,
                    "Value": 5000
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 38000
                },
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 0
                }
            ],
            "Type": "TMP112"
        }        
    ],
    "Name": "AMD Daytonax Baseboard",
    "Probe": "TRUE",    
    "Type": "Board",
    "xyz.openbmc_project.Inventory.Decorator.Asset": {
        "Manufacturer": "Quanta Cloud Technology Inc.",
        "Model": "QuantaGrid D52BQ-2U (3.5 LFF_SATA_SAS)",
        "PartNumber": "---",
        "SerialNumber": "ZU401000254"
    }    
}

I have created daytonax-chassis.json and added content like this,

    "Exposes": [
        {
            "BindConnector": "2U System Fan connector 1",
            "Index": 0,
            "Name": "Fan 1",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1750
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "2U System Fan connector 2",
            "Index": 1,
            "Name": "Fan 2",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1750
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "2U System Fan connector 3",
            "Index": 2,
            "Name": "Fan 3",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1750
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "2U System Fan connector 4",
            "Index": 3,
            "Name": "Fan 4",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1750
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "2U System Fan connector 5",
            "Index": 4,
            "Name": "Fan 5",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1750
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "AspeedFan"
        },
        {
            "BindConnector": "2U System Fan connector 6",
            "Index": 5,
            "Name": "Fan 6",
            "Thresholds": [
                {
                    "Direction": "less than",
                    "Name": "lower critical",
                    "Severity": 1,
                    "Value": 1750
                },
                {
                    "Direction": "less than",
                    "Name": "lower non critical",
                    "Severity": 0,
                    "Value": 2000
                }
            ],
            "Type": "AspeedFan"
        }                                  
    ],
    "Name": "AMD DaytonaX Chassis",
    "Probe": "FOUND('AMD Daytonax Baseboard')",
    "Type": "Chassis"
}

my phosphor-pid-control_%.bbappend will have content like this,


inherit obmc-phosphor-systemd

I am observing only current value of FANs and not all the values,
image

In the journal ctl log, I am observing this error,


-- Journal begins at Thu 1970-01-01 00:00:12 UTC. --
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 2"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 2"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 3"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 3"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 4"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 4"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 5"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 5"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 6"
Jul 20 14:46:10 daytonax entity-manager[267]: configuration file dependency error, could not find BindConnector "System Fan connector 6"

cross compile for entity-manager

how to fix the following cross compile issue?

the same cross compile environment-setup work fine for phosphor-state-manager, but there is the following issue existing in entity-manager.

$ echo ${CONFIGURE_FLAGS}
--target=arm-openbmc-linux-gnueabi --host=arm-openbmc-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/home/jienl/CPP_Workspace/openbmc/sdk/romulus-2019-10-09/sysroots/arm1176jzs-openbmc-linux-gnueabi

~/CPP_Workspace/openbmc/modify-entity-manager$ make
[ 2%] Performing update step for 'nlohmann-json'
[ 4%] No configure step for 'nlohmann-json'
[ 7%] No build step for 'nlohmann-json'
[ 9%] Performing install step for 'nlohmann-json'
[ 11%] Completed 'nlohmann-json'
[ 19%] Built target nlohmann-json
[ 21%] Performing update step for 'sdbusplus-project'
[ 23%] No configure step for 'sdbusplus-project'
[ 26%] Performing build step for 'sdbusplus-project'

  • AUTOCONF_FILES=Makefile.in aclocal.m4 ar-lib autom4te.cache compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing *libtool test-driver
  • autoreconf -vfi
    autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -Im4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /home/jienl/CPP_Workspace/openbmc/sdk/romulus-2019-10-09/sysroots/x86_64-oesdk-linux/usr/bin/autoconf --force autoreconf: running: /home/jienl/CPP_Workspace/openbmc/sdk/romulus-2019-10-09/sysroots/x86_64-oesdk-linux/usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:26: installing 'build-aux/compile' configure.ac:7: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' autoreconf: running: gnu-configize autoreconf: Leaving directory .'
  • echo Run "./configure ${CONFIGURE_FLAGS} && make"
    Run "./configure ${CONFIGURE_FLAGS} && make"
    configure: loading site script /home/jienl/CPP_Workspace/openbmc/sdk/romulus-2019-10-09/site-config-arm1176jzs-openbmc-linux-gnueabi
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make supports nested variables... (cached) yes
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in /home/jienl/CPP_Workspace/openbmc/modify-entity-manager/sdbusplus-src': configure: error: cannot run C++ compiled programs. If you meant to cross compile, use --host'.
    See `config.log' for more details
    CMakeFiles/sdbusplus-project.dir/build.make:111: recipe for target 'sdbusplus-project/src/sdbusplus-project-stamp/sdbusplus-project-build' failed
    make[2]: *** [sdbusplus-project/src/sdbusplus-project-stamp/sdbusplus-project-build] Error 1
    CMakeFiles/Makefile2:143: recipe for target 'CMakeFiles/sdbusplus-project.dir/all' failed
    make[1]: *** [CMakeFiles/sdbusplus-project.dir/all] Error 2
    Makefile:140: recipe for target 'all' failed
    make: *** [all] Error 2

Help for getting all the FRU's D-bus object paths dynamically .

D-bus service and object paths is given below,

image

Assume few extra object paths also will be present, like
+-/xyz/openbmc_project/FruDevice/F1UL16RISER3
+-/xyz/openbmc_project/FruDevice/FFPANEL
+-/xyz/openbmc_project/FruDevice/S_1100ADU00_201

How I can get all the object paths dynamically ?

For that "GetObject " method is required ?
"GetObject" method is not there in fru device. How to add this method?
image

There is any possibility to get all the object paths under /xyz/openbmc_project/FruDevice except "GetObject" method ?

`isDevice16bit` function works incorrectly for the 24LC128 EEPROM

AMD EthanolX CRB has 24LC128 EEPROM for its FRU data. This EEPROM is a 16-bit device. And it is not getting probed correctly if the EEPROM driver is not predeclared in the devicetree file or the driver is not initialized manually:

root@ethanolx:~# busctl tree xyz.openbmc_project.FruDevice
└─/xyz
  └─/xyz/openbmc_project
    └─/xyz/openbmc_project/FruDevice
      └─/xyz/openbmc_project/FruDevice/3_80
root@ethanolx:~# busctl introspect xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice/3_80
NAME                                         TYPE      SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Inventory.Item.I2CDevice interface -         -            -
.Address                                     property  u         80           emits-change
.Bus                                         property  u         3            emits-change
root@ethanolx:~# echo 24c128 0x50 > /sys/class/i2c-dev/i2c-3/device/new_device
root@ethanolx:~# busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus y 3
root@ethanolx:~# busctl tree xyz.openbmc_project.FruDevice
└─/xyz
  └─/xyz/openbmc_project
    └─/xyz/openbmc_project/FruDevice
      └─/xyz/openbmc_project/FruDevice/MY_PRODUCT
root@ethanolx:~# busctl introspect xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice/SP3
NAME                                TYPE      SIGNATURE RESULT/VALUE            FLAGS
...
xyz.openbmc_project.FruDevice       interface -         -                       -
.ADDRESS                            property  u         80                      emits-change
.BOARD_LANGUAGE_CODE                property  s         "25"                    emits-change
.BOARD_MANUFACTURER                 property  s         "MY_MANUFACTURER"       emits-change
.BOARD_MANUFACTURE_DATE             property  s         "2021-09-08 - 08:51:00" emits-change
.BOARD_PART_NUMBER                  property  s         "MY_PART_NUMBER"        emits-change
.BOARD_PRODUCT_NAME                 property  s         "MY_PRODUCT"            emits-change
.BOARD_SERIAL_NUMBER                property  s         "MY_SERIAL"             emits-change
.BUS                                property  u         3                       emits-change
.Common_Format_Version              property  s         "1"                     emits-change

The error comes from a fact that without a binded driver isDevice16Bit function (

static int isDevice16Bit(int file)
) returns 0 for this EEPROM and fru-device tries to parse it as a 8-bit EEPROM.
The isDevice16Bit function was initially added in the commit 2d681f6 But apparently it does not work well for all 16-bit EEPROMs.

entity-manager take up too many resources

CPU: 63% usr 35% sys 0% nic 0% idle 0% io 0% irq 0% sirq
Load average: 5.90 5.09 4.25 2/102 2848
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
1177 1 root R 10416 2% 55% /usr/bin/entity-manager
1182 1 root D 7808 2% 10% /usr/bin/fansensor
1180 1 root D 7432 2% 7% /usr/bin/adcsensor
1185 1 root D 7804 2% 6% /usr/bin/psusensor
1184 1 root S 6804 2% 3% /usr/bin/hwmontempsensor
2836 31946 root R 3116 1% 2% top
2210 1661 root S 3116 1% 1% top
343 340 messageb S 3696 1% 1% dbus-broker --log 4 --controller 9 --machine-id 734d44fa48f34a3a9a089754db3d802e --max-bytes 536870912 --max-fds 4096 --max-matches 16384 --audit
31929 1 root S 3752 1% 1% /usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -G priv-admin -B
973 1 root S 45060 11% 1% /usr/sbin/rsyslogd -n
171 1 root S 34072 8% 1% /lib/systemd/systemd-journald
426 1 root S 18040 4% 1% ipmid

Sep 27 08:37:09 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:09 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:09 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:09 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:11 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:11 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:11 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:11 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:11 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:11 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: run 604
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:15 BMC entity-manager[1177]: ~PerformScan 621
Sep 27 08:37:16 BMC entity-manager[1177]: ~PerformScan 630
Sep 27 08:37:16 BMC entity-manager[1177]: findDbusObjects 205
Sep 27 08:37:16 BMC entity-manager[1177]: run 604
Sep 27 08:37:17 BMC entity-manager[1177]: getInterfaces 86
Sep 27 08:37:17 BMC entity-manager[1177]: getInterfaces 86
Sep 27 08:37:17 BMC entity-manager[1177]: getInterfaces 86
Sep 27 08:37:17 BMC entity-manager[1177]: getInterfaces 86
Sep 27 08:37:17 BMC entity-manager[1177]: getInterfaces 86
Sep 27 08:37:17 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:17 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:17 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:17 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:17 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:17 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:18 BMC ipmid[426]: thresholdChanged: deassert
Sep 27 08:37:20 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:21 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:21 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:21 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:21 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:21 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus: Found probe match on /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:24 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:25 BMC entity-manager[1177]: run 604
Sep 27 08:37:25 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/BMC xyz.openbmc_project.FruDevice
Sep 27 08:37:25 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W_______ xyz.openbmc_project.FruDevice
Sep 27 08:37:25 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________0 xyz.openbmc_project.FruDevice
Sep 27 08:37:25 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________1 xyz.openbmc_project.FruDevice
Sep 27 08:37:25 BMC entity-manager[1177]: probeDBus /xyz/openbmc_project/FruDevice/CRPS1600W________2 xyz.openbmc_project.FruDevice
Sep 27 08:37:25 BMC entity-manager[1177]: ~PerformScan 621

Adding CPU and DIMM Inventory

I have a board that has the AST2500 BMC. I want to add the CPU and DIMM to entity-manager JSON files to monitor from WebUI. I don't see any documents to do this. How can I add the CPU and DIMM?

pca9546 without fru

I have a pca9546 with an address of 0x70 on my i2c2, and a tmp112 with an address of 0x49 is connected to each channel. How do I configure the json file?In dts, I configured it according to the doc document, but I don’t know how to configure the json file so that tmp112sensor corresponds to the channel
aliases {
i2c16 = &i2c_pe0;
i2c17 = &i2c_pe1;
i2c18 = &i2c_pe2;
i2c19 = &i2c_pe3;
};
&i2c2 {
status = "okay";
i2c-switch@70 {
compatible = "nxp,pca9546";
reg = <0x70>;
#address-cells = <1>;
#size-cells = <0>;
i2c-mux-idle-disconnect;

    i2c_pe0: i2c@0 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0>;
    };
    i2c_pe1: i2c@1 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <1>;
    };
    i2c_pe2: i2c@2 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <2>;
    };
    i2c_pe3: i2c@3 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <3>;
    };
};

};

please help me,thanks!

Convert severity fields in Thresholds into strings

At the moment severity fields are ints 0-4 which correspond one to one with a threshold type:

Threshold Severity
Warning 0
Critical 1
PerformanceLoss 2
SoftShutdown 3
HardShutdown 4

Change these to a string enum so it's clear which threshold is being used in config files. This will require updating the schema here, dbus-sensors and phosphor-virtual-sensors.

Cannot tree EntityManager dbus service

I have a working configuration of Entity Manager to detect a board using the FruDevice probe of its EEPROM, so Entity Manager creates the dbus inventory for the exposed FRU fields. I can tree EntityManager dbus service with these versions of openbmc and entity-manager repos,

openbmc SRCREV=708f0cc808588b2b08fcfce91271b2b5e9c9f827
entity-manager SRCREV=98063a4081498ef1840fb58c29e9134183f7d967

However, if I keep the configuration the same, but upgrade to a newer openbmc repo using a later entity-manager revision,

openbmc SRCREV=3f877c75b73e6d18a12f1ce2179b358fe7f92f36
entity-manager SRCREV=c76af0fb1defcc9cc3d000c1ca7592d0f01df2a1

Then a tree of xyz.openbmc_project.EntityManager will either not show the inventory, or it will fail to show any objects. FruDevice is still publishing EEPROM FRU to dbus for Entity Manager to probe.

Not showing inventory objects:

image

Fails to show any objects:

image

I realize that there are months of difference between the SRCREVs, and I am tracing the revisions to see what may cause the issue. Please help me determine the cause and the necessary changes to make.

Incorrect config file crash the service

I accidentally forgot the Name property for one E-M config file but was surprised to find the whole service was crashed and the bmc is accessible because the network service depends on the E-M.

It makes think if we can ignore the ill-formed single config and continue to processed the health ones. It would make the system more robust.

entity-manager terminated by 'std::filesystem::__cxx11::filesystem_error'

The issue is found by g220a's QEMU, that the entity-manager is terminated by 'std::filesystem::__cxx11::filesystem_error':

Jan 01 00:00:47 g220a entity-manager[312]: Clearing previous configuration
Jan 01 00:01:35 g220a entity-manager[312]: configuration file missing probe:
Jan 01 00:01:35 g220a entity-manager[312]:  {"buses":[]}
Jan 01 00:01:36 g220a entity-manager[312]: Inventory Added
Jan 01 00:01:36 g220a entity-manager[312]: terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
Jan 01 00:01:36 g220a entity-manager[312]:   what():  filesystem error: recursive directory iterator cannot open directory: No such file or directory [/sys/bus/i2c/devices/i2c-26]

The issue is introduced by 9b86787, if we revert the commit, the issue is gone.

Physical Topology associations are not generated for late detected Boards.

If we have two such configurations:

superchassis.json

{
    "Exposes": [
        {
            "Name": "Subchassis Upstream Port",
            "Type": "Subchassis Upstream Port"
        }
    ],
    "Name": "Superchassis",
    "Probe": "TRUE",
    "Type": "Board"
}

subchassis.json:

{
    "Exposes": [
        {
            "ConnectsToType": "Subchassis Upstream Port",
            "Name": "SubChassis Downstream Port",
            "Type": "DownstreamPort"
        }
    ],
    "Name": "Subchassis",
    "Probe": "TRUE",
    "Type": "Board"
}

For some reason if the subchassis is detected late, then the associations between the Boards are not generated.

I can see the Upstream and Downstream ports generated in busctl tree xyz.openbmc.EntityManager, but the associations are not actually added.

If i run systemctl restart xyz.openbmc.EntityManager then associations are added as normal.

"Restart=always" in FruDevice.service

Hi...

Our platform met the expiration of FruDevice.service at certain corner case.
1970-01-01T00:00:44.247760+00:00 OpenBMC.0.1.ServiceFailure,xyz.openbmc_project.FruDevice.service

We are debugging this issue, meanwhile, found FruDevice.service does not add ""Restart=always", so, if service is expired, no more trial of execution. Most of other services have this option, so, wondering whether it is robust to run FruDevice without this option ?

Bug in "Probe" logic in Entity Manager- while parsing Probe statements from EM configs

I recently discovered this little bug in the logic that parses the probe statement in Entity Manager, hence documenting it for visibility and can fix this later either by a creating an exclusive parser or some other parsing mechanism.

Bug Description:
The code line here in findProbeType() method call- https://github.com/openbmc/entity-manager/blob/master/src/entity_manager.cpp#L92 is
if probe.find(probeType->first) != std::string::npos) which fails if the probe statement has OR in it as it will find the first occurrence of the probeTypes in the string.

For instance: probe = xyz.openbmc_project.UsbDevice({'VENDOR_ID': '2frrr3'}) would fail to be probed and would be considered as a conjunction statement - since it has OR at 36th index (in vendOR_id).

probeType->first values are yielded from:

probeTypes{{{"FALSE", probe_type_codes::FALSE_T},
                {"TRUE", probe_type_codes::TRUE_T},
                {"AND", probe_type_codes::AND},
                {"OR", probe_type_codes::OR},
                {"FOUND", probe_type_codes::FOUND},
                {"MATCH_ONE", probe_type_codes::MATCH_ONE}}};

Now every time this function yields to true, the EM doesn't search the DBus for object paths and consider it as a conjunction statement such as OR, FOUND etc.

Current resolution:
Until this is fixed avoid having probeTypes character strings in the probe statements.

Potential fixes:

FruDevice does not create dbus object if FRU eprom is not in dts

When I had my FRU eprom defined in the dts file I had no issues. When I removed it from the dts and allowed fru-device to discover it on the bus I ran into an issue. After boot, all I see is
-/xyz/openbmc_project/FruDevice
-/xyz/openbmc_project/FruDevice/8_81
But if I restart FruDevice service the dbus object for my board gets created. After the restart, sometimes I see:
-/xyz/openbmc_project/FruDevice
|-/xyz/openbmc_project/FruDevice/8_81
-/xyz/openbmc_project/FruDevice/CNEdge
and other times I see:
-/xyz/openbmc_project/FruDevice
|-/xyz/openbmc_project/FruDevice/CNEdge

Memory leak in FruDevice

In BMC:

~#: ps -l | grep fru
S   UID   PID  PPID   VSZ   RSS TTY   STIME TIME     CMD
S     0   310     1 15716  **4756** 0:0   09:47 00:00:03 /usr/bin/fru-device

When continuously calling the ReScanBus method which under FruDevice:

~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5
~#: busctl call xyz.openbmc_project.FruDevice /xyz/openbmc_project/FruDevice xyz.openbmc_project.FruDeviceManager ReScanBus q 5

~#: ps -l | grep fru
S   UID   PID  PPID   VSZ   RSS TTY   STIME TIME     CMD
S     0   310     1 15716  **4764** 0:0   09:47 00:00:03 /usr/bin/fru-device

Long term continuous calling of ReScanBus method means a lot of memory leakage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.