1# Fan Control tool 2 3A tool that enables a user to view the status of a system in regard to fan 4control including the ability to manually set the fans to a desired RPM (or 5PWM if supported by the system). This tool has been tested against systems 6utilizing the phosphor-fan-presence repository set of fan applications (i.e. 7romulus, witherspoon, etc...) and is not warranted to work on systems using 8some other set of BMC fan applications. 9 10## Intention 11 12The intention of this tool is to temporarily stop the automatic fan control 13algorithm and allow the user to manually set the fans within the system chassis 14to a given target. Once a user no longer has a need to manually control the 15fans, the resume operation re-enables and restarts the phosphor-fan-control 16service. The status command provides a simple way to get the status of the fans 17along with the the main system states and fan control systemd service, while the 18reload command is available to commit JSON changes made to config files 19(YAML-based configurations are not reloadable). 20 21Note: In the case where a system does not have an active fan control algorithm 22enabled yet, an intended safe fan target should be set prior to resuming. 23 24## Usage 25 26``` 27NAME 28 fanctl - Manually control, get fan tachs, view status, reload config, 29 and resume automatic control of all fans within a chassis. 30 31SYNOPSIS 32 fanctl [OPTION] 33 34OPTIONS 35set <TARGET> [TARGET SENSOR LIST] 36 <TARGET> 37 - RPM/PWM target to set the fans 38 [TARGET SENSOR LIST] 39 - space-delimited list of target sensors to set 40get 41 - Get the current fan target and feedback speeds for all rotors 42status 43 - Get the full system status in regard to fans 44reload 45 - Reload phosphor-fan configuration JSON files (YAML configuration not 46 supported) 47resume 48 - Resume automatic fan control 49 * Note: In the case where a system does not have an active fan control 50 algorithm enabled yet, an intended safe fan target should be set 51 prior to resuming 52help 53 - Display this help and exit 54``` 55 56## Examples: 57 58- Set all fans to a target value (The tool determines whether the machine is 59 using RPM or PWM fan speeds, and sets them to the value provided): 60 > fanctl set 10500 61 62- Set only fan_0, fan1_0, fan2_0 to target 8500: 63 > fanctl set 8500 fan0_0 fan1_0 fan2_0 64 65- Resume automatic fan control: 66 > fanctl resume 67 68- Get the current fan target and feedback speeds for all rotors: 69 > fanctl get 70 71 ``` 72 > fanctl get 73 TARGET SENSOR TARGET(RPM) FEEDBACK SENSOR FEEDBACK(RPM) 74 =============================================================== 75 fan0_0 10000 fan0_0 7020 76 fan0_1 10000 77 fan1_0 2300 fan1_0 2192 78 fan1_1 2300 79 fan2_0 2300 fan2_0 2192 80 fan2_1 2300 81 fan3_0 3333 fan3_0 2839 82 fan3_1 3333 83 fan4_0 3333 fan4_0 2839 84 fan4_1 3333 85 fan5_0 10000 fan5_0 7020 86 fan5_1 10000 87 ``` 88 89- Get the full system status in regard to fans: 90 > fanctl status 91 92 ``` 93 Fan Control Service State : loaded, inactive(dead) 94 95 CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready 96 CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off 97 CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off 98 99 FAN TARGET(RPM) FEEDBACK(RPM) PRESENT FUNCTIONAL 100 =============================================================== 101 fan0 10000 7020/10000 true true 102 fan1 10000 7020/10000 true true 103 fan2 10000 7020/10000 true true 104 fan3 10000 7020/10000 true true 105 fan4 10000 7020/10000 true true 106 fan5 10000 7020/10000 true true 107 108 ``` 109 110- Reload all json config files in the order each is found: override location, 111 given `Compatible` interface location, default location. 112 113 > fanctl reload 114 115