Skip to main content

Standalone command line tool to interact with Dell iDRAC and other BMCs via the Redfish REST API.

Project description

redfish_ctl

redfish_ctl is a standalone command-line tool I built to drive server BMCs entirely through the Redfish REST API — no web UI, no vendor GUI. It wraps 100+ subcommands behind one consistent CLI with JSON or YAML output (--yaml, and save-to-file), both synchronous and asynchronous calls, optional server-side $expand on large collection reads, and a read-first, guarded-write model (mutating commands preview with --dry_run and require --confirm). It is vendor-neutral by design — Dell iDRAC, Supermicro (including GB300 / Grace-Blackwell and X10), HPE iLO, and generic DMTF Redfish — built on a product-neutral Redfish client with the Dell/iDRAC specifics layered on top.

What it does across the whole server lifecycle:

  • Inventory & health — system, chassis, manager, processors, memory, PCI, storage, drives, network adapters/ports, NVLink ports, ethernet interfaces, and firmware inventory.
  • BIOS — read and stage attributes, pending management, the attribute registry, transactional snapshots/restore points for rollback, and curated tuning profiles (low-latency, Dell System/Workload, Intel, AMD).
  • Boot — boot order, one-time boot (UEFI or Legacy), boot sources, and next-boot inference.
  • Power & reset — vendor-neutral host reset / power-cycle (discovers ComputerSystem.Reset), chassis reset, manager reboot, and a guarded system-reset.
  • Storage & RAID — controllers, drives, volumes, the RAID service, RAID/non-RAID conversion, and volume initialize.
  • Virtual media & OS provisioning — mount/eject ISOs, one-shot ISO boot, Supermicro OEM virtual media (CfgCD), and Dell OEM network-ISO boot.
  • Serial console & SOL — report and enable host BIOS serial redirection together with the BMC Serial-over-LAN service, in one step, vendor-neutrally.
  • Sensors & telemetry — read every chassis sensor and TelemetryService report/definition, plus an out-of-band exporter that streams BMC metrics — including GB300 GPU, NVLink, thermal, and power — to Prometheus, SignalFx, and Splunk Observability.
  • Firmware — inventory and guarded UpdateService SimpleUpdate.
  • Accounts & security — create/update/delete accounts, SSH-key import, the account and privilege services, Secure Boot, and SPDM component-integrity attestation.
  • Jobs & tasks — Dell Lifecycle Controller jobs and the standard Redfish Job/Task services, with watch/apply/delete.
  • Config, logs & events — system config export/import, system and manager logs (SEL), test events, the BMC clock, and a wait that blocks until the BMC answers after a reboot.
  • Discovery — scan a subnet for BMCs, classify their vendor, and crawl a Redfish tree.

The tool was renamed from idrac_ctl to redfish_ctl. idrac_ctl still works as a backward-compatible alias — the idrac_ctl command, import idrac_ctl, and the legacy IDRAC_IP/IDRAC_USERNAME/IDRAC_PASSWORD/IDRAC_PORT env vars all keep working.

Author: Mus spyroot@gmail.com

Install

Use Python 3.10 or newer.

python -m pip install redfish_ctl
redfish_ctl --version

For local development, use the checked-in conda environment:

git clone https://github.com/spyroot/redfish_ctl.git
cd redfish_ctl
conda env create -f environment.yml
conda activate redfish_ctl

Connect

The CLI reads these environment variables in redfish_main.py, so I set them once per shell:

export REDFISH_IP=10.0.0.42
export REDFISH_USERNAME=root
export REDFISH_PASSWORD='your-password'
export REDFISH_PORT=443

BMCs usually ship self-signed certificates. TLS verification is off by default; use --verify-ssl only when the BMC has a certificate chain you trust.

First Safe Read

Start with the host ComputerSystem:

redfish_ctl system

A healthy response includes data.Id, data.Name, and usually data.PowerState. If you have jq installed, this is a compact smoke check:

redfish_ctl --nocolor system | jq '.data | {Id, Name, PowerState}'

Common Reads

redfish_ctl manager
redfish_ctl chassis
redfish_ctl sensors
redfish_ctl firmware_inventory
redfish_ctl bios --filter ProcCStates,SysMemSize
redfish_ctl storage-list
redfish_ctl get_vm
redfish_ctl logs

sensors, defined in redfish_ctl/sensors/cmd_sensors.py, follows Chassis sensor links and returns temperature, power, fan, and voltage readings with units. discovery, defined in redfish_ctl/discovery/cmd_discovery.py, is the heavier crawl that records what a BMC exposes.

Vendor Reach

Dell iDRAC is the main control target. Supermicro GB300, HPE iLO, and generic DMTF Redfish trees are covered by offline fixture corpora, with HPE also covered by the opt-in emulator canary in examples/hpe_ilo_canary.sh. The current support matrix is in Vendors.

Mutating Commands

Some commands change real hardware: power, BIOS, boot order, storage conversion, virtual media, firmware update, and manager reset. I always read current state first, preview when the command has --show or --dry_run, then verify after the job or task completes.

redfish_ctl system-reset --reset_type GracefulRestart --dry_run
redfish_ctl bios-change --from_spec specs/realtime.opt.spec.json on-reset --show
redfish_ctl firmware-update --image_uri https://example.invalid/firmware.exe --dry_run

Use --confirm only when you mean to perform a guarded action such as system-reset or firmware-update.

More Docs

  • Command reference - registered subcommands and safe workflow patterns.
  • Examples - one-line index of every script under examples/.
  • BIOS profiles - low-latency, Dell System Profile, custom, Intel, and AMD profile examples.
  • Vendors - Dell, Supermicro, HPE, and generic Redfish support.
  • Testing - offline mock tests, vendor corpora, emulator tests, and live-test safety.
  • Architecture - Redfish core, iDRAC layer, command registration, and known debt.
  • Telemetry exporter - BMC metrics for Prometheus and SignalFx.
  • Telemetry metrics - GB300 MetricReport/MetricReportDefinition reference catalog.
  • Releasing - local verification, package build, PyPI upload, and tagging.
  • Fleet proxy design - planned service/controller shape for fleet management.
  • Scaling and benchmarks - planned concurrency engine and benchmark goals.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redfish_ctl-1.1.0.tar.gz (165.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redfish_ctl-1.1.0-py3-none-any.whl (264.3 kB view details)

Uploaded Python 3

File details

Details for the file redfish_ctl-1.1.0.tar.gz.

File metadata

  • Download URL: redfish_ctl-1.1.0.tar.gz
  • Upload date:
  • Size: 165.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for redfish_ctl-1.1.0.tar.gz
Algorithm Hash digest
SHA256 0a142704c91fbb6e52103f27b9fa8523f91668949ff0a0a10ad3d55093dbe323
MD5 26061e62127de400c431168d53f18f90
BLAKE2b-256 256b73c1f71cc10dea21bfe33d93ef2381dc29cc9d2dadec2044eb33caf29f10

See more details on using hashes here.

File details

Details for the file redfish_ctl-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: redfish_ctl-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 264.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for redfish_ctl-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8de20639ece9ec6f95124b68288c13647a6d8cd03fb0dc1d97bea9346cc1f605
MD5 5aa682cb4e479a302791b93e52e08aef
BLAKE2b-256 ac135cc916d5786f1192533847c174300f0040449bac1ebb9e476d28ac0a4884

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page