1TMON(8) System Manager's Manual TMON(8)
2
3
4
6 tmon - A monitoring and testing tool for Linux kernel thermal subsystem
7
8
10 tmon [Options]
11
13 tmon can be used to visualize thermal relationship and real-time ther‐
14 mal data; tune and test cooling devices and sensors; collect thermal
15 data for offline analysis and plot. tmon must be run as root in order
16 to control device states via sysfs.
17
18 Functions
19
20 1. Thermal relationships:
21 - show thermal zone information
22 - show cooling device information
23 - show trip point binding within each thermal zone
24 - show trip point and cooling device instance bindings
25
26 2. Real time data display
27 - show temperature of all thermal zones w.r.t. its trip points and types
28 - show states of all cooling devices
29
30 3. Thermal relationship learning and device tuning
31 - with a built-in Proportional Integral Derivative (PID)
32 controller, user can pair a cooling device to a thermal sensor for
33 testing the effectiveness and learn about the thermal distance between the two
34 - allow manual control of cooling device states and target temperature
35
36 4. Data logging in /var/tmp/tmon.log
37 - contains thermal configuration data, i.e. cooling device, thermal
38 zones, and trip points. Can be used for data collection in remote
39 debugging.
40 - log real-time thermal data into space separated format that can be
41 directly consumed by plotting tools such as Rscript.
42
43
44 Options
45 The -c --control option sets a cooling device type to control tempera‐
46 ture of a thermal zone
47
48 The -d --daemon option runs tmon as daemon without user interface
49
50 The -g --debug option allow debug messages to be stored in syslog
51
52 The -h --help option shows help message
53
54 The -l --log option write data to /var/tmp/tmon.log
55
56 The -t --time-interval option sets the polling interval in seconds
57
58 The -v --version option shows the version of tmon
59
60 The -z --zone option sets the target therma zone instance to be con‐
61 trolled
62
64 P passive cooling trip point type
65 A active cooling trip point type (fan)
66 C critical trip point type
67 A hot trip point type
68 kp proportional gain of PID controller
69 ki integral gain of PID controller
70 kd derivative gain of PID controller
71
72
74 Build depends on ncurses
75
76 Runtime depends on window size large enough to show the number of
77 devices found on the system.
78
79
81 Ctrl-C, q/Q stops tmon
82 TAB shows tuning pop up panel, choose a letter to modify
83
84
86 Without any parameters, tmon is in monitoring only mode and refresh
87 screen every 1 second.
88
89 1. For monitoring only:
90 $ sudo ./tmon
91
92 2. Use Processor cooling device to control thermal zone 0 at default 65C.
93 $ sudo ./tmon -c Processor -z 0
94
95 3. Use intel_powerclamp(idle injection) cooling device to control thermal zone 1
96 $ sudo ./tmon -c intel_powerclamp -z 1
97
98 4. Turn on debug and collect data log at /var/tmp/tmon.log
99 $ sudo ./tmon -g -l
100
101 For example, the log below shows PID controller was adjusting current states
102 for all cooling devices with "Processor" type such that thermal zone 0
103 can stay below 65 dC.
104
105 #---------- THERMAL DATA LOG STARTED -----------
106 Samples TargetTemp acpitz0 acpitz1 Fan0 Fan1 Fan2 Fan3 Fan4 Fan5
107 Fan6 Fan7 Fan8 Fan9 Processor10 Processor11 Processor12 Processor13
108 LCD14 intel_powerclamp15 1 65.0 65 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 2
109 65.0 66 65 0 0 0 0 0 0 0 0 0 0 4 4 4 4 6 0 3 65.0 60 54 0 0 0 0 0 0 0 0
110 0 0 4 4 4 4 6 0 4 65.0 53 53 0 0 0 0 0 0 0 0 0 0 4 4 4 4 6 0
111 5 65.0 52 52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0
112 6 65.0 53 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0
113 7 65.0 68 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0
114 8 65.0 68 68 0 0 0 0 0 0 0 0 0 0 5 5 5 5 6 0
115 9 65.0 68 68 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 0
116 10 65.0 67 67 0 0 0 0 0 0 0 0 0 0 7 7 7 7 6 0
117 11 65.0 67 67 0 0 0 0 0 0 0 0 0 0 8 8 8 8 6 0
118 12 65.0 67 67 0 0 0 0 0 0 0 0 0 0 8 8 8 8 6 0
119 13 65.0 67 67 0 0 0 0 0 0 0 0 0 0 9 9 9 9 6 0
120 14 65.0 66 66 0 0 0 0 0 0 0 0 0 0 10 10 10 10 6 0
121 15 65.0 66 67 0 0 0 0 0 0 0 0 0 0 10 10 10 10 6 0
122 16 65.0 66 66 0 0 0 0 0 0 0 0 0 0 11 11 11 11 6 0
123 17 65.0 66 66 0 0 0 0 0 0 0 0 0 0 11 11 11 11 6 0
124 18 65.0 64 61 0 0 0 0 0 0 0 0 0 0 11 11 11 11 6 0
125 19 65.0 60 59 0 0 0 0 0 0 0 0 0 0 12 12 12 12 6 0
126
127 Data can be read directly into an array by an example R-script below:
128
129 #!/usr/bin/Rscript
130 tdata <- read.table("/var/tmp/tmon.log", header=T, comment.char="#")
131 attach(tdata)
132 jpeg("tmon.jpg")
133 X11()
134 g_range <- range(0, intel_powerclamp15, TargetTemp, acpitz0)
135 plot( Samples, intel_powerclamp15, col="blue", ylim=g_range, axes=FALSE, ann=FALSE)
136 par(new=TRUE)
137 lines(TargetTemp, type="o", pch=22, lty=2, col="red")
138 dev.off()
139
140
141
142 TMON(8)