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