I wanted dynamic fan control on when powering off the server so the fans shut the fuck up
This commit is contained in:
parent
ab1cb88e6a
commit
fc72d469b6
1 changed files with 3 additions and 0 deletions
|
@ -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}%...")
|
||||
|
@ -88,6 +90,7 @@ if args.power == 'on':
|
|||
elif args.power == 'off':
|
||||
power_off()
|
||||
|
||||
|
||||
if args.fan is not None:
|
||||
set_fan_speed(args.fan)
|
||||
|
||||
|
|
Loading…
Reference in a new issue