Linux Audio

Check our new training course

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