Jacob Pan | 94f6996 | 2013-10-14 16:02:27 -0700 | [diff] [blame] | 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 |
| 12 | real-time thermal data; tune |
| 13 | and test cooling devices and sensors; collect thermal data for offline |
| 14 | analysis and plot. \fBtmon\fP must be run as root in order to control device |
| 15 | states via sysfs. |
| 16 | .PP |
| 17 | \fBFunctions\fP |
| 18 | .PP |
| 19 | .nf |
| 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 | .PP |
| 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 | .PP |
| 30 | 3. Thermal relationship learning and device tuning |
| 31 | - with a built-in Proportional Integral Derivative (\fBPID\fP) |
| 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 | .PP |
| 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 | .SS Options |
| 44 | .PP |
| 45 | The \fB-c --control\fP option sets a cooling device type to control temperature |
| 46 | of a thermal zone |
| 47 | .PP |
| 48 | The \fB-d --daemon\fP option runs \fBtmon \fP as daemon without user interface |
| 49 | .PP |
| 50 | The \fB-g --debug\fP option allow debug messages to be stored in syslog |
| 51 | .PP |
| 52 | The \fB-h --help\fP option shows help message |
| 53 | .PP |
| 54 | The \fB-l --log\fP option write data to /var/tmp/tmon.log |
| 55 | .PP |
| 56 | The \fB-t --time-interval\fP option sets the polling interval in seconds |
| 57 | .PP |
| 58 | The \fB-v --version\fP option shows the version of \fBtmon \fP |
| 59 | .PP |
| 60 | The \fB-z --zone\fP option sets the target therma zone instance to be controlled |
| 61 | .PP |
| 62 | |
| 63 | .SH FIELD DESCRIPTIONS |
| 64 | .nf |
| 65 | .PP |
| 66 | \fBP \fP passive cooling trip point type |
| 67 | \fBA \fP active cooling trip point type (fan) |
| 68 | \fBC \fP critical trip point type |
| 69 | \fBA \fP hot trip point type |
| 70 | \fBkp \fP proportional gain of \fBPID\fP controller |
| 71 | \fBki \fP integral gain of \fBPID\fP controller |
| 72 | \fBkd \fP derivative gain of \fBPID\fP controller |
| 73 | |
| 74 | .SH REQUIREMENT |
| 75 | Build depends on ncurses |
| 76 | .PP |
| 77 | Runtime depends on window size large enough to show the number of |
| 78 | devices found on the system. |
| 79 | |
| 80 | .PP |
| 81 | |
| 82 | .SH INTERACTIVE COMMANDS |
| 83 | .pp |
| 84 | .nf |
| 85 | \fBCtrl-C, q/Q\fP stops \fBtmon\fP |
| 86 | \fBTAB\fP shows tuning pop up panel, choose a letter to modify |
| 87 | |
| 88 | .SH EXAMPLES |
| 89 | Without any parameters, tmon is in monitoring only mode and refresh |
| 90 | screen every 1 second. |
| 91 | .PP |
| 92 | 1. For monitoring only: |
| 93 | .nf |
| 94 | $ sudo ./tmon |
| 95 | |
| 96 | 2. Use Processor cooling device to control thermal zone 0 at default 65C. |
| 97 | $ sudo ./tmon -c Processor -z 0 |
| 98 | |
| 99 | 3. Use intel_powerclamp(idle injection) cooling device to control thermal zone 1 |
| 100 | $ sudo ./tmon -c intel_powerclamp -z 1 |
| 101 | |
| 102 | 4. Turn on debug and collect data log at /var/tmp/tmon.log |
| 103 | $ sudo ./tmon -g -l |
| 104 | |
| 105 | For example, the log below shows PID controller was adjusting current states |
| 106 | for all cooling devices with "Processor" type such that thermal zone 0 |
| 107 | can stay below 65 dC. |
| 108 | |
| 109 | #---------- THERMAL DATA LOG STARTED ----------- |
| 110 | Samples TargetTemp acpitz0 acpitz1 Fan0 Fan1 Fan2 Fan3 Fan4 Fan5 |
| 111 | Fan6 Fan7 Fan8 Fan9 Processor10 Processor11 Processor12 Processor13 |
| 112 | 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 |
| 113 | 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 |
| 114 | 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 |
| 115 | 5 65.0 52 52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 |
| 116 | 6 65.0 53 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 |
| 117 | 7 65.0 68 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 |
| 118 | 8 65.0 68 68 0 0 0 0 0 0 0 0 0 0 5 5 5 5 6 0 |
| 119 | 9 65.0 68 68 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 0 |
| 120 | 10 65.0 67 67 0 0 0 0 0 0 0 0 0 0 7 7 7 7 6 0 |
| 121 | 11 65.0 67 67 0 0 0 0 0 0 0 0 0 0 8 8 8 8 6 0 |
| 122 | 12 65.0 67 67 0 0 0 0 0 0 0 0 0 0 8 8 8 8 6 0 |
| 123 | 13 65.0 67 67 0 0 0 0 0 0 0 0 0 0 9 9 9 9 6 0 |
| 124 | 14 65.0 66 66 0 0 0 0 0 0 0 0 0 0 10 10 10 10 6 0 |
| 125 | 15 65.0 66 67 0 0 0 0 0 0 0 0 0 0 10 10 10 10 6 0 |
| 126 | 16 65.0 66 66 0 0 0 0 0 0 0 0 0 0 11 11 11 11 6 0 |
| 127 | 17 65.0 66 66 0 0 0 0 0 0 0 0 0 0 11 11 11 11 6 0 |
| 128 | 18 65.0 64 61 0 0 0 0 0 0 0 0 0 0 11 11 11 11 6 0 |
| 129 | 19 65.0 60 59 0 0 0 0 0 0 0 0 0 0 12 12 12 12 6 0 |
| 130 | |
| 131 | Data can be read directly into an array by an example R-script below: |
| 132 | |
| 133 | #!/usr/bin/Rscript |
| 134 | tdata <- read.table("/var/tmp/tmon.log", header=T, comment.char="#") |
| 135 | attach(tdata) |
| 136 | jpeg("tmon.jpg") |
| 137 | X11() |
| 138 | g_range <- range(0, intel_powerclamp15, TargetTemp, acpitz0) |
| 139 | plot( Samples, intel_powerclamp15, col="blue", ylim=g_range, axes=FALSE, ann=FALSE) |
| 140 | par(new=TRUE) |
| 141 | lines(TargetTemp, type="o", pch=22, lty=2, col="red") |
| 142 | dev.off() |