From fc72d469b6cc76f24bc3b32beeb2d6a5ec7b8483 Mon Sep 17 00:00:00 2001 From: Tristan Smith Date: Sat, 23 Mar 2024 13:59:12 -0400 Subject: [PATCH] I wanted dynamic fan control on when powering off the server so the fans shut the fuck up --- server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.py b/server.py index 46d9afb..6ebdc84 100644 --- a/server.py +++ b/server.py @@ -20,6 +20,8 @@ def power_on(): def power_off(): print("Powering off the server...") execute_ipmi_command("chassis power off") + print("Enabling dynamic fan control...") + execute_ipmi_command("raw 0x30 0x30 0x01 0x01") def set_fan_speed(speed): print(f"Setting fan speed to {speed}%...") @@ -87,6 +89,7 @@ if args.power == 'on': power_on() elif args.power == 'off': power_off() + if args.fan is not None: set_fan_speed(args.fan)