{"id":36706849,"url":"https://github.com/borball/redfish-bash","last_synced_at":"2026-01-12T11:43:31.880Z","repository":{"id":191656210,"uuid":"685091481","full_name":"borball/redfish-bash","owner":"borball","description":"Wrapper script(bash) of redfish API","archived":false,"fork":false,"pushed_at":"2025-07-10T13:06:55.000Z","size":37,"stargazers_count":6,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T20:19:00.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borball.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-30T13:53:40.000Z","updated_at":"2025-07-10T13:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcc8a31f-68da-4590-a8d5-97da4b0cb4ae","html_url":"https://github.com/borball/redfish-bash","commit_stats":null,"previous_names":["borball/redfish-bash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/borball/redfish-bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borball%2Fredfish-bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borball%2Fredfish-bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borball%2Fredfish-bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borball%2Fredfish-bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borball","download_url":"https://codeload.github.com/borball/redfish-bash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borball%2Fredfish-bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T11:43:31.821Z","updated_at":"2026-01-12T11:43:31.874Z","avatar_url":"https://github.com/borball.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redfish-bash\n\nA wrapper script of redfish API, tested on ZT/HPE/Dell/Sushy-tools servers.\n\n## Install\n\n- Note: Install yq with instruction: https://github.com/mikefarah/yq?tab=readme-ov-file#install\n- Note: Install jq(1.7+) with instruction: https://github.com/jqlang/jq?tab=readme-ov-file#installation\n\n```shell\ncurl -fsSL -o /usr/local/bin/redfish-bash.sh https://raw.githubusercontent.com/borball/redfish-bash/master/redfish-bash.sh\nchmod +x /usr/local/bin/redfish-bash.sh\n```\n\n## Usage\n\n```shell\nredfish-bash.sh\n```\n\n```shell\n# ./redfish-bash.sh\nUsage :   ./redfish-bash.sh command \u003cparameters\u003e\nAvailable commands: \n  -------------------------------------------\n  #login BMC\n  login [bmc]\n  login [bmc] [kvm_uuid]\n  -------------------------------------------\n  #bmc server context\n  #all servers:\n  servers\n  #current server\n  server\n  #use server N\n  server N\n  -------------------------------------------\n  #resource management\n  root\n  system\n  system \u003cjsonpath\u003e\n  manager\n  manager \u003cjsonpath\u003e\n  #BMC reset\n  bmc-reboot\n  bios\n  #read attributes\n  bios \u003cjsonpath\u003e\n  #modify attribute\n  bios \u003cattribute=value\u003e\n  eths\n  power\n  power on|off|restart|nmi\n  virtual-media\n  virtual-media insert \u003curl\u003e\n  virtual-media eject\n  boot-once-from-cd\n  secure-boot\n  secure-boot true|false\n  storage\n  storage \u003cID\u003e\n\nExamples: \n  ./redfish-bash.sh login https://192.168.13.146\n  ./redfish-bash.sh login https://192.168.13.146 [kvm_uuid]\n  ./redfish-bash.sh servers\n  ./redfish-bash.sh server\n  ./redfish-bash.sh server 0\n  ./redfish-bash.sh root\n  ./redfish-bash.sh system\n  ./redfish-bash.sh system Manufacturer,Model\n  ./redfish-bash.sh manager\n  ./redfish-bash.sh manager FirmwareVersion,PowerState,ManagerType\n  ./redfish-bash.sh bios\n  ./redfish-bash.sh bios Attributes.WorkloadProfile\n  ./redfish-bash.sh bios WorkloadProfile=vRAN\n  ./redfish-bash.sh eths\n  ./redfish-bash.sh power\n  ./redfish-bash.sh power on|off|restart|nmi\n  ./redfish-bash.sh virtual-media\n  ./redfish-bash.sh virtual-media insert http://192.168.58.15/iso/agent-130.iso\n  ./redfish-bash.sh virtual-media eject\n  ./redfish-bash.sh boot-once-from-cd\n  ./redfish-bash.sh secure-boot\n  ./redfish-bash.sh secure-boot true|false\n  ./redfish-bash.sh storage\n  ./redfish-bash.sh storage DA000000\n  ./redfish-bash.sh get\n  ./redfish-bash.sh get /redfish/v1/TelemetryService\nRun : ./redfish-bash.sh login before using other commands for the first time.\nBMC credential must be saved in $NETRC in following format\n    machine \u003cBMC_HOST\u003e login \u003cUSER_NAME\u003e password \u003cPASSWORD\u003e\n    default login \u003cUSER_NAME\u003e password \u003cPASSWORD\u003e\n```\n\n## Examples\n\n\n### login\n\nThe script uses credential in [netrc-file](https://everything.curl.dev/usingcurl/netrc.html) to access the redfish API.\n\nPrepare a file .bmc.netrc in your HOME folder before running the script.\n\n```shell\nredfish-bash.sh login https://192.168.13.146\n```\nExample:\n\n```shell\n# redfish-bash.sh login https://192.168.13.130\nlogin successful, will use this server for the following commands.\nindex: 1\nbmc: https://192.168.14.130\n\n## login to the BMC console simulated by sushy-tools:\n# redfish-bash.sh login https://192.168.58.15:8080 22222222-1111-1111-0000-000000000010\nlogin successful, will use this server for the following commands.\nindex: 2\nbmc: https://192.168.58.15:8080\n\n```\n\n### servers\nCheck all servers managed by redfish-bash:\n\n```shell\nredfish-bash.sh servers\n```\nExample:\n```\n# redfish-bash.sh servers\nfollowing server is being used:\n\n\nAll servers in the list:\n0   https://192.168.58.15:8080\n1   https://192.168.13.146\n2   https://192.168.13.147\n3   https://192.168.13.148\n4   https://192.168.13.149\n5   https://192.168.14.130\n6   https://192.168.14.131\n7   https://192.168.14.132\n8   https://192.168.14.133\nuse command 'server' to check the current server\nuse command 'server N' to switch the servers\n\n```\nCheck current server managed by redfish-bash:\n```shell\nredfish-bash.sh server \n```\nExample:\n```\n# redfish-bash.sh server \nfollowing server is being used:\n\n```\nSwitch to other server:\n```shell\nredfish-bash.sh server 1\n```\nExample:\n```\n# redfish-bash.sh server 1\nfollowing server will be used:\nindex: 1\nbmc: https://192.168.13.146\n```\n\n### root\nCheck all resources managed by redfish:\n```shell\nredfish-bash.sh root\n```\nExample on ZT server:\n```shell\n# redfish-bash.sh root\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#ServiceRoot.ServiceRoot\",\n  \"@odata.etag\": \"\\\"1710499398\\\"\",\n  \"@odata.id\": \"/redfish/v1\",\n  \"@odata.type\": \"#ServiceRoot.v1_5_2.ServiceRoot\",\n  \"AccountService\": {\n    \"@odata.id\": \"/redfish/v1/AccountService\"\n  },\n  \"CertificateService\": {\n    \"@odata.id\": \"/redfish/v1/CertificateService\"\n  },\n  \"Chassis\": {\n    \"@odata.id\": \"/redfish/v1/Chassis\"\n  },\n  \"CompositionService\": {\n    \"@odata.id\": \"/redfish/v1/CompositionService\"\n  },\n  \"Description\": \"The service root for all Redfish requests on this host\",\n  \"EventService\": {\n    \"@odata.id\": \"/redfish/v1/EventService\"\n  },\n  \"Id\": \"RootService\",\n  \"JsonSchemas\": {\n    \"@odata.id\": \"/redfish/v1/JsonSchemas\"\n  },\n  \"Links\": {\n    \"Sessions\": {\n      \"@odata.id\": \"/redfish/v1/SessionService/Sessions\"\n    }\n  },\n  \"Managers\": {\n    \"@odata.id\": \"/redfish/v1/Managers\"\n  },\n  \"Name\": \"Root Service\",\n  \"Oem\": {\n    \"Ami\": {\n      \"@odata.type\": \"#AMIServiceRoot.v1_0_0.AMIServiceRoot\",\n      \"InventoryDataStatus\": {\n        \"@odata.id\": \"/redfish/v1/Oem/Ami/InventoryData/Status\"\n      },\n      \"RtpVersion\": \"1.8.a\",\n      \"configurations\": {\n        \"@odata.id\": \"/redfish/v1/configurations\"\n      }\n    }\n  },\n  \"Product\": \"AMI Redfish Server\",\n  \"ProtocolFeaturesSupported\": {\n    \"ExcerptQuery\": true,\n    \"ExpandQuery\": {\n      \"ExpandAll\": false,\n      \"Levels\": false,\n      \"Links\": false,\n      \"MaxLevels\": 5,\n      \"NoLinks\": false\n    },\n    \"FilterQuery\": true,\n    \"OnlyMemberQuery\": true,\n    \"SelectQuery\": true\n  },\n  \"RedfishVersion\": \"1.8.0\",\n  \"Registries\": {\n    \"@odata.id\": \"/redfish/v1/Registries\"\n  },\n  \"SessionService\": {\n    \"@odata.id\": \"/redfish/v1/SessionService\"\n  },\n  \"Systems\": {\n    \"@odata.id\": \"/redfish/v1/Systems\"\n  },\n  \"Tasks\": {\n    \"@odata.id\": \"/redfish/v1/TaskService\"\n  },\n  \"TelemetryService\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService\"\n  },\n  \"UUID\": \"5a544443-4110-0031-3150-d04b30303633\",\n  \"UpdateService\": {\n    \"@odata.id\": \"/redfish/v1/UpdateService\"\n  },\n  \"Vendor\": \"AMI\"\n}\n```\n\nCheck endpoint of particular service(s):\n\n```shell\nredfish-bash.sh root Managers,Systems\n```\nExample:\n```shell\n# redfish-bash.sh root Managers,Systems\n{\n  \"Managers\": {\n    \"@odata.id\": \"/redfish/v1/Managers\"\n  },\n  \"Systems\": {\n    \"@odata.id\": \"/redfish/v1/Systems\"\n  }\n}\n```\n\nGet particular service(Manager):\n\n```\n# redfish-bash.sh get /redfish/v1/Managers\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#ManagerCollection.ManagerCollection\",\n  \"@odata.etag\": \"\\\"1710499398\\\"\",\n  \"@odata.id\": \"/redfish/v1/Managers\",\n  \"@odata.type\": \"#ManagerCollection.ManagerCollection\",\n  \"Description\": \"The collection for Managers\",\n  \"Members\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Managers/Self\"\n    }\n  ],\n  \"Members@odata.count\": 1,\n  \"Name\": \"Manager Collection\"\n}\n```\nGet particular service(System):\n```\n#redfish-bash.sh get /redfish/v1/Systems\n{\n  \"@Redfish.CollectionCapabilities\": {\n    \"@odata.type\": \"#CollectionCapabilities.v1_2_0.CollectionCapabilities\",\n    \"Capabilities\": [\n      {\n        \"CapabilitiesObject\": {\n          \"@odata.id\": \"/redfish/v1/Systems/Capabilities\"\n        },\n        \"Links\": {\n          \"RelatedItem\": [\n            {\n              \"@odata.id\": \"/redfish/v1/CompositionService/ResourceZones/1\"\n            }\n          ],\n          \"TargetCollection\": {\n            \"@odata.id\": \"/redfish/v1/Systems\"\n          }\n        },\n        \"UseCase\": \"ComputerSystemComposition\"\n      }\n    ]\n  },\n  \"@odata.context\": \"/redfish/v1/$metadata#ComputerSystemCollection.ComputerSystemCollection\",\n  \"@odata.etag\": \"\\\"1708975059\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems\",\n  \"@odata.type\": \"#ComputerSystemCollection.ComputerSystemCollection\",\n  \"Description\": \"Collection of Computer Systems\",\n  \"Members\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Systems/Self\"\n    }\n  ],\n  \"Members@odata.count\": 1,\n  \"Name\": \"Systems Collection\"\n}\n```\n\n### manager\n\nCheck all manager information:\n```shell\nredfish-bash.sh manager\n```\nExample on ZT:\n```\n## ZT\n# redfish-bash.sh manager\n{\n  \"@Redfish.Settings\": {\n    \"@odata.type\": \"#Settings.v1_2_2.Settings\",\n    \"SettingsObject\": {\n      \"@odata.id\": \"/redfish/v1/Systems/Self/Bios/SD\"\n    }\n  },\n  \"@odata.context\": \"/redfish/v1/$metadata#Bios.Bios\",\n  \"@odata.etag\": \"\\\"1708975059\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems/Self/Bios\",\n  \"@odata.type\": \"#Bios.v1_1_0.Bios\",\n  \"Actions\": {\n    \"#Bios.ChangePassword\": {\n      \"@Redfish.ActionInfo\": \"/redfish/v1/Systems/Self/Bios/ChangePasswordActionInfo\",\n      \"target\": \"/redfish/v1/Systems/Self/Bios/Actions/Bios.ChangePassword\"\n    },\n    \"#Bios.ResetBios\": {\n      \"@Redfish.ActionInfo\": \"/redfish/v1/Systems/Self/Bios/ResetBiosActionInfo\",\n      \"target\": \"/redfish/v1/Systems/Self/Bios/Actions/Bios.ResetBios\"\n    },\n    \"#ZtVga.ChangeState\": {\n      \"@Redfish.ActionInfo\": \"/redfish/v1/Systems/Self/Bios/ChangeStateActionInfo\",\n      \"target\": \"/redfish/v1/Systems/Self/Bios/Actions/ZtVga.ChangeState\"\n    }\n  },\n...\n```\n\nCheck particular manager attributes:\n```shell\nredfish-bash.sh manager FirmwareVersion,PowerState,ManagerType\n```\nExample on ZT:\n```shell\n# redfish-bash.sh manager FirmwareVersion,PowerState,ManagerType\n{\n  \"FirmwareVersion\": \"0.43.00\",\n  \"PowerState\": \"On\",\n  \"ManagerType\": \"BMC\"\n}\n```\nExample on HPE:\n```\n## HPE\n# redfish-bash.sh  manager\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#Manager.Manager\",\n  \"@odata.etag\": \"W/\\\"5DF7965A\\\"\",\n  \"@odata.id\": \"/redfish/v1/Managers/1\",\n  \"@odata.type\": \"#Manager.v1_5_1.Manager\",\n  \"Id\": \"1\",\n  \"Actions\": {\n    \"#Manager.Reset\": {\n      \"ResetType@Redfish.AllowableValues\": [\n        \"ForceRestart\",\n        \"GracefulRestart\"\n      ],\n      \"target\": \"/redfish/v1/Managers/1/Actions/Manager.Reset\"\n    }\n  },\n  \"CommandShell\": {\n    \"ConnectTypesSupported\": [\n      \"SSH\",\n      \"Oem\"\n    ],\n    \"MaxConcurrentSessions\": 9,\n    \"ServiceEnabled\": true\n  },\n  \"DateTime\": \"2024-03-15T17:27:53Z\",\n  \"DateTimeLocalOffset\": \"+00:00\",\n  \"EthernetInterfaces\": {\n    \"@odata.id\": \"/redfish/v1/Managers/1/EthernetInterfaces\"\n  },\n  \"FirmwareVersion\": \"iLO 5 v2.81\",\n...\n```\n\nCheck particular manager attributes on HPE:\n```shell\n# redfish-bash.sh manager FirmwareVersion,PowerState,ManagerType\n{\n  \"FirmwareVersion\": \"iLO 5 v2.81\",\n  \"PowerState\": null,\n  \"ManagerType\": \"BMC\"\n}\n```\n\nCheck all manager information on Dell:\n\n```shell\n## Dell\n$ redfish-bash.sh manager\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#Manager.Manager\",\n  \"@odata.id\": \"/redfish/v1/Managers/iDRAC.Embedded.1\",\n  \"@odata.type\": \"#Manager.v1_17_0.Manager\",\n  \"Actions\": {\n    \"#Manager.Reset\": {\n      \"ResetType@Redfish.AllowableValues\": [\n        \"GracefulRestart\"\n      ],\n      \"target\": \"/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Manager.Reset\"\n    },\n    \"#Manager.ResetToDefaults\": {\n      \"ResetType@Redfish.AllowableValues\": [\n        \"ResetAll\",\n        \"PreserveNetworkAndUsers\"\n      ],\n      \"target\": \"/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Manager.ResetToDefaults\"\n    },\n...\n```\n\nCheck particular manager attributes on Dell:\n```shell\n# redfish-bash.sh manager FirmwareVersion,PowerState,ManagerType\n{\n  \"FirmwareVersion\": \"7.00.30.00\",\n  \"PowerState\": \"On\",\n  \"ManagerType\": \"BMC\"\n}\n\n```\n\n### system\n\nCheck all system information on ZT:\n\n```\n## ZT\n# redfish-bash.sh system\n{\n  \"@Redfish.Settings\": {\n    \"@odata.type\": \"#Settings.v1_2_2.Settings\",\n    \"SettingsObject\": {\n      \"@odata.id\": \"/redfish/v1/Systems/Self/SD\"\n    }\n  },\n  \"@odata.context\": \"/redfish/v1/$metadata#ComputerSystem.ComputerSystem\",\n  \"@odata.etag\": \"\\\"1708975059\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems/Self\",\n  \"@odata.type\": \"#ComputerSystem.v1_8_0.ComputerSystem\",\n  \"Actions\": {\n    \"#ComputerSystem.Reset\": {\n      \"@Redfish.ActionInfo\": \"/redfish/v1/Systems/Self/ResetActionInfo\",\n      \"@Redfish.OperationApplyTimeSupport\": {\n        \"@odata.type\": \"#Settings.v1_2_2.OperationApplyTimeSupport\",\n        \"MaintenanceWindowDurationInSeconds\": 600,\n        \"MaintenanceWindowResource\": {\n          \"@odata.id\": \"/redfish/v1/Systems/Self\"\n        },\n        \"SupportedValues\": [\n          \"Immediate\",\n          \"AtMaintenanceWindowStart\"\n        ]\n      },\n      \"ResetType@Redfish.AllowableValues\": [\n        \"Nmi\",\n        \"On\",\n        \"ForceRestart\",\n        \"ForceOff\",\n        \"GracefulShutdown\"\n      ],\n      \"target\": \"/redfish/v1/Systems/Self/Actions/ComputerSystem.Reset\"\n    }\n  },\n...\n```\n\nCheck particular system attributes on ZT:\n```shell\n{\n\"SystemType\": \"Physical\",\n\"Name\": \"Proteus I_Mix\",\n\"Manufacturer\": \"ZTSYSTEMS\"\n}\n```\n\nCheck all system information on HPE:\n```\n## HPE\n# redfish-bash.sh system\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#ComputerSystem.ComputerSystem\",\n  \"@odata.etag\": \"W/\\\"98A3D2D0\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems/1\",\n  \"@odata.type\": \"#ComputerSystem.v1_13_0.ComputerSystem\",\n  \"Id\": \"1\",\n  \"Actions\": {\n    \"#ComputerSystem.Reset\": {\n      \"ResetType@Redfish.AllowableValues\": [\n        \"On\",\n        \"ForceOff\",\n        \"GracefulShutdown\",\n        \"ForceRestart\",\n        \"Nmi\",\n        \"PushPowerButton\",\n        \"GracefulRestart\"\n      ],\n      \"target\": \"/redfish/v1/Systems/1/Actions/ComputerSystem.Reset\"\n    }\n  },\n...\n\n```\n\nCheck particular system attributes on HPE:\n```shell\n# redfish-bash.sh system SystemType,Name,Manufacturer\n{\n  \"SystemType\": \"Physical\",\n  \"Name\": \"Computer System\",\n  \"Manufacturer\": \"HPE\"\n}\n```\n\nCheck all system information on Dell:\n```\n## Dell\n# redfish-bash.sh system\n{\n  \"@Redfish.Settings\": {\n    \"@odata.context\": \"/redfish/v1/$metadata#Settings.Settings\",\n    \"@odata.type\": \"#Settings.v1_3_5.Settings\",\n    \"SettingsObject\": {\n      \"@odata.id\": \"/redfish/v1/Systems/System.Embedded.1/Settings\"\n    },\n    \"SupportedApplyTimes\": [\n      \"OnReset\"\n    ]\n  },\n  \"@odata.context\": \"/redfish/v1/$metadata#ComputerSystem.ComputerSystem\",\n  \"@odata.id\": \"/redfish/v1/Systems/System.Embedded.1\",\n  \"@odata.type\": \"#ComputerSystem.v1_20_0.ComputerSystem\",\n  \"Actions\": {\n    \"#ComputerSystem.Reset\": {\n      \"target\": \"/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset\",\n      \"ResetType@Redfish.AllowableValues\": [\n        \"On\",\n        \"ForceOff\",\n        \"ForceRestart\",\n        \"GracefulRestart\",\n        \"GracefulShutdown\",\n        \"PushPowerButton\",\n        \"Nmi\",\n        \"PowerCycle\"\n      ]\n    }\n  }\n...\n\n```\n\nCheck particular system attributes on Dell:\n```shell\n{\n  \"SystemType\": \"Physical\",\n  \"Name\": \"System\",\n  \"Manufacturer\": \"Dell Inc.\"\n}\n```\n\n### bios\n\nCheck BIOS settings:\n\n```shell\nredfish-bash.sh bios\n```\n\nBIOS settings on HPE:\n\n```shell\n# redfish-bash.sh bios\n{\n  \"@Redfish.Settings\": {\n    \"@odata.type\": \"#Settings.v1_0_0.Settings\",\n    \"ETag\": \"E9BA1662\",\n    ...\n    \"SettingsObject\": {\n      \"@odata.id\": \"/redfish/v1/systems/1/bios/settings/\"\n    },\n    \"Time\": \"2024-03-15T15:43:53+00:00\"\n  },\n  \"@odata.context\": \"/redfish/v1/$metadata#Bios.Bios\",\n  \"@odata.etag\": \"W/\\\"9D2EF994B025595959AECBAC77CFEBA9\\\"\",\n  \"@odata.id\": \"/redfish/v1/systems/1/bios/\",\n  \"@odata.type\": \"#Bios.v1_0_4.Bios\",\n  \"Actions\": {\n    \"#Bios.ChangePassword\": {\n      \"target\": \"/redfish/v1/systems/1/bios/settings/Actions/Bios.ChangePasswords/\"\n    },\n    \"#Bios.ResetBios\": {\n      \"target\": \"/redfish/v1/systems/1/bios/settings/Actions/Bios.ResetBios/\"\n    }\n  },\n  \"AttributeRegistry\": \"BiosAttributeRegistryH10.v1_1_66\",\n  \"Attributes\": {\n    \"AccessControlService\": \"Enabled\",\n    \"AcpiHpet\": \"Enabled\",\n    \"AcpiRootBridgePxm\": \"Enabled\",\n    \"AcpiSlit\": \"Enabled\",\n    \"AdjSecPrefetch\": \"Enabled\",\n    \"AdminEmail\": \"\",\n    \"AdminName\": \"\",\n    \"AdminOtherInfo\": \"\",\n    \"AdminPhone\": \"\",\n    \"AdvCrashDumpMode\": \"Disabled\",\n    \"AdvancedMemProtection\": \"Auto\",\n    \"AllowLoginWithIlo\": \"Disabled\",\n    \"AssetTagProtection\": \"Unlocked\",\n    \"AutoPowerOn\": \"RestoreLastState\",\n    \"BootMode\": \"Uefi\",\n    \"BootOrderPolicy\": \"RetryIndefinitely\",\n    \"CollabPowerControl\": \"Disabled\",\n    \"ConsistentDevNaming\": \"LomsAndSlots\",\n    \"CustomPostMessage\": \"\",\n    \"DaylightSavingsTime\": \"DaylightSavingsTimeDisabled\",\n    \"DcuIpPrefetcher\": \"Enabled\",\n    \"DcuStreamPrefetcher\": \"Enabled\",\n    \"DeadBlockPredictor\": \"Disabled\",\n...\n```\n\nCheck particular BIOS settings on HPE:\n\n```shell\n# redfish-bash.sh bios Attributes.Sriov,Attributes.WorkloadProfile\n{\n  \"Attributes\": {\n    \"Sriov\": \"Enabled\",\n    \"WorkloadProfile\": \"vRAN\"\n  }\n}\n```\n\nUpdate BIOS settings to disable SR-IOV:\n\n```shell\n# redfish-bash.sh bios Sriov=Disabled\n```\n\nUpdate BIOS settings to enable vRAN workload profile:\n\n```shell\n# redfish-bash.sh bios WorkloadProfile=vRAN\n```\n\n### power\n\nCheck power status:\n\n```\nredfish-bash.sh power\n```\nExample:\n```\n# redfish-bash.sh power\nOn\n```\n\nPower on:\n```\nredfish-bash.sh power on\n```\nExample:\n```shell\n# redfish-bash.sh power on\n204 https://192.168.18.171/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset\n```\nPower off:\n```\nredfish-bash.sh power off\n```\nExample:\n```shell\n# redfish-bash.sh power off\n204 https://192.168.18.171/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset\n```\n\nPower reset:\n```\nredfish-bash.sh power restart\n```\nExample:\n```shell\n# redfish-bash.sh power restart\n204 https://192.168.18.171/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset\n```\n\nPower nmi:\nThis will trigger NMI event to generate vmcore\n\n```shell\nredfish-bash.sh power nmi\n```\nExample:\n```shell\n# redfish-bash.sh power nmi\n204 https://192.168.18.171/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset\n```\n\n### virtual-media\n\nCheck current virtual-media status:\n\n```shell\nredfish-bash.sh virtual-media\n```\nExample:\n```shell\n# redfish-bash.sh virtual-media\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#VirtualMedia.VirtualMedia\",\n  \"@odata.etag\": \"W/\\\"14700DD6\\\"\",\n  \"@odata.id\": \"/redfish/v1/Managers/1/VirtualMedia/2\",\n  \"@odata.type\": \"#VirtualMedia.v1_3_0.VirtualMedia\",\n  \"Id\": \"2\",\n  \"Actions\": {\n    \"#VirtualMedia.EjectMedia\": {\n      \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/VirtualMedia.EjectMedia\"\n    },\n    \"#VirtualMedia.InsertMedia\": {\n      \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/VirtualMedia.InsertMedia\"\n    }\n  },\n  \"ConnectedVia\": \"NotConnected\",\n  \"Description\": \"Virtual Removable Media\",\n  \"Image\": \"\",\n  \"Inserted\": false,\n  \"MediaTypes\": [\n    \"CD\",\n    \"DVD\"\n  ],\n  \"Name\": \"VirtualMedia\",\n  \"Oem\": {\n    \"Hpe\": {\n      \"@odata.context\": \"/redfish/v1/$metadata#HpeiLOVirtualMedia.HpeiLOVirtualMedia\",\n      \"@odata.type\": \"#HpeiLOVirtualMedia.v2_2_0.HpeiLOVirtualMedia\",\n      \"Actions\": {\n        \"#HpeiLOVirtualMedia.EjectVirtualMedia\": {\n          \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.EjectVirtualMedia\"\n        },\n        \"#HpeiLOVirtualMedia.InsertVirtualMedia\": {\n          \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.InsertVirtualMedia\"\n        }\n      },\n      \"BootOnNextServerReset\": false\n    }\n  },\n  \"WriteProtected\": true\n}\n```\n\nMount ISO as a virtual-media:\n\n```shell\nredfish-bash.sh virtual-media insert http://192.168.58.15/iso/sno130.iso\n```\nExample:\n```shell\n# redfish-bash.sh virtual-media insert http://192.168.58.15/iso/sno130.iso\n{\"error\":{\"code\":\"iLO.0.10.ExtendedInfo\",\"message\":\"See @Message.ExtendedInfo for more information.\",\"@Message.ExtendedInfo\":[{\"MessageId\":\"Base.1.4.Success\"}]}}200 https://192.168.14.130/redfish/v1/Managers/1/VirtualMedia/2/Actions/VirtualMedia.InsertMedia\n```\n\nCheck status again:\n```shell\n# redfish-bash.sh virtual-media\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#VirtualMedia.VirtualMedia\",\n  \"@odata.etag\": \"W/\\\"091272C1\\\"\",\n  \"@odata.id\": \"/redfish/v1/Managers/1/VirtualMedia/2\",\n  \"@odata.type\": \"#VirtualMedia.v1_3_0.VirtualMedia\",\n  \"Id\": \"2\",\n  \"Actions\": {\n    \"#VirtualMedia.EjectMedia\": {\n      \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/VirtualMedia.EjectMedia\"\n    },\n    \"#VirtualMedia.InsertMedia\": {\n      \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/VirtualMedia.InsertMedia\"\n    }\n  },\n  \"ConnectedVia\": \"URI\",\n  \"Description\": \"Virtual Removable Media\",\n  \"Image\": \"http://192.168.58.15/iso/sno130.iso\",\n  \"ImageName\": \"sno130.iso\",\n  \"Inserted\": true,\n  \"MediaTypes\": [\n    \"CD\",\n    \"DVD\"\n  ],\n  \"Name\": \"VirtualMedia\",\n  \"Oem\": {\n    \"Hpe\": {\n      \"@odata.context\": \"/redfish/v1/$metadata#HpeiLOVirtualMedia.HpeiLOVirtualMedia\",\n      \"@odata.type\": \"#HpeiLOVirtualMedia.v2_2_0.HpeiLOVirtualMedia\",\n      \"Actions\": {\n        \"#HpeiLOVirtualMedia.EjectVirtualMedia\": {\n          \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.EjectVirtualMedia\"\n        },\n        \"#HpeiLOVirtualMedia.InsertVirtualMedia\": {\n          \"target\": \"/redfish/v1/Managers/1/VirtualMedia/2/Actions/Oem/Hpe/HpeiLOVirtualMedia.InsertVirtualMedia\"\n        }\n      },\n      \"BootOnNextServerReset\": false\n    }\n  },\n  \"TransferProtocolType\": \"HTTP\",\n  \"WriteProtected\": true\n}\n```\n\nEject virtual media:\n\n```shell\nredfish-bash.sh virtual-media eject\n```\nExample:\n```shell\n# redfish-bash.sh virtual-media eject\n{\"error\":{\"code\":\"iLO.0.10.ExtendedInfo\",\"message\":\"See @Message.ExtendedInfo for more information.\",\"@Message.ExtendedInfo\":[{\"MessageId\":\"Base.1.4.Success\"}]}}200 https://192.168.14.130/redfish/v1/Managers/1/VirtualMedia/2/Actions/VirtualMedia.EjectMedia\n```\n\n### eths\n\nCheck ethernet devices on the server:\n```shell\nredfish-bash.sh eths\n```\nExample:\n```shell\n# redfish-bash.sh eths\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#EthernetInterface.EthernetInterface\",\n  \"@odata.etag\": \"W/\\\"BF82DB05\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems/1/EthernetInterfaces/1\",\n  \"@odata.type\": \"#EthernetInterface.v1_4_1.EthernetInterface\",\n  \"Id\": \"1\",\n  \"FullDuplex\": false,\n  \"IPv4Addresses\": [],\n  \"IPv4StaticAddresses\": [],\n  \"IPv6AddressPolicyTable\": [],\n  \"IPv6Addresses\": [],\n  \"IPv6StaticAddresses\": [],\n  \"IPv6StaticDefaultGateways\": [],\n  \"InterfaceEnabled\": null,\n  \"LinkStatus\": null,\n  \"MACAddress\": \"b4:96:91:da:5a:ec\",\n  \"Name\": \"\",\n  \"NameServers\": [],\n  \"SpeedMbps\": null,\n  \"StaticNameServers\": [],\n  \"Status\": {\n    \"Health\": null,\n    \"State\": null\n  },\n  \"UefiDevicePath\": \"PciRoot(0x1)/Pci(0x2,0x0)/Pci(0x0,0x0)\"\n}...\n```\n\n### secure-boot\n\nCheck if secure boot is enabled on the node:\n```shell\nredfish-bash.sh secure-boot\n```\nExample:\n```shell\n# redfish-bash.sh secure-boot\nfalse\n```\n\nEnable secure-boot:\n```shell\nredfish-bash.sh secure-boot true\n```\nExample:\n```shell\n# redfish-bash.sh secure-boot true\n{\"@Message.ExtendedInfo\":[{\"Message\":\"The request completed successfully.\",\"MessageArgs\":[],\"MessageArgs@odata.count\":0,\"MessageId\":\"Base.1.12.Success\",\"RelatedProperties\":[],\"RelatedProperties@odata.count\":0,\"Resolution\":\"None\",\"Severity\":\"OK\"},{\"Message\":\"The operation is successfully completed.\",\"MessageArgs\":[],\"MessageArgs@odata.count\":0,\"MessageId\":\"IDRAC.2.9.SYS430\",\"RelatedProperties\":[],\"RelatedProperties@odata.count\":0,\"Resolution\":\"No response action is required.However, to make them immediately effective, restart the host server.\",\"Severity\":\"Informational\"}]}secure boot has been set as true, you may need to reboot the node to take effect.\n```\n\nDisable secure-boot:\n```shell\nredfish-bash.sh secure-boot false\n```\nExample:\n```shell\n# redfish-bash.sh secure-boot false\n{\"error\":{\"@Message.ExtendedInfo\":[{\"Message\":\"Unable to apply the configuration changes because an import or export operation is currently in progress.\",\"MessageArgs\":[\"SecureBootEnable\"],\"MessageArgs@odata.count\":1,\"MessageId\":\"IDRAC.2.9.SYS431\",\"RelatedProperties\":[\"#/SecureBootEnable\"],\"RelatedProperties@odata.count\":1,\"Resolution\":\"Wait for the current import or export operation to complete and retry the operation. If the issue persists, contact your service provider.\",\"Severity\":\"Warning\"},{\"Message\":\"Unable to complete the operation because the provider is not ready.\",\"MessageArgs\":[],\"MessageArgs@odata.count\":0,\"MessageId\":\"IDRAC.2.9.RAC0508\",\"RelatedProperties\":[],\"RelatedProperties@odata.count\":0,\"Resolution\":\"Wait for few minutes, refresh the page and retry. If the problem persists, reset the iDRAC and retry the operation.\",\"Severity\":\"Critical\"}],\"code\":\"Base.1.12.GeneralError\",\"message\":\"A general error has occurred. See ExtendedInfo for more information\"}}secure boot has been set as false, you may need to reboot the node to take effect.\n```\n\n### storage\n\nCheck storages:\n```shell\nredfish-bash.sh storage\n```\nExample:\n```shell\n# redfish-bash.sh storage\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#StorageCollection.StorageCollection\",\n  \"@odata.etag\": \"W/\\\"570254F2\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems/1/Storage\",\n  \"@odata.type\": \"#StorageCollection.StorageCollection\",\n  \"Description\": \"Storage subsystems known to this system\",\n  \"Name\": \"Storage\",\n  \"Members\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Systems/1/Storage/DA000000\"\n    },\n    {\n      \"@odata.id\": \"/redfish/v1/Systems/1/Storage/DA000001\"\n    }\n  ],\n  \"Members@odata.count\": 2\n}\n```\n\nCheck particular storage:\n\n```shell\nredfish-bash.sh storage DA000000\n```\nExample:\n```shell\n# redfish-bash.sh storage DA000000\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#Storage.Storage\",\n  \"@odata.etag\": \"W/\\\"836C2E84\\\"\",\n  \"@odata.id\": \"/redfish/v1/Systems/1/Storage/DA000000\",\n  \"@odata.type\": \"#Storage.v1_12_0.Storage\",\n  \"Id\": \"DA000000\",\n  \"Controllers\": {\n    \"@odata.id\": \"/redfish/v1/Systems/1/Storage/DA000000/Controllers\"\n  },\n  \"Drives\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Systems/1/Storage/DA000000/Drives/DA000000/\"\n    }\n  ],\n  \"Links\": {\n    \"Enclosures\": [\n      {\n        \"@odata.id\": \"/redfish/v1/Chassis/1\"\n      }\n    ]\n  },\n  \"Name\": \"NVMe Storage System\",\n  \"Status\": {\n    \"Health\": \"OK\",\n    \"State\": \"Enabled\"\n  },\n  \"StorageControllers\": [\n    {\n      \"@odata.id\": \"/redfish/v1/Systems/1/Storage/DA000000#/StorageControllers/0/\",\n      \"FirmwareVersion\": \"EDA7602Q\",\n      \"Identifiers\": [],\n      \"Location\": {\n        \"PartLocation\": {\n          \"LocationOrdinalValue\": 10,\n          \"LocationType\": \"Slot\",\n          \"ServiceLabel\": \"Slot 10\"\n        }\n      },\n      \"MemberId\": \"0\",\n      \"Model\": \"SAMSUNG MZ1LB1T9HALS-00007\",\n      \"Name\": \"NVMe Storage Controller\",\n      \"SerialNumber\": \"S436NA0R757299\",\n      \"Status\": {\n        \"Health\": \"OK\",\n        \"State\": \"Enabled\"\n      },\n      \"SupportedControllerProtocols\": [\n        \"PCIe\"\n      ],\n      \"SupportedDeviceProtocols\": [\n        \"NVMe\"\n      ]\n    }\n  ]\n}\n```\n\n### get\n\nIf any command above cannot satisfy your needs, you can use command 'get' to fetch the information:\n\n```shell\nredfish-bash.sh get\n```\nExample:\n\n```shell\n# redfish-bash.sh get\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#ServiceRoot.ServiceRoot\",\n  \"@odata.etag\": \"\\\"1710499398\\\"\",\n  \"@odata.id\": \"/redfish/v1\",\n  \"@odata.type\": \"#ServiceRoot.v1_5_2.ServiceRoot\",\n  \"AccountService\": {\n    \"@odata.id\": \"/redfish/v1/AccountService\"\n  },\n  \"CertificateService\": {\n    \"@odata.id\": \"/redfish/v1/CertificateService\"\n  },\n  \"Chassis\": {\n    \"@odata.id\": \"/redfish/v1/Chassis\"\n  },\n  \"CompositionService\": {\n    \"@odata.id\": \"/redfish/v1/CompositionService\"\n  },\n  \"Description\": \"The service root for all Redfish requests on this host\",\n  \"EventService\": {\n    \"@odata.id\": \"/redfish/v1/EventService\"\n  },\n  \"Id\": \"RootService\",\n  \"JsonSchemas\": {\n    \"@odata.id\": \"/redfish/v1/JsonSchemas\"\n  },\n  \"Links\": {\n    \"Sessions\": {\n      \"@odata.id\": \"/redfish/v1/SessionService/Sessions\"\n    }\n  },\n  \"Managers\": {\n    \"@odata.id\": \"/redfish/v1/Managers\"\n  },\n  \"Name\": \"Root Service\",\n  \"Oem\": {\n    \"Ami\": {\n      \"@odata.type\": \"#AMIServiceRoot.v1_0_0.AMIServiceRoot\",\n      \"InventoryDataStatus\": {\n        \"@odata.id\": \"/redfish/v1/Oem/Ami/InventoryData/Status\"\n      },\n      \"RtpVersion\": \"1.8.a\",\n      \"configurations\": {\n        \"@odata.id\": \"/redfish/v1/configurations\"\n      }\n    }\n  },\n  \"Product\": \"AMI Redfish Server\",\n  \"ProtocolFeaturesSupported\": {\n    \"ExcerptQuery\": true,\n    \"ExpandQuery\": {\n      \"ExpandAll\": false,\n      \"Levels\": false,\n      \"Links\": false,\n      \"MaxLevels\": 5,\n      \"NoLinks\": false\n    },\n    \"FilterQuery\": true,\n    \"OnlyMemberQuery\": true,\n    \"SelectQuery\": true\n  },\n  \"RedfishVersion\": \"1.8.0\",\n  \"Registries\": {\n    \"@odata.id\": \"/redfish/v1/Registries\"\n  },\n  \"SessionService\": {\n    \"@odata.id\": \"/redfish/v1/SessionService\"\n  },\n  \"Systems\": {\n    \"@odata.id\": \"/redfish/v1/Systems\"\n  },\n  \"Tasks\": {\n    \"@odata.id\": \"/redfish/v1/TaskService\"\n  },\n  \"TelemetryService\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService\"\n  },\n  \"UUID\": \"5a544443-4110-0031-3150-d04b30303633\",\n  \"UpdateService\": {\n    \"@odata.id\": \"/redfish/v1/UpdateService\"\n  },\n  \"Vendor\": \"AMI\"\n}\n```\n\n```shell\n# redfish-bash.sh get /redfish/v1/TelemetryService\n{\n  \"@odata.context\": \"/redfish/v1/$metadata#TelemetryService.TelemetryService\",\n  \"@odata.etag\": \"\\\"1710499398\\\"\",\n  \"@odata.id\": \"/redfish/v1/TelemetryService\",\n  \"@odata.type\": \"#TelemetryService.v1_2_1.TelemetryService\",\n  \"Actions\": {\n    \"#TelemetryService.SubmitTestMetricReport\": {\n      \"@Redfish.ActionInfo\": \"/redfish/v1/TelemetryService/SubmitTestMetricReportActionInfo\",\n      \"target\": \"/redfish/v1/TelemetryService/Actions/TelemetryService.SubmitTestMetricReport\"\n    }\n  },\n  \"Description\": \"TelemetryService\",\n  \"Id\": \"TelemetryService\",\n  \"LogService\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService/LogService\"\n  },\n  \"MaxReports\": 5,\n  \"MetricDefinitions\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService/MetricDefinitions\"\n  },\n  \"MetricReportDefinitions\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService/MetricReportDefinitions\"\n  },\n  \"MetricReports\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService/MetricReports\"\n  },\n  \"MinCollectionInterval\": \"PT5S\",\n  \"Name\": \"TelemetryService\",\n  \"ServiceEnabled\": true,\n  \"Status\": {\n    \"Health\": \"OK\",\n    \"State\": \"Enabled\"\n  },\n  \"SupportedCollectionFunctions\": [\n    \"Average\",\n    \"Maximum\",\n    \"Summation\",\n    \"Minimum\"\n  ],\n  \"SupportedCollectionFunctions@Redfish.AllowableValues\": [\n    \"Average\",\n    \"Maximum\",\n    \"Summation\",\n    \"Minimum\"\n  ],\n  \"Triggers\": {\n    \"@odata.id\": \"/redfish/v1/TelemetryService/Triggers\"\n  }\n}\n```\n\n\n## How to extend?\n\nCheck if you can do with the existing command(s), If yes maybe add a new example in the instruction. If Not, \nbased on what function you are going to add, consider which command name you are going to use, define the function in the script like below:\n\nyour_command_name(){\n  logic here\n}\n\nThen add usage or example in function usage(), that is it, then you can test it on your target server(s).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborball%2Fredfish-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborball%2Fredfish-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborball%2Fredfish-bash/lists"}