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