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