Skip to content

Commit

Permalink
[utils] Fixed dsmetemperature tool to fetch correct values. JB#16006
Browse files Browse the repository at this point in the history
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.
11 changes: 6 additions & 5 deletions util/dsmetemperature
@@ -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

0 comments on commit 2b18e40

Please sign in to comment.