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():
|
def power_off():
|
||||||
print("Powering off the server...")
|
print("Powering off the server...")
|
||||||
execute_ipmi_command("chassis power off")
|
execute_ipmi_command("chassis power off")
|
||||||
|
print("Enabling dynamic fan control...")
|
||||||
|
execute_ipmi_command("raw 0x30 0x30 0x01 0x01")
|
||||||
|
|
||||||
def set_fan_speed(speed):
|
def set_fan_speed(speed):
|
||||||
print(f"Setting fan speed to {speed}%...")
|
print(f"Setting fan speed to {speed}%...")
|
||||||
|
@ -87,6 +89,7 @@ if args.power == 'on':
|
||||||
power_on()
|
power_on()
|
||||||
elif args.power == 'off':
|
elif args.power == 'off':
|
||||||
power_off()
|
power_off()
|
||||||
|
|
||||||
|
|
||||||
if args.fan is not None:
|
if args.fan is not None:
|
||||||
set_fan_speed(args.fan)
|
set_fan_speed(args.fan)
|
||||||
|
|
Loading…
Reference in a new issue