Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[utils] Fixed dsmetemperature tool to fetch correct values. JB#16006
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
- Loading branch information
Pekka Lundstrom
committed
Feb 27, 2014
1 parent
766d4d1
commit 2b18e40
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/sh | ||
|
||
export PERIOD=5 | ||
PERIOD=5 | ||
|
||
echo Displaying elapsed time and estimated surface temperature every $PERIOD seconds | ||
echo Displaying date, core and battery temperature every $PERIOD seconds | ||
|
||
export STARTTIME=$(date +"%s") | ||
while true; do | ||
dbus-send --system --print-reply --dest=com.nokia.thermalmanager /com/nokia/thermalmanager com.nokia.thermalmanager.estimate_surface_temperature | grep int32 | while read HABA TEMPERATURE; do echo $(expr $(date +"%s") - $STARTTIME) $TEMPERATURE; done | ||
sleep 5 | ||
CORE_TEMP=$(dbus-send --system --print-reply --dest=com.nokia.thermalmanager /com/nokia/thermalmanager com.nokia.thermalmanager.core_temperature | grep int32 | tr -s ' ' | cut -d ' ' -f3) | ||
BATTERY_TEMP=$(dbus-send --system --print-reply --dest=com.nokia.thermalmanager /com/nokia/thermalmanager com.nokia.thermalmanager.battery_temperature | grep int32 | tr -s ' ' | cut -d ' ' -f3) | ||
echo "`date +\"%x %T\"` core=$CORE_TEMP battery=$BATTERY_TEMP" | ||
sleep $PERIOD | ||
done |