1*4882a593SmuzhiyunTMON - A Monitoring and Testing Tool for Linux kernel thermal subsystem 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunWhy TMON? 4*4882a593Smuzhiyun========== 5*4882a593SmuzhiyunIncreasingly, Linux is running on thermally constrained devices. The simple 6*4882a593Smuzhiyunthermal relationship between processor and fan has become past for modern 7*4882a593Smuzhiyuncomputers. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunAs hardware vendors cope with the thermal constraints on their products, more 10*4882a593Smuzhiyunand more sensors are added, new cooling capabilities are introduced. The 11*4882a593Smuzhiyuncomplexity of the thermal relationship can grow exponentially among cooling 12*4882a593Smuzhiyundevices, zones, sensors, and trip points. They can also change dynamically. 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunTo expose such relationship to the userspace, Linux generic thermal layer 15*4882a593Smuzhiyunintroduced sysfs entry at /sys/class/thermal with a matrix of symbolic 16*4882a593Smuzhiyunlinks, trip point bindings, and device instances. To traverse such 17*4882a593Smuzhiyunmatrix by hand is not a trivial task. Testing is also difficult in that 18*4882a593Smuzhiyunthermal conditions are often exception cases that hard to reach in 19*4882a593Smuzhiyunnormal operations. 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunTMON is conceived as a tool to help visualize, tune, and test the 22*4882a593Smuzhiyuncomplex thermal subsystem. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunFiles 25*4882a593Smuzhiyun===== 26*4882a593Smuzhiyun tmon.c : main function for set up and configurations. 27*4882a593Smuzhiyun tui.c : handles ncurses based user interface 28*4882a593Smuzhiyun sysfs.c : access to the generic thermal sysfs 29*4882a593Smuzhiyun pid.c : a proportional-integral-derivative (PID) controller 30*4882a593Smuzhiyun that can be used for thermal relationship training. 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunRequirements 33*4882a593Smuzhiyun============ 34*4882a593SmuzhiyunDepends on ncurses 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunBuild 37*4882a593Smuzhiyun========= 38*4882a593Smuzhiyun$ make 39*4882a593Smuzhiyun$ sudo ./tmon -h 40*4882a593SmuzhiyunUsage: tmon [OPTION...] 41*4882a593Smuzhiyun -c, --control cooling device in control 42*4882a593Smuzhiyun -d, --daemon run as daemon, no TUI 43*4882a593Smuzhiyun -l, --log log data to /var/tmp/tmon.log 44*4882a593Smuzhiyun -h, --help show this help message 45*4882a593Smuzhiyun -t, --time-interval set time interval for sampling 46*4882a593Smuzhiyun -v, --version show version 47*4882a593Smuzhiyun -g, --debug debug message in syslog 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun1. For monitoring only: 50*4882a593Smuzhiyun$ sudo ./tmon 51