### Secure Boot Resource GET Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/Systems/SecureBoot.md This is an example JSON response for a successful GET request to the Secure Boot resource. It includes details about the resource, actions, and links to related databases. ```json { "@odata.context": "/redfish/v1/$metadata#SecureBoot.SecureBoot", "@odata.id": "/redfish/v1/Systems/1/SecureBoot", "@odata.type": "#SecureBoot.v1_1_2.SecureBoot", "Id": "SecureBoot", "Name": "Secure Boot", "Description": "Secure Boot", "Actions": { "#SecureBoot.ResetKeys": { "ResetKeysType@Redfish.AllowableValues": [ "ResetAllKeysToDefault", "DeleteAllKeys" ], "target": "/redfish/v1/Systems/1/SecureBoot/Actions/SecureBoot.ResetKeys" } }, "SecureBootDatabases": { "@odata.id": "/redfish/v1/Systems/1/SecureBoot/SecureBootDatabases" } } ``` -------------------------------- ### Install QEMU Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/design_reference/key_feature/oee_ast2600.md Steps to download, extract, configure, build, and install QEMU from source. ```bash wget https://download.qemu.org/qemu-11.0.0.tar.xz tar xvJf qemu-11.0.0.tar.xz cd qemu-11.0.0 ./configure make -j8 make install ``` -------------------------------- ### Get Channel Payload Support Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/App-06h/4Eh-获取通道有效载荷支持状态(Get-Channel-Payload-Support).md This example demonstrates how to request the supported payload types for a channel using the ipmicmd tool. The response indicates which payload types are supported for standard, session setup, and OEM payloads. ```bash ipmicmd -k "0f 00 06 4e 01" smi 0 ``` ```bash 0f 07 00 4e 00 03 00 3f 00 00 00 00 00 ``` -------------------------------- ### Define and Initialize Application with Plugins and Services Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/api/app_api/libmcpp.md Demonstrates how to define custom services and plugins, register them with the application framework, initialize the application with command-line arguments, and start its event loop. Ensure all necessary dependencies are met before initialization. ```cpp #include // 定义服务 class my_service : public mc::service_base { public: static const char* service_type() { return "example.my_service"; } static void register_options(mc::po::options_description& cfg_opts) { cfg_opts.add_options() ("my_service.timeout", mc::po::value()->default_value(30), "超时时间(秒)"); } static const std::vector& dependencies() { static std::vector deps = {"logger"}; return deps; } bool init(mc::dict args) override { m_timeout = args.get("my_service.timeout").as(); return true; } bool start() override { set_state(mc::service_state::running); return true; } bool stop() override { set_state(mc::service_state::stopped); return true; } private: int m_timeout; }; // 定义插件 class my_plugin : public mc::plugin_base { public: static const char* plugin_name() { return "my_plugin"; } bool initialize() override { return true; } void startup() override {} void shutdown() override {} }; // 应用程序入口 int main(int argc, char** argv) { try { mc::application& app = mc::application::instance(); app.set_version("1.0.0"); app.register_plugin(); app.initialize(argc, argv); app.startup(); app.exec(); return 0; } catch (const std::exception& e) { std::cerr << "错误: " << e.what() << std::endl; return 1; } } ``` -------------------------------- ### Get Chassis Status Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-94h/6Eh-获取机框状态(6E-Get-Chassis-Status).md Example of an IPMI command request to get the chassis status. ```bash ipmicmd -k "0f 00 30 94 db 07 00 6E" smi 0 ``` -------------------------------- ### Get Channel Info Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/App-06h/42h-获取频道信息(Get-Channel-Info).md Example of a request to get channel information using the ipmicmd tool. ```bash ipmicmd -k "0f 00 06 42 01" smi 0 ``` -------------------------------- ### Start Activate Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/UpdateService/UpdateService.md Example response for the StartActivate action, indicating a running task for firmware activation. ```json { "@odata.context": "/redfish/v1/$metadata#TaskService/Tasks/Members/$entity", "@odata.type": "#Task.v1_0_2.Task", "@odata.id": "/redfish/v1/TaskService/Tasks/1", "Id": "1", "Name": "Active Task", "Description": "", "TaskState": "Running", "TaskStatus": "OK", "StartTime": "2016-11-28T10:36+00:00", "Messages": [], "PercentComplete": null, "Oem": { "Public": { "TaskPercentage": null } } } ``` -------------------------------- ### Start QEMU Simulation Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/design_reference/key_feature/oee_ast2600.md Command to launch QEMU system emulation for the AST2600-evb board with a specified image and no graphics. ```bash cd manifest/output qemu-system-arm -M ast2600-evb,boot-emmc=true \ -drive file=openUBMC_ast2600_real.img,format=raw,if=sd,index=2 \ -nographic ``` -------------------------------- ### Example LCN Device GET Request Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/LCNService/LCNDevice.md An example of a GET request to retrieve details for a specific LCN device, 'LinkBoard1'. The request includes the necessary URL and an example authentication token. ```http GET https://device_ip/redfish/v1/Oem/LCNService/LCNDevices/LinkBoard1 ``` ```http X-Auth-Token: ****** ``` -------------------------------- ### Dft Get Component Properties Command Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-90h/2Ch-Dft获取组件属性(Dft-Get-Component-Properities).md Example of how to send a request to get component properties and the expected response format. ```bash 请求: ipmicmd -k "0f 00 MM NN" smi 0 响应: 0f MM NN ``` -------------------------------- ### Computer System Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/csr_conf_dict/object/ComputerSystem.md A JSON example demonstrating the configuration for a ComputerSystem, including its ID and HostName. ```json { "ComputerSystem": { "Id": 1, "HostName": "compute-server" } } ``` -------------------------------- ### Get SEL Entry Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/Storage-0Ah/43h-获取SEL条目(Get-SEL-Entry).md Example of a request to get an SEL entry using ipmicmd. The command uses Storage NetFn (0Ah) and the Get SEL Entry command (43h). ```bash ipmicmd -k "0f 00 0A 43 00 00 00 00 00 ff" smi 0 ``` -------------------------------- ### Application Startup and Control Commands Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/design_reference/release_designs/openUBMC libmcpp特性设计说明书.md Commands to start the application with specified configuration and plugin directories, validate configuration files, and list available plugins. ```bash # 应用程序启动 ./bmcapp --config /etc/bmcapp/config.json --plugin-dir /usr/lib/bmcapp/plugins # 配置验证 ./bmcapp --validate-config /etc/bmcapp/config.json # 插件管理 ./bmcapp --list-plugins ./bmcapp --plugin-info sensor_plugin ``` -------------------------------- ### Dft Get System Health Event Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-90h/2Bh-Dft获取系统运行状况事件(Dft-Get-System-Health-Event).md Example of a request to get the system health event using the ipmicmd tool. ```bash ipmicmd -k "0f 00 30 90 db 07 00 2b 00 00" smi 0 ``` -------------------------------- ### POST Interface Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/en/development/develop_guide/feature_development/redfish_mapping_guide.md This is a complete example of the POST interface configuration, showing all possible parameters. ```json { "Uri": "/redfish/v1/Managers/:managerid/Actions/Oem/openUBMC/Manager.Dump", "Interfaces": [ { "Type": "POST", "LockdownAllow": true, "ResourceExist": { }, "ReqBody": { }, "RspBody": { }, "Statements": { }, "ProcessingFlow": [ ] } ] } ``` -------------------------------- ### Start Device Test Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-90h/09h-开始设备测试(Start-Device-Test).md This is a sample response received after executing the 'Start Device Test' command. The output indicates the test is in progress. ```text 00 DB 07 00 00 ``` -------------------------------- ### Get Message Command Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/App-06h/33h-获取消息(Get-Message).md Example of how to use the ipmicmd tool to get a message. The 'MM NN' placeholders should be replaced with specific values. ```bash ipmicmd -k "0f 00 MM NN" smi 0 ``` ```bash 0f MM NN ``` -------------------------------- ### Redfish Circuit GET Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/PowerEquipment/Circuit.md Example JSON response for a successful GET request to a Mains circuit resource, detailing its properties and status. ```json { "@odata.context": "/redfish/v1/$metadata#Circuit.Circuit", "@odata.id": "/redfish/v1/PowerEquipment/PowerShelves/1/Mains/1", "@odata.type": "#Circuit.v1_8_1.Circuit ", "Id": "1", "Name": "Mains Circuit 1", "CircuitType": "Mains", "PhaseWiringType": "ThreePhase5Wire", "NominalVoltage": null, "Status": { "State": "Enabled", "Health": "OK" } } ``` -------------------------------- ### Get DFT Test Item Command Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-90h/41h-获取测试项内容(Get-DFT-Test-Item).md Example of how to send the Get DFT Test Item command using ipmicmd and the expected response. ```bash [root@localhost ~]# ipmicmd -k "0f 00 30 90 41 00 20 01 01" smi 0 ``` ```text 0f 31 00 90 00 00 0b 00 00 00 00 00 46 6c 61 73 68 20 54 65 ``` ```text 73 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` ```text 00 00 ``` ```bash [root@localhost ~]# ``` -------------------------------- ### Start Firmware Upgrade via Command Line Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/api/app_api/firmware_mgmt.md Initiates a firmware upgrade using the `busctl` command. This example demonstrates how to specify the upgrade package path and additional options like forcing an update or staging the upgrade. ```text busctl --user call bmc.kepler.firmware_mgmt /bmc/kepler/UpdateService bmc.kepler.UpdateService StartUpgrade a{ss}is 3 Interface Busctl UserName Administrator ClientAddr 1 /tmp/openUBMC.hpm 响应:u 3 ``` -------------------------------- ### Get Sensor Type Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/SE-04h/2Fh-获取传感器类型(Get-Sensor-Type).md Example response for the Get Sensor Type IPMI command. The response indicates the completion code and sensor type. ```text 0f 02 01 ``` -------------------------------- ### Full Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/develop_guide/feature_development/SNMP_mapping_guide.md This is a comprehensive configuration example demonstrating the structure for SNMP resources, including URIs, sequences, and interfaces for GET and PATCH operations. ```json { "Resources": [ { "Uri": "/snmp/1.3.6.1.4.1.{{SnmpOemIdentifier}}.0.0.2/Devices/Readwrite", "Sequence": [ { "Name": "Id", "Type": "integer", "Access": "Readonly", "Primary": true }, { "Name": "Enabled", "Type": "integer", "Access": "Readwrite" } ], "Interfaces": [ { "Type": "GET", "RspBody": { "Devices": "${Statements/Devices()}" }, "Statements": { "Devices": { "Input": "${ProcessingFlow[1]/Destination/Devices}", "Steps": [ { "Type": "Expand", "Formula": "1" } ] } }, "ProcessingFlow": [ { "Type": "List", "Path": "/bmc/kepler/Devices", "Destination": { "Members": "Devices" } } ] }, { "Type": "PATCH", "ReqBody": { "Type": "object", "Required": true, "Properties": { "Id": { "Type": "integer", "Required": true }, "Enabled": { "Type": "integer" } } }, "ProcessingFlow": [ { "Type": "Property", "Path": "/bmc/kepler/Devices/${ReqBody/Id}", "Interface": "bmc.kepler.Device", "Source": { "Enabled": "${ReqBody/Enabled}" } } ] } ] }, { "Uri": "/bmc/kepler/Devices/:id", "Interfaces": [ { "Type": "GET", "RspBody": { "Id": "${Uri/id}", "Enabled": "${ProcessingFlow[1]/Destination/Enabled}" }, "ProcessingFlow": [ { "Type": "Property", "Path": "/bmc/kepler/Devices/${Uri/Id}", "Interface": "bmc.kepler.Device", "Destination": { "Enabled": "Enabled" } } ] } ] } ] } ``` -------------------------------- ### Get SOL Dest Name Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-94h/0Eh-获取SOL目的名(Get-SOL-Dest-Name).md Example of an IPMI command request to get the SOL destination name. This command is specific to OSCa servers. ```bash ipmicmd -k "0f 00 30 94 db 07 00 0e 01" smi 0 ``` -------------------------------- ### Configuration Examples Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/csr_conf_dict/object/DeviceChip.md Provides JSON examples for configuring the DeviceChip class in various scenarios, including standard VGA switching, multi-slot configurations, and different device types. ```APIDOC ## Configuration Examples ### Standard VGA Switching Configuration ```json { "DeviceChip": { "Slot": 0, "DeviceType": 1, "Chip": "#/Accessor_VGADftSwitch.Value" } } ``` ### Multi-Slot VGA Switching Configuration ```json { "DeviceChip": { "Slot": 1, "DeviceType": 1, "Chip": "#/Accessor_VGADftSwitch.Value" } } ``` ### Different Device Type Configuration ```json { "DeviceChip": { "Slot": 2, "DeviceType": 2, "Chip": "#/Accessor_VGADftSwitch.Value" } } ``` ``` -------------------------------- ### 初始化 QEMU 环境 Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/tool_guide/qemu_tool_guide.md 在首次使用 QEMU 前,需要执行此命令初始化环境。它会下载 BMC 固件运行所需的文件。请确保提供正确的 bmc_sdk.zip 文件路径和 openUBMC 社区用户名及密码。 ```bash cd manifest python3 init.py -path -user -psw ``` -------------------------------- ### Redfish Circuit GET Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/PowerEquipment/Circuit.md Example of an HTTP GET request to query a specific Mains circuit resource. Ensure the X-Auth-Token header is included for authentication. ```http GET https://device_ip/redfish/v1/PowerEquipment/PowerShelves/1/Mains/1 ``` -------------------------------- ### Full Power Management Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/csr_conf_dict/object/PowerManagement.md A comprehensive JSON configuration for all power management classes, including default values for PGSignal. ```json { "PowerButton": { "ShortPushButton": "#/Accessor_ShortPushButton.Value", "LongPushButton": "#/Accessor_LongPushButton.Value" }, "ACCycle": { "AC": "#/Accessor_AC.Value" }, "PGSignal": { "PowerGDState": "<=/Scanner_PowerGd.Value", "@Default": { "PowerGDState": 255 } }, "ButtonEvt": { "PowerBtnLock": "#/Accessor_PowerBtnLock.Value", "GetPowerBtnEvt": "<=/Scanner_PowerBtnEvt.Value", "SetPowerBtnEvt": "#/Accessor_PowerBtnEvt.Value", "PowerBtnShield": "#/Accessor_PowerBtnShield.Value" } } ``` -------------------------------- ### Account Service GET Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/AccountService/AccountService.md This is an example JSON response when querying the Account Service using a GET request. It details various account and security settings. ```json { "@odata.context": "/redfish/v1/$metadata#AccountService.AccountService", "@odata.id": "/redfish/v1/AccountService", "@odata.type": "#AccountService.v1_15_1.AccountService", "Id": "AccountService", "Name": "Account Service", "MinPasswordLength": 8, "MaxPasswordLength": 20, "AccountLockoutThreshold": 5, "AccountLockoutDuration": 300, "PasswordExpirationDays": null, "AccountLockoutCounterResetAfter": 300, "AuthFailureLoggingThreshold": 1, "HTTPBasicAuth": "Enabled", "LocalAccountAuth": "LoalFirst", "ServiceEnabled": true, "RequireChangePasswordAction": false, "Status": { "State": "Enabled", "Health": "OK" }, "Oem": { "Public": { "TlsVersion": ["Tls1.2","Tls1.3"], "OSUserManagementEnabled": true, "OSAdministratorPrivilegeEnabled": true, "PasswordValidityDays": null, "MinimumPasswordAgeDays": null, "UsernamePasswordCompareInfo": { "UsernamePasswordCompareEnabled": false, "UsernamePasswordCompareLength": 4 }, "PreviousPasswordsDisallowedCount": null, "SecurityBannerEnabled": true, "SecurityBanner": "information", "DefaultSecurityBanner": "WARNING! This system is PRIVATE and PROPRIETARY and may only be accessed by authorized users. Unauthorized use of the system is prohibited. The owner, or its agents, may monitor any activity or communication on the system. The owner, or its agents, may retrieve any information stored within the system. By accessing and using the system, you are consenting to such monitoring and information retrieval for law enforcement and other purposes.", "AccountInactiveTimelimit ": 0, "CLISessionTimeoutMinutes": 5, "PasswordComplexityCheckEnabled": true, "SSHPasswordAuthenticationEnabled": true, "CertificateOverdueWarningTime": 90, "EmergencyLoginUser": "", "TwoFactorAuthenticationInformation": { "RootCertificate": [ { "CertId": 1, "IssueBy": "CN=xxx, OU=IT, O=xxx, L=ShenZhen, S=GuangDong, C=CN", "IssueTo": "CN=xxx, OU=IT, O=xxx, L=ShenZhen, S=GuangDong, C=CN", "ValidFrom": "Jan 07 2017 GMT", "ValidTo": "Jan 05 2027 GMT", "SerialNumber": "e8 ff d7 e0 21 a3 01 96 ", "IsImportCrl": false, "SignatureAlgorithm": "sha256WithRSAEncryption", "KeyUsage": "Certificate Signing, CRL Sign", "PublicKeyLengthBits": 2048, "CrlValidFrom": null, "CrlValidTo": null } ] }, "SystemLockDownEnabled": false, "InitialAccountPrivilegeRestrictEnabled": false, "PasswordRulePolicy": "Default", "PasswordPattern": "", "InterChassisAuthentication": { "Enabled": false, "AccessRole": "Administrator" }, "Actions": { "#AccountService.ImportRootCertificate": { "target": "/redfish/v1/AccountService/Oem/Public/Actions/AccountService.ImportRootCertificate", "@Redfish.ActionInfo": "/redfish/v1/AccountService/ImportRootCertificateActionInfo" }, "#AccountService.DeleteRootCertificate": { "target": "/redfish/v1/AccountService/Oem/Public/Actions/AccountService.DeleteRootCertificate", "@Redfish.ActionInfo": "/redfish/v1/AccountService/DeleteRootCertificateActionInfo" }, "#AccountService.ImportCrl": { "target": "/redfish/v1/AccountService/Oem/Public/Actions/AccountService.ImportCrl", "@Redfish.ActionInfo": "/redfish/v1/AccountService/ImportCrlActionInfo" }, "#AccountService.DeleteCrl": { "target": "/redfish/v1/AccountService/Oem/Public/Actions/AccountService.DeleteCrl", "@Redfish.ActionInfo": "/redfish/v1/AccountService/DeleteCrlActionInfo" } }, "LdapService": { "@odata.id": "/redfish/v1/AccountService/LdapService" }, "KerberosService": { "@odata.id": "/redfish/v1/AccountService/KerberosService" } } }, "Accounts": { "@odata.id": "/redfish/v1/AccountService/Accounts" }, "LDAP": { "ServiceEnabled": true, "ServiceAddresses": [ "127.0.0.1" ], "Authentication": { "AuthenticationType": "UsernameAndPassword" }, "Certificates": { "@odata.id": "/redfish/v1/Managers/1/Certificates" } } } ``` -------------------------------- ### Simplified Power Management Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/csr_conf_dict/object/PowerManagement.md A minimal JSON configuration for power management, including only PowerButton and PGSignal. ```json { "PowerButton": { "ShortPushButton": "#/Accessor_ShortPushButton.Value", "LongPushButton": "#/Accessor_LongPushButton.Value" }, "PGSignal": { "PowerGDState": "<=/Scanner_PowerGd.Value" } } ``` -------------------------------- ### Get SEL Allocation Info Command Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/Storage-0Ah/41h-获取SEL分配信息(Get-SEL-Allocation-Info).md This example shows how to send the Get SEL Allocation Info command using ipmicmd and the expected response format. ```bash ipmicmd -k "0f 00 0A 41" smi 0 ``` ```text 0f 0b 00 41 00 d0 07 10 00 af 07 af 07 10 ``` -------------------------------- ### InfiniBandInterfaces GET Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/redfish/details/Systems/InfiniBandInterfaces.md This example shows how to make an HTTP GET request to retrieve InfiniBand interface information. Ensure you include the authentication token in the request header. ```http GET https://device_ip/redfish/v1/Systems/system_id/InfiniBandInterfaces/ib_id X-Auth-Token: 123456789*********************** ``` -------------------------------- ### CMakeLists.txt Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/develop_guide/app_development/build_process.md This CMakeLists.txt file sets the minimum required CMake version, project name, and demonstrates finding PkgConfig modules and setting variables. It also shows directory installation rules. ```cmake -- cmake最低版本需求 cmake_minimum_required(VERSION 3.14) -- 设置项目名称,后面可添加支持的语言,默认是C和C++ project(new_app) -- 查找PkgConfig模块,通过PkgConfig模块找到你想要找到的第三方库 find_package(PkgConfig REQUIRED) -- 用于查找PkgConfig格式的库信息 pkg_search_module(GLIB REQUIRED glib-2.0) ... -- 设置变量的值 set(TARGET_LIB ${PROJECT_NAME}) ... -- 指定安装时运行规则 install(DIRECTORY src/lualib DESTINATION ${APP_INSTALL_DIR} OPTIONAL) ... ``` -------------------------------- ### Get SEL Entry Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/Storage-0Ah/43h-获取SEL条目(Get-SEL-Entry).md Example of a response to the Get SEL Entry command. It includes the completion code, next SEL record ID, and record data. ```text 0f 0b 00 43 00 02 00 01 00 02 5b 0b ef 61 20 00 04 10 4e 6f 02 ff ff ``` -------------------------------- ### Method Call Examples with Signature Types Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/design_reference/key_feature/Busctl_command.md Demonstrates various method calls with their corresponding GVariant signature types, including creating accounts, sessions, setting time zones, and network configurations. ```bash busctl --user call bmc.kepler.iam /bmc/kepler/AccountService/Accounts bmc.kepler.AccountService.ManagerAccounts New a{sv}ysayyay 3 Interface s Web UserName s Administrator ClientAddr s 127.0.0.1 7 test7 11 65 100 109 105 110 64 57 48 48 48 48 4 1 2 ``` ```bash busctl --user call bmc.kepler.iam /bmc/kepler/SessionService/Sessions bmc.kepler.SessionService.Sessions NewSession a{ss}sayyssy 0 Administrator 11 65 100 109 105 110 64 57 48 48 48 48 0 LocaliBMC 192.168.1.1 0 ``` ```bash busctl --user set-property bmc.kepler.bmc_time /bmc/kepler/Managers/1 bmc.kepler.Managers.Time TimeZoneName s -- "-11:59" ``` ```bash busctl --user call bmc.kepler.bmc_network /bmc/kepler/bmc_network bmc.kepler.bmc_network SetIpMaskGateway sss 255.255.252.0 xx.xx.16.1 ``` -------------------------------- ### IPMI Get Sensor Threshold Request Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/SE-04h/27h-获取传感器阈值(Get-Sensor-Threshold).md Example of sending the Get Sensor Threshold command to an IPMI interface. This command requests threshold information for a specific sensor. ```bash ipmicmd -k "0f 00 04 27 01" smi 0 ``` -------------------------------- ### 修改 systemd 服务重启限制 Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/faq/SOL_FAQ.md 修改 /etc/systemd/system.conf 文件中的 DefaultStartLimitBurst 为 0,以取消服务重启次数限制。 ```bash DefaultStartLimitBurst=0 ``` -------------------------------- ### Basic Cooling Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/csr_conf_dict/object/CoolingConfig.md A JSON configuration for basic cooling settings, enabling smart cooling in energy-saving mode. ```json { "CoolingConfig_Basic": { "SmartCoolingState": "Enabled", "SmartCoolingMode": "EnergySaving", "LevelPercentRange": [20, 100], "InitLevelInStartup": 100, "DiskRowTemperatureAvailable": false, "SysHDDsMaxTemperature": 80.0, "SysSSDsMaxTemperature": 80.0, "SensorLocationSupported": false, "PIDControlMode": 1, "FanBoardNum": 1 } } ``` -------------------------------- ### Get Version Info Response Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-3Eh/07h-获取版本信息(Get-Version-Info).md Example IPMI response for the Get Version Info command. It includes the completion code, length of the version string, and the version string itself. ```text 0f 3f 00 07 00 0a 33 2e 30 31 2e 31 37 2e 34 33 ``` -------------------------------- ### Get Chip Status Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/OEM-30h/Cmd-90h/35h-获取芯片状态(Get-Chip-Status).md This snippet shows an example of how to use the ipmicmd to get the chip status. Ensure the correct NetFn, CMD, and Sub command values are used. ```bash [root@localhost ~]# ipmicmd -k "0f 00 30 93 DB 07 00 65 00 00" smi 0 00 DB 07 00 00 ``` -------------------------------- ### Run Local Development Server Source: https://github.com/openubmc/docs/blob/main/README.md Execute this command to start the local development server for the documentation. Access the documentation at http://localhost:5174/. ```shell npm run docs:dev ``` -------------------------------- ### PsuBoard Configuration Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/csr_conf_dict/object/PsuBoard.md A JSON configuration example for a PsuBoard, illustrating various hardware and software attributes. This includes identifiers, names, versions, and dynamic properties. ```json { "PsuBoard": { "Slot": 1, "UID": "00000001020302031825", "Name": "PSU_BOARD", "Manufacturer": "Huawei", "BoardType": "PsuBoard", "DeviceName": "PsuBoard${Slot}", "Position": "PSU${Slot}", "NodeId": "PSU${Slot}PsuBoard${Slot}", "PcbID": "#/Accessor_PcbID.Value", "LogicVersionID": "#/Accessor_LogicVersionID.Value", "RefMCUChip": "#/Chip_MCU1", "RefSMCChip": "#/Smc_PsuBoardSMC", "PowerWatts": 100 } } ``` -------------------------------- ### Get Chassis Status Command Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/Chassis-00h/01h-获取机框状态(Get-Chassis-Status).md This example shows how to send the Get Chassis Status command and the expected response format. The command requests the current status of the chassis. ```bash ipmicmd -k "0f 00 00 01" smi 0 ``` ```text 0f 01 00 01 00 41 00 44 00 ``` -------------------------------- ### Example: Default tosupporte Configuration Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/develop_guide/product_development/add_new_product.md Illustrates a default configuration for the 'tosupporte' field, specifying package name, build type, and required files for a release package. ```yml tosupporte: default: package_name: "openUBMC/openUBMC-CMT_${version}.zip" build_type: release files: - file: ${board_path}/version.xml # 注意:work_out中存储的是未经签名的hpm包,此处需要使用output_path目录经签名的hpm包 - file: "${output_path}/rootfs_${board_name}.hpm" dst: openUBMC-CMT_${version}.hpm ``` -------------------------------- ### Get System Interface Capabilities Example Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/App-06h/57h-获取系统接口功能(Get-System-Interface-Capabilities).md This example demonstrates how to use the ipmicmd tool to send the Get System Interface Capabilities command to the BMC and displays the expected response. ```bash ipmicmd -k "0f 00 06 57 01" smi 0 ``` ```text 0f 07 00 57 00 00 00 28 ``` -------------------------------- ### Example Response for Get User Access Source: https://github.com/openubmc/docs/blob/main/docs/zh/development/specifications/ipmi/details/App-06h/44h-获取BMC用户访问权限(Get-User-Access).md This is an example of a response received after executing the Get User Access command. The output indicates the status of user access permissions on the BMC. ```text 11 42 01 74 ```