XBMC advancedsettings.xml (CPU and GPU temp)
#1
Hello everyone.

I want to see GPU and CPU temperature into my XBMC.
I was read http://wiki.xbmc.org/index.php?title=Adv...command.3E howto about advancedsettings.xml. and make this file. Please see my example:\
Quote:<advancedsettings>
<cputempcommand>/home/mike/cpu-temp.sh</cputempcommand>
<gputempcommand>/home/mike/gpu-temp.sh</gputempcommand>
</advancedsettings>

Files named like cpu-temp.sh and gpu-temp.sh are scripts witch display only value of temp sensor. When XBMC start I can see into xbmc.log:
Quote:21:18:26 T:140449228470336 M:1798955008 NOTICE: Loaded advancedsettings.xml from special://profile/advancedsettings.xml
21:18:26 T:140449228470336 M:1798955008 NOTICE: Contents of special://profile/advancedsettings.xml are...
<advancedsettings>
<cputempcommand>/home/mike/cpu-temp.sh</cputempcommand>
<gputempcommand>/home/mike/gpu-temp.sh</gputempcommand>
</advancedsettings>

But CPU and GPU value of temperature don't displayed. Consult me please for help to solve my issue.
Reply
#2
Just put the command right in there; test the bits first of course in a separate terminal. Here's my advancedsettings.xml in its entirety.

Code:
<advancedsettings>
<network>
<disableipv6>true</disableipv6>
</network>

<musicthumbs>
  <remove>folder.jpg</remove>
  <add>folder.png</add>
</musicthumbs>

<cputempcommand>sensors | tail -n 21 | sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
<gputempcommand>echo "$(nvidia-settings -c :0 -tq GPUCoreTemp) C"</gputempcommand>

</advancedsettings>

Your exact code will no doubt be slightly different.
If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Reply
#3
Thanks it's great work. Smile
Reply
#4
I use the following to get CPU temp to work on xbmc

Code:
echo "$(sensors -u | grep "temp1_input"| awk '{print $2 }' |awk '{printf("%d C \n",$1 + 0.5);}')"
Reply
#5
Mine looks like this:

Code:
echo "$(sensors | grep "CPU Temperature" | grep -o "+[0-9]*.[0-9]*" | sed -n "/+[0-9]*.[0-9]/{;p;q;}") C"

Big Grin
Reply
#6
I calculate average CPU temp for a Core 2 Duo

Code:
echo "$(sensors -u|awk 'NR==4 || NR==9 {sum += $2} END {print sum/2}') C"
Reply
#7
For ION gen 1 in Ubuntu

Code:
<advancedsettings>
        <gputempcommand>echo "$(nvidia-settings -c :0 -tq GPUCoreTemp) C"</gputempcommand>
        <cputempcommand>echo "$(sensors -u | tail -n64 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}') C"</cputempcommand>
</advancedsettings>

uNi
Reply
#8
In case you want to avoid occasional stutter get rid of this gputemp script. calling nvidia-settings during playback can harm. Why are you interested in this useless information?
Reply
#9
Perhaps GPU temperature can be called via

Code:
nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36

instead of nvidia-settings though idk if that is bad too like FernetMenta said.

I cant speak for anyone else but I prefer to display such useless information, in fact I think xbmc should display other information like hdd temps and perhaps fan speeds, specially when you only have xbmc running in a system like Linux and no other things like a window manager or even for openlelec type installs.

uNi
Reply
#10
I am not sure but I think nvidia-smi calls the same API functions when querying temperature. If you encounter any stuttering, please remove this call first and try again.

In my former box I had a passively cooled GT220. In order to fit it in the case I had to cut away a piece of the cooler. In the beginning I monitored the temp via a remote shell. It got hot, iirc close to < 10°C of maximum spec which is I think 105°C. This bothered me a while. Then I stopped monitoring and I felt much happier. Why bother? The primary reason for the temp sensor in the chip is self protection, not presenting the value to the user.
Reply
#11
Ah I see, peace of mind via obscurity

I never noticed any stuttering that went away without these values, nvidia-smi has 0 delay while nvidia-settings offers a minor delay in temp display though I never managed to use nvidia-smi to call temsp via as.xml

Edit stuttering using nvidia-settings to control fan speed I would bow to your knowledge either way though since your the expert here in more ways xbmc than one hehe

Edit: the nvidia-smi method works in xbmc as below: If its better than nvidia-settings for possible stutter idk.

Code:
<gputempcommand>echo "$(nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36) C"</gputempcommand>

I read some difference in between nvidia-settings and nvidia-smi is one uses X the other doesn't https://sites.google.com/site/akohlmey/r...u-coolness what API it uses

* un1versal shrugs

uNi
Reply
#12
Where are these temps supposed to be displayed in the GUI?
Reply
#13
System info.
Reply
#14
I put the following in my advancedsettings file and relaunched XBMC, but I'm not seeing any temps in system info. I verified that these two commands work in a terminal, producing output like "71 C".

Code:
<cputempcommand>echo "$(sensors -u | tail -n64 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}') C"</cputempcommand>
        <gputempcommand>echo "$(nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-36) C"</gputempcommand>


A few posts ago, FernetMenta said
Quote:In case you want to avoid occasional stutter get rid of this gputemp script. calling nvidia-settings during playback can harm.
That seems to imply that the temps are supposed to show up during playback — is that true?
Reply
#15
I've never seen it during playback. I think he means the temp may be updated while playing video.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
XBMC advancedsettings.xml (CPU and GPU temp)00