[WINDOWS] Where do I look to see about memory display and temps
#1
I'm thinking of trying my hands at fixing/adding 2 issues I see with Windows trunk. One is that it displays the wrong amount of Memory and Available Memory in the Hardware section. The second it doesn't display the temps of the CPU or GPUs.

Shows 4095 for Total and Available, I have 12 gigs on this box and it is running x64.
Image

Actual ram
Image


Not sure if this is a skin issue, an api issue, or it is a limitation built into the detection function. But I would like to try to see if I can make this work correctly and then turn in a patch or diff.
What Files do I start looking at to get a handle on how XBMC detects memory in windows?

Craig
Main Rig [Scorpius] - Core i7 2600k @ 5Ghz. 16 Gig DDR3 1600. 1x HD 6990 1x HD 4870 Hackintosh [Chiana] - Core i5 @ 3.8Ghz. 12 Gig DDR3 Linux [Moya] - Core2 Duo E8200 - 2 Gigs DDR2 800 WHS [Zhaan] - DualCore [email protected] - 4 Gigs DDR2 800 VMC [Jothee] Core2 Quad @ 2.8Ghz 4 Gigs DDR2 800 VMC [Aeryn] Core2 E8400 @ 3.0Ghz 2 Gigs DDR2 800 2TB Server [Talyn] Core2 Quad Q6600 @ 3.0Ghz - 8 Gigs DDR2 1066 FileServer [Crichton] P4 650 3.4GHz - 2 Gigs DDR
Reply
#2
GUIInfoManager.cpp, all of those are info labels.
Reply
#3
The memory info isn't wrong. U're running a 32bit program on a 64bit system.
WoW emulates a 32 bit env for XBMC and therefore it only sees 4GB.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
http://news.softpedia.com/news/32-bit-Wi...4312.shtml .. Good article explanning it all if need it ..

"The consumer versions of 32-bit Windows XP and Vista have a stated limit of 4 GB RAM, but a practical limit of about 3.1 GB". If you want more, you need to build a 64bit version of xbmc ..

Temperature information isn't displayed because currently their isn't a generic way to retrieve temp information in windows. We have however "cputempcommand" in advancedsettings that can be used to execute a shell cmd to retrieve temperature reading as well but is currently enabled in linux only.
Reply
#5
CrashX Wrote:http://news.softpedia.com/news/32-bit-Wi...4312.shtml .. Good article explanning it all if need it ..

"The consumer versions of 32-bit Windows XP and Vista have a stated limit of 4 GB RAM, but a practical limit of about 3.1 GB". If you want more, you need to build a 64bit version of xbmc ..

Temperature information isn't displayed because currently their isn't a generic way to retrieve temp information in windows. We have however "cputempcommand" in advancedsettings that can be used to execute a shell cmd to retrieve temperature reading as well but is currently enabled in linux only.

I understand there isn't a "generic" way but things like speedfan [freeware], everest [not freeware], and a few other apps allow for 3rd party interfacing on windows. And since there is things like VDPAU on Linux for Nvidia cards only I'm guessing the one code fits all strategy is no longer in effect, so writing a little scraper for SpeedFan on Windows shouldn't effect anything other than give Windows users some of the same functionality that linux sensors gives Linux people [and I Guess Mac users as well] I'll play around with speedfan and see what I can get XBMC to see Smile
Main Rig [Scorpius] - Core i7 2600k @ 5Ghz. 16 Gig DDR3 1600. 1x HD 6990 1x HD 4870 Hackintosh [Chiana] - Core i5 @ 3.8Ghz. 12 Gig DDR3 Linux [Moya] - Core2 Duo E8200 - 2 Gigs DDR2 800 WHS [Zhaan] - DualCore [email protected] - 4 Gigs DDR2 800 VMC [Jothee] Core2 Quad @ 2.8Ghz 4 Gigs DDR2 800 VMC [Aeryn] Core2 E8400 @ 3.0Ghz 2 Gigs DDR2 800 2TB Server [Talyn] Core2 Quad Q6600 @ 3.0Ghz - 8 Gigs DDR2 1066 FileServer [Crichton] P4 650 3.4GHz - 2 Gigs DDR
Reply
#6
ähm, please don't see vdpau as a wildcard and you shouldn't compare video acceleration with CPU temperature. I don't want to keep you away from coding but I won't accept tons of code and ifdefs for just getting the CPU temp when having speedfan installed.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
Wiso:

Is their any reason why we can't allow advancedsetting "cputempcommand" in windows ? It is allowed in linux ... If he finds a way to do get speedfan to output valid information for temperature, he can stick as as cputempcommand.
Reply
#8
gputempcommand and cputempcommand are already allowed but I dunno if they actually work on Windows.
You can check CTemperature CCPUInfo::getTemperature() and CTemperature CGUIInfoManager::GetGPUTemperature() and fix it if it doesn't work Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#9
http://http.download.nvidia.com/develope...el_API.pdf

shows some rundl32 calls which could be used with Nvidia but nothing for ATI so far. One could also try to load nvcp.dll and get the temp via NvCplGetThermalSettings. This should go into WIN32Utils but it's still a one vendor implementation. Sad
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
Maybe WinRing0 can be used to gather system info on windows?
Reply
#11
This only helps you accessing the msr registers from ring3. CrystalCPUID does similar things and the source is also available. Problem is to get the register values for the thermal diode of Intel and AMD processors and even if you get them Intel made live difficult because you have to do some math because every CPU uses a different tmax.
But one could go the same approach as Linux does and use the code to access ring0 with coretemp.c from the linux kernel Wink

Edit: There're some example projects there but the temp example is only for Intel CPUs and I assume it just uses one tmax for all CPUs which isn't that accurate. But a nice find Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#12
You're right that these are all special-case implementations, but there aren't many cases to worry about. There are only 3 GPU (nv, amd, intel) and 2 CPU (intel, amd) vendors in the market, after all.
Reply
#13
Lightbulb 
I just wanted to chip in my 2 cents on how this can be done in Windows with free software. I'm definitely not a programmer, but I've patched together the following to get my Speedfan information to show in XBMC as a proof of concept:

1. Install SNMP (Simple Network Management Protocol) service for Windows. This is built into Windows, but not installed by default. I used this tutorial.

2. Install Speedfan -- http://www.almico.com/speedfan.php

3. Install Speedfan SNMP Extension (makes Speedfan data available via SNMP) -- http://code.bastart.eu.org/projects/sfsnmp/

4. Add the Python SNMP framework to the XBMC Python library -- http://pysnmp.sourceforge.net/

With these components, I was able to write a basic python script to access the Speedfan data I wanted. I'm sure someone with more programming experience could create a nice .py script or otherwise integrate this into the XBMC interface.
Reply
#14
frameskip Wrote:I just wanted to chip in my 2 cents on how this can be done in Windows with free software. I'm definitely not a programmer, but I've patched together the following to get my Speedfan information to show in XBMC as a proof of concept:

1. Install SNMP (Simple Network Management Protocol) service for Windows. This is built into Windows, but not installed by default. I used this tutorial.

2. Install Speedfan -- http://www.almico.com/speedfan.php

3. Install Speedfan SNMP Extension (makes Speedfan data available via SNMP) -- http://code.bastart.eu.org/projects/sfsnmp/

4. Add the Python SNMP framework to the XBMC Python library -- http://pysnmp.sourceforge.net/

With these components, I was able to write a basic python script to access the Speedfan data I wanted. I'm sure someone with more programming experience could create a nice .py script or otherwise integrate this into the XBMC interface.
Or you could skip all this end-around 4 steps to go wrong and pull the information directly from SpeedFan which exports it via a named shared memory region area SFSharedMemory_ALM. It takes about 10 minutes of coding and it is native.

However, is coding for a single 3rd party app a good idea?
Reply
#15
What the hell I was bored at work so this will probably work:
Code:
#pragma pack(push,1)
struct SpeedFanSMA {
    WORD version;
    WORD flags;
    int MemSize;
    int handle;
    WORD NumTemps;
    WORD NumFans;
    WORD NumVolts;
    int temps[32];
    int fans[32];
    int volts[32];
};
#pragma pack(pop)

float CWIN32Util::GetSpeedFanTemp(int index)
{
  HANDLE hMapHandle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0,
    sizeof(struct SpeedFanSMA), _T("SFSharedMemory_ALM"));
  if (hMapHandle == 0 || GetLastError() != ERROR_ALREADY_EXISTS)
    return 0.0f;
  struct SpeedFanSMA *p = (struct SpeedFanSMA *)MapViewOfFile(hMapHandle, FILE_MAP_READ,
    0, 0, sizeof(struct SpeedFanSMA));
  if (p)
  {
    float retVal = p->temps[index] / 100.0f;
    UnmapViewOfFile((void *)p);
    CloseHandle(hMapHandle);
    return retVal;
  }
  else
    CloseHandle(hMapHandle);
  return 0.0f;
}
EDIT: 28 minutes, but in my defense I spent most of that time at my boss' desk trying to figure out why his database server wouldn't start. Tested it on my system, my Intel CPU cores are temp indexes 5 and 6, so of course, this will need to be configurable. Also it looks like it only gives whole numbers in degrees C, so returning a float is probably overkill.
Reply

Logout Mark Read Team Forum Stats Members Help
[WINDOWS] Where do I look to see about memory display and temps0