1*d05b47cbSMatt Spinler# Fan Control Debug 2*d05b47cbSMatt Spinler 3*d05b47cbSMatt SpinlerFan control's internal data structures can be dumped at runtime using the 4*d05b47cbSMatt Spinler`fanctl dump` command, which triggers fan control to write the structures to a 5*d05b47cbSMatt Spinler`/tmp/fan_control_dump.json` file. That file is a normal JSON file that can be 6*d05b47cbSMatt Spinlerviewed, or the `fanctl query_dump` command can be used as a shortcut to just 7*d05b47cbSMatt Spinlerprint portions of the file. 8*d05b47cbSMatt Spinler 9*d05b47cbSMatt Spinler[This page](fanctl/README.md) has additional information about the fanctl 10*d05b47cbSMatt Spinlercommand. 11*d05b47cbSMatt Spinler 12*d05b47cbSMatt Spinler## Flight Recorder 13*d05b47cbSMatt SpinlerThe flight recorder contains interesting events such as each time the zone 14*d05b47cbSMatt Spinlertarget changes. 15*d05b47cbSMatt Spinler 16*d05b47cbSMatt SpinlerIt can be printed with: 17*d05b47cbSMatt Spinler``` 18*d05b47cbSMatt Spinlerfanctl query_dump -s flight_recorder 19*d05b47cbSMatt Spinler``` 20*d05b47cbSMatt Spinler 21*d05b47cbSMatt Spinler## Object Cache 22*d05b47cbSMatt SpinlerThe object cache contains the most recent D-Bus properties of all of the groups 23*d05b47cbSMatt Spinlerfrom the groups.json files. If any of the D-Bus properties had a value of 24*d05b47cbSMatt Spinler`NaN` (not a number), it is deleted from the cache so won't be present. 25*d05b47cbSMatt Spinler 26*d05b47cbSMatt SpinlerIt can be printed with: 27*d05b47cbSMatt Spinler``` 28*d05b47cbSMatt Spinlerfanctl query_dump -s objects 29*d05b47cbSMatt Spinler``` 30*d05b47cbSMatt Spinler 31*d05b47cbSMatt SpinlerOne can restrict the output to specific names with `-n` and properties with 32*d05b47cbSMatt Spinler`-p`: 33*d05b47cbSMatt Spinler 34*d05b47cbSMatt SpinlerThe `-n` option will match on substrings. 35*d05b47cbSMatt Spinler 36*d05b47cbSMatt SpinlerPrint the full entries of all temp sensors in the cache: 37*d05b47cbSMatt Spinler``` 38*d05b47cbSMatt Spinlerfanctl query_dump -s objects -n sensors/temperature 39*d05b47cbSMatt Spinler``` 40*d05b47cbSMatt Spinler 41*d05b47cbSMatt SpinlerPrint just the Value properties of all temperature sensors in the cache: 42*d05b47cbSMatt Spinler``` 43*d05b47cbSMatt Spinlerfanctl query_dump -s objects -n sensors/temperature -p Value 44*d05b47cbSMatt Spinler``` 45*d05b47cbSMatt Spinler 46*d05b47cbSMatt SpinlerThis allows one to do something like find all Functional property values that 47*d05b47cbSMatt Spinlerare false: 48*d05b47cbSMatt Spinler 49*d05b47cbSMatt Spinler``` 50*d05b47cbSMatt Spinlerfanctl query_dump -s objects -p Functional | grep -B 1 false 51*d05b47cbSMatt Spinler``` 52*d05b47cbSMatt Spinler 53*d05b47cbSMatt Spinler## Zone Config 54*d05b47cbSMatt SpinlerThe zone configuration contains values like the current target, current 55*d05b47cbSMatt Spinlerfloor, and any outstanding floor or target holds. 56*d05b47cbSMatt Spinler 57*d05b47cbSMatt SpinlerIt can be printed with: 58*d05b47cbSMatt Spinler``` 59*d05b47cbSMatt Spinlerfanctl query_dump -s zones 60*d05b47cbSMatt Spinler``` 61*d05b47cbSMatt Spinler 62*d05b47cbSMatt Spinler## Parameter Values 63*d05b47cbSMatt SpinlerParameters are key/value pairs set and used by actions. 64*d05b47cbSMatt Spinler 65*d05b47cbSMatt SpinlerThey can be printed with: 66*d05b47cbSMatt Spinler``` 67*d05b47cbSMatt Spinlerfanctl query_dump -s parameters 68*d05b47cbSMatt Spinler``` 69*d05b47cbSMatt Spinler 70*d05b47cbSMatt Spinler## Service Cache 71*d05b47cbSMatt SpinlerFan control maintains a map of objects paths of the group members to the 72*d05b47cbSMatt Spinlerservices that own them. 73*d05b47cbSMatt Spinler 74*d05b47cbSMatt SpinlerIt can be printed with: 75*d05b47cbSMatt Spinler``` 76*d05b47cbSMatt Spinlerfanctl query_dump -s services 77*d05b47cbSMatt Spinler``` 78*d05b47cbSMatt Spinler 79*d05b47cbSMatt Spinler## Configured Events 80*d05b47cbSMatt SpinlerFan control can dump a list of all of its configured event names along with 81*d05b47cbSMatt Spinlertheir group names. 82*d05b47cbSMatt Spinler 83*d05b47cbSMatt SpinlerIt can be printed with: 84*d05b47cbSMatt Spinler``` 85*d05b47cbSMatt Spinlerfanctl query_dump -s events 86*d05b47cbSMatt Spinler``` 87