1{
2    "comments": "List of fans with the attributes used to monitor them.",
3    "fans": [
4        {
5            "comments": [
6                "The first fan in the system that has two sensor(dual rotor) feedbacks",
7                "that are allowed to deviate from any given target by 15% for up-to 30",
8                "seconds before being marked nonfunctional in inventory. The first",
9                "sensor object contains the target property and the second sensor",
10                "object's feedback speed is adjusted by a factor of 1.45 and offset",
11                "by -909 to accomodate how its hardware reacts to any given target. It",
12                "takes 1 sensor to mark this fan nonfunctional and once marked",
13                "nonfunctional, the nonfunctional sensor(s) must be within 15% of the",
14                "target for 5 seconds before being updated to functional again.",
15                "Each sensor has an error logged after 0 seconds being marked",
16                "nonfunctional and the fan has an error logged if its been not",
17                "present for 20 seconds.",
18                "In addition, this fan is not monitored for the first 30 seconds after",
19                "a poweron to allow the fan to spin-up."
20            ],
21            "inventory": "/system/chassis/motherboard/fan0",
22            "functional_delay": 5,
23            "allowed_out_of_range_time": 30,
24            "deviation": 15,
25            "num_sensors_nonfunc_for_fan_nonfunc": 1,
26            "monitor_start_delay": 30,
27            "fan_missing_error_delay": 20,
28            "nonfunc_rotor_error_delay": 0,
29            "sensors": [
30                {
31                    "name": "fan0_0",
32                    "has_target": true
33                },
34                {
35                    "name": "fan0_1",
36                    "has_target": false,
37                    "factor": 1.45,
38                    "offset": -909
39                }
40            ]
41        },
42        {
43            "comments": [
44                "The second fan in the system has one sensor(single rotor) feedback",
45                "that is only monitored with the `WaterCooled` property is false. The",
46                "sensor is monitored using a 'count' method where a counter is",
47                "incremented each tick the fan deviates 15% from a target and",
48                "decrements back to zero each tick the fan is within spec. When the",
49                "sensor reaches the threshold of 25 ticks, the fan is marked",
50                "nonfunctional and only returns to being functional when the counter",
51                "is decremented back to 0. This differs from the default 'timebased'",
52                "method where the fan must deviate contiguously for a set amount of",
53                "time to be marked nonfunctional. It takes 1 sensor to mark this fan",
54                "nonfunctional.",
55                "Each sensor has an error logged after 0 seconds being marked",
56                "nonfunctional and the fan has an error logged if its been not present",
57                "for 20 seconds.",
58                "In addition, this fan is not monitored for the first 30 seconds after",
59                "a poweron to allow the fan to spin-up."
60            ],
61            "inventory": "/system/chassis/motherboard/fan1",
62            "method": "count",
63            "deviation": 15,
64            "num_sensors_nonfunc_for_fan_nonfunc": 1,
65            "monitor_start_delay": 30,
66            "fan_missing_error_delay": 20,
67            "nonfunc_rotor_error_delay": 0,
68            "sensors": [
69                {
70                    "name": "fan1_0",
71                    "has_target": true,
72                    "threshold": 25
73                }
74            ],
75            "condition": {
76                "name": "propertiesMatch",
77                "properties": [
78                    {
79                        "object": "/xyz/openbmc_project/inventory/system/chassis",
80                        "interface": "xyz.openbmc_project.Inventory.Decorator.CoolingType",
81                        "property": {
82                            "name": "WaterCooled",
83                            "type": "bool",
84                            "value": false
85                        }
86                    }
87                ]
88            }
89        },
90        {
91            "comments": [
92                "The third fan in the system that has one sensor(single rotor)",
93                "feedback using the default 'timebased' method that allows it to",
94                "deviate from any given target by 15% for up-to 30 seconds before",
95                "being marked nonfunctional in inventory. Instead of using the default",
96                "'xyz.openbmc_project.Control.FanSpeed' target interface, the sensor",
97                "uses the 'xyz.openbmc_project.Control.FanPwm' target interface and",
98                "applies a factor of 21 and offset of 1600 to accomodate the",
99                "difference in target PWM versus the RPM feedback of the sensor to",
100                "determine if the fan sensor is nonfunctional or not. It takes 1",
101                "sensor to mark this fan nonfunctional and when marked nonfunctional,",
102                "it is immediately marked functional again once within 15% of the",
103                "target.",
104                "Each sensor has an error logged after 0 seconds being marked",
105                "nonfunctional and the fan has an error logged if its been not present",
106                "for 20 seconds.",
107                "In addition, this fan is not monitored for the first 30 seconds after",
108                "a poweron to allow the fan to spin-up. "
109            ],
110            "inventory": "/system/chassis/motherboard/fan2",
111            "method": "timebased",
112            "allowed_out_of_range_time": 30,
113            "deviation": 15,
114            "num_sensors_nonfunc_for_fan_nonfunc": 1,
115            "monitor_start_delay": 30,
116            "fan_missing_error_delay": 20,
117            "nonfunc_rotor_error_delay": 0,
118            "sensors": [
119                {
120                    "name": "fan2_0",
121                    "target_interface": "xyz.openbmc_project.Control.FanPwm",
122                    "has_target": true,
123                    "factor": 21,
124                    "offset": 1600
125                }
126            ]
127        }
128    ],
129    "sensor_trust_groups": [
130        {
131            "comments": [
132                "OPTIONAL - A section to create `trust groups` consisting of fan tach",
133                "sensors that can be used to trust the tach feedback reading or",
134                "disregard it when determining if the fan is functional or not. Here,",
135                "the fan sensor feedbacks within the group are only trusted when any",
136                "one of them shows a non-zero feedback speed. At any time all fan",
137                "sensor feedbacks report a speed of 0, the monitoring of each sensor",
138                "in the group is cancelled, only to resume being monitored when any",
139                "one of them reports a non-zero feedback speed."
140            ],
141            "class": "NonzeroSpeed",
142            "group": [
143                {
144                    "name": "fan0_0"
145                },
146                {
147                    "name": "fan1_0"
148                },
149                {
150                    "name": "fan2_0"
151                }
152            ]
153        }
154    ],
155    "fault_handling": {
156        "comments": [
157            "OPTIONAL - A section to handle faults caused by missing or",
158            "nonfunctional fans. An error is logged when 1 rotor is nonfunctional",
159            "across all the fans being monitored. The system is immediately hard",
160            "powered off after a poweron is started when 1 fan has been missing for",
161            "25 seconds.",
162            "An EPOW shutdown is issued when 2 or more nonfunctional fan sensors",
163            "exist, which (specific to EPOW) has a service mode delay of 300 seconds",
164            "and then a meltdown delay of 300 seconds."
165        ],
166        "num_nonfunc_rotors_before_error": 1,
167        "power_off_config": [
168            {
169                "type": "hard",
170                "cause": "missing_fan_frus",
171                "count": 1,
172                "delay": 25,
173                "state": "at_pgood"
174            },
175            {
176                "type": "epow",
177                "cause": "nonfunc_fan_rotors",
178                "count": 2,
179                "service_mode_delay": 300,
180                "meltdown_delay": 300
181            }
182        ]
183    }
184}
185