tmon.8 4.8 KB

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