18c2ecf20Sopenharmony_ciTMON - A Monitoring and Testing Tool for Linux kernel thermal subsystem 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciWhy TMON? 48c2ecf20Sopenharmony_ci========== 58c2ecf20Sopenharmony_ciIncreasingly, Linux is running on thermally constrained devices. The simple 68c2ecf20Sopenharmony_cithermal relationship between processor and fan has become past for modern 78c2ecf20Sopenharmony_cicomputers. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciAs hardware vendors cope with the thermal constraints on their products, more 108c2ecf20Sopenharmony_ciand more sensors are added, new cooling capabilities are introduced. The 118c2ecf20Sopenharmony_cicomplexity of the thermal relationship can grow exponentially among cooling 128c2ecf20Sopenharmony_cidevices, zones, sensors, and trip points. They can also change dynamically. 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciTo expose such relationship to the userspace, Linux generic thermal layer 158c2ecf20Sopenharmony_ciintroduced sysfs entry at /sys/class/thermal with a matrix of symbolic 168c2ecf20Sopenharmony_cilinks, trip point bindings, and device instances. To traverse such 178c2ecf20Sopenharmony_cimatrix by hand is not a trivial task. Testing is also difficult in that 188c2ecf20Sopenharmony_cithermal conditions are often exception cases that hard to reach in 198c2ecf20Sopenharmony_cinormal operations. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciTMON is conceived as a tool to help visualize, tune, and test the 228c2ecf20Sopenharmony_cicomplex thermal subsystem. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciFiles 258c2ecf20Sopenharmony_ci===== 268c2ecf20Sopenharmony_ci tmon.c : main function for set up and configurations. 278c2ecf20Sopenharmony_ci tui.c : handles ncurses based user interface 288c2ecf20Sopenharmony_ci sysfs.c : access to the generic thermal sysfs 298c2ecf20Sopenharmony_ci pid.c : a proportional-integral-derivative (PID) controller 308c2ecf20Sopenharmony_ci that can be used for thermal relationship training. 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciRequirements 338c2ecf20Sopenharmony_ci============ 348c2ecf20Sopenharmony_ciDepends on ncurses 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciBuild 378c2ecf20Sopenharmony_ci========= 388c2ecf20Sopenharmony_ci$ make 398c2ecf20Sopenharmony_ci$ sudo ./tmon -h 408c2ecf20Sopenharmony_ciUsage: tmon [OPTION...] 418c2ecf20Sopenharmony_ci -c, --control cooling device in control 428c2ecf20Sopenharmony_ci -d, --daemon run as daemon, no TUI 438c2ecf20Sopenharmony_ci -l, --log log data to /var/tmp/tmon.log 448c2ecf20Sopenharmony_ci -h, --help show this help message 458c2ecf20Sopenharmony_ci -t, --time-interval set time interval for sampling 468c2ecf20Sopenharmony_ci -v, --version show version 478c2ecf20Sopenharmony_ci -g, --debug debug message in syslog 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci1. For monitoring only: 508c2ecf20Sopenharmony_ci$ sudo ./tmon 51