summaryrefslogtreecommitdiffstats
path: root/tools/thermal/tmon/tmon.c
Commit message (Collapse)AuthorAgeFilesLines
* tools/thermal: tmon: add --target-temp parameterBrian Norris2015-02-281-2/+12
| | | | | | | | | | | | | | | | | If we launch in daemon mode (--daemon), we don't have the ncurses UI, but we might want to set the target temperature still. For example, someone might stick the following in their boot script: tmon --control intel_powerclamp --target-temp 90 --log --daemon This would turn on CPU idle injection when we're around 90 degrees celsius, and would log temperature and throttling info to /var/tmp/tmon.log. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* tmon: set umask to a reasonable valueNeil Horman2014-07-011-1/+1
| | | | | | | | | | | Currently, the tmon umask value is set to 0, which means whatever the permission mask in the shell are when starting tmon in daemon mode are what the permissions of any created files will be. We should likely set something more explicit, so lets go with the usual 022 Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* tmon: Check log file for common secuirty issuesNeil Horman2014-07-011-0/+24
| | | | | | | | | | | The tmon logging system blindly opens its log file on a static path, making it very easy for someone to redirect that log information to inappropriate places or overwrite other users data. Do some easy checking to make sure we're not logging to a symlink or a file owned by another user. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* tools/thermal: Introduce tmon, a tool for thermal subsystemJacob Pan2013-11-071-0/+352
Increasingly, Linux is running on thermally constrained devices. The simple thermal relationship between processor and fan has become past for modern computers. As hardware vendors cope with the thermal constraints on their products, more sensors are added, new cooling capabilities are introduced. The complexity of the thermal relationship can grow exponentially among cooling devices, zones, sensors, and trip points. They can also change dynamically. To expose such relationship to the userspace, Linux generic thermal layer introduced sysfs entry at /sys/class/thermal with a matrix of symbolic links, trip point bindings, and device instances. To traverse such matrix by hand is not a trivial task. Testing is also difficult in that thermal conditions are often exception cases that hard to reach in normal operations. TMON is conceived as a tool to help visualize, tune, and test the complex thermal subsystem. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
OpenPOWER on IntegriCloud