Get CPU Fan Speed and CPU Temp

B

Ben Voigt

That's what I said in my previous email. I also noted that if
The BIOS maker isn't what you think, the company whose name is on it, like
AMI or AWARD. All BIOSes are customized to support the particular hardware,
and reading temps and stuff is part of that. Probably the only standard, is
the API for putting the readouts on the "hardware monitoring screen". So
the only "BIOS maker", as far as sensors are concerned, is the mobo
manufacturer. And yes, they usually do have some sort of standardized
protocols good for maybe several dozen models of motherboard, because the
vendor hardware monitoring software usually is the same download for quite a
few boards.

You should be able to read temps from the CPU in a fairly portable manner,
as there are only a couple different protocols -- but only the most recent
CPUs implement that at all. Hardware monitoring chips have to be dealt with
independently. It's probably going to be far cheaper for you to throw a few
grand at the developers of speedfan or mbm and license their existing code,
than to duplicate that effort yourself -- especially as that development is
probably going to mean a bunch of NDAs and non-competes that will cost you
just as much with lawyers.
 
W

Willy Denoyette [MVP]

Ben Voigt said:
The BIOS maker isn't what you think, the company whose name is on it, like AMI or AWARD.
All BIOSes are customized to support the particular hardware, and reading temps and stuff
is part of that. Probably the only standard, is the API for putting the readouts on the
"hardware monitoring screen". So the only "BIOS maker", as far as sensors are concerned,
is the mobo manufacturer. And yes, they usually do have some sort of standardized
protocols good for maybe several dozen models of motherboard, because the vendor hardware
monitoring software usually is the same download for quite a few boards.

You should be able to read temps from the CPU in a fairly portable manner, as there are
only a couple different protocols -- but only the most recent CPUs implement that at all.
Hardware monitoring chips have to be dealt with independently. It's probably going to be
far cheaper for you to throw a few grand at the developers of speedfan or mbm and license
their existing code,
than to duplicate that effort yourself -- especially as that development is probably going
to mean a bunch of NDAs and non-competes that will cost you just as much with lawyers.

Ben, I'm not sure why you are replying to me, I'm not the OP and have no issues with this.
I'm working at HP, and I know perfectly well were to get the info from, I also know what a
"BIOS maker" is. But I also know, from my CPQ period, that things aren't that simple, during
a couple of years it was part of my job to keep track of this (ACPI and SMBIOS specs, Power
Management stuff) in order to develop CPQ's management suite for servers and networks. I'm
no longer a member of that team after the CPQ/HP merge, so I can't accurately comment on the
latest evolutions, all I know is that we extend the BIOS to publish this info (following the
smbios specifications through the smbios.sys driver interface) to the management software
that uses CIM (WBEM), or through direct access.
As I said earlier, we (and most other system vendors) do expose the counters to user space
for the latest system (PIV and later).
However, some counters are only available in some product lines, some counters are only
relevant for some systems depending on a number if criteria (especially power and thermal
zone management) , but also economic laws play an important role.

Willy.
 
B

Ben Voigt

Ben, I'm not sure why you are replying to me, I'm not the OP and have no
issues with this.

Sorry if I confused you, I was replying to the thread in general, not you in
particular. Looking back, I don't even think I quoted any of your text in
my post, so I should have replied to the parent.
 
M

Mike C#

Ben Voigt said:
You should be able to read temps from the CPU in a fairly portable manner,
as there are only a couple different protocols -- but only the most recent
CPUs implement that at all. Hardware monitoring chips have to be dealt
with independently. It's probably going to be far cheaper for you to
throw a few grand at the developers of speedfan or mbm and license their
existing code, than to duplicate that effort yourself -- especially as
that development is probably going to mean a bunch of NDAs and
non-competes that will cost you just as much with lawyers.
Wow, now that's absolutely ridiculous that I need to "throw a few grand" at
some third party company or hire a bunch of lawyers and sign a bunch of NDAs
and non-competes just to write a very simple program that reads the CPU fan
speed and thermal probes.

Nah, I think I'll just research it myself.

Thanks.
 
G

Guest

Mike C# said:
Well that's a kick in the pants. I was sort of hoping this would be one of
those nice and easy things, but it seems like nothing in Windows ever is...
In following this thread, I'm left with a big question: If it is available
in Linux, why can't we access it in windows? They solved the problem of
different MB, chips, Bios.

In looking at the Linux code, which I haven't completely examined, it
appears that they have simply developed a flat database that identifies where
to access the information.

I too thought this would be a simple process. I have found a commercial
program that accoomplishes this feat, but I have not been able to find the
info. for implimenting in visual studio.

If you find it please post it.
 
B

Ben Voigt

In following this thread, I'm left with a big question: If it is available
in Linux, why can't we access it in windows? They solved the problem of
different MB, chips, Bios.

In looking at the Linux code, which I haven't completely examined, it
appears that they have simply developed a flat database that identifies
where
to access the information.

There's still a fairly large amount of chip-specific code in lm_sensors.
All the drivers expose the same API though, so userspace tools just lookup
the units in that database you've noted, in order to do the correct
conversions.
 
M

Mike C#

lynnch said:
In following this thread, I'm left with a big question: If it is available
in Linux, why can't we access it in windows? They solved the problem of
different MB, chips, Bios.

In looking at the Linux code, which I haven't completely examined, it
appears that they have simply developed a flat database that identifies
where
to access the information.

I too thought this would be a simple process. I have found a commercial
program that accoomplishes this feat, but I have not been able to find the
info. for implimenting in visual studio.

If you find it please post it.

From what I've found so far, Linux exposes a function (or more) that runs in
kernel mode. NT apparently doesn't, so the first hurdle is to write a
kernel-mode driver (or user-mode driver that can provide access to kernel
mode I/O like giveio.sys). This is fairly well-documented (though it's a
pain in the @!#$%), and from what I've read you have to pay MS to digitally
sign your driver for Vista (could be wrong, just what I've been reading).

But once you have kernel mode access via your own custom driver, then it
appears you have to gather all the info for the umpteen hundreds of
motherboards and processors out there, which is quite a pain too. I'm
actually going dig through lm_sensors and see if I can use that as a
starting point, so I don't have to duplicate all the research that's been
done on it already.
 
C

ChristophGraham

Unfortunately many of the CIMv2 classes on MS platforms do not have
underlying instrumentation providers associated with them. However,
for HP commercial platforms sensor information is published into WMI
via the HP Client Management Interface. This interface surfaces BIOS
settings, sensor, and alert information for use by IT professionals
and programmers familiar with WMI. For more information, a technical
whitepaper and sample scripts can be obtained from http://www.hp.com/go/hpcmi/
 
W

Willy Denoyette [MVP]

ChristophGraham said:
Unfortunately many of the CIMv2 classes on MS platforms do not have
underlying instrumentation providers associated with them. However,
for HP commercial platforms sensor information is published into WMI
via the HP Client Management Interface. This interface surfaces BIOS
settings, sensor, and alert information for use by IT professionals
and programmers familiar with WMI. For more information, a technical
whitepaper and sample scripts can be obtained from http://www.hp.com/go/hpcmi/



Exactly what I said before, but I don't believe this will be of great help to the OP as this
is only available for selected HP/Compaq business line of systems.

Willy.
 
G

Guest

I tried to play with WMI to get the fan and probe info but got nothing from
attempt.
I used the WMI Object Browser from WMI Tools and the response was something
along the lines of there not being any instances.

However, I know my motherboard has sensors. I've used MSI's own monitor tool
as well as Speedfan which collected everything.

I also used pcpbios to dump out smbios info and there was no info on the
fans or probes. I thought I'd use WMI to get the raw smbios data and
enumerate through it based on the smbios spec and it showed the same info as
the pcpbios. In other words, no fan or probe info.
SMBios contained Types 0,1,2,3,4,5,6,7,8,9,11,12,13 (refer to the smbios
spec).

I think speedfan uses giveio.sys to get to the hardware info. I was
wondering if that is the only way. What is needed to get the info?

Thanks,
Nathan
 
M

Mike C#

Nathan said:
I tried to play with WMI to get the fan and probe info but got nothing from
attempt.
I used the WMI Object Browser from WMI Tools and the response was
something
along the lines of there not being any instances.

However, I know my motherboard has sensors. I've used MSI's own monitor
tool
as well as Speedfan which collected everything.

I also used pcpbios to dump out smbios info and there was no info on the
fans or probes. I thought I'd use WMI to get the raw smbios data and
enumerate through it based on the smbios spec and it showed the same info
as
the pcpbios. In other words, no fan or probe info.
SMBios contained Types 0,1,2,3,4,5,6,7,8,9,11,12,13 (refer to the smbios
spec).

I think speedfan uses giveio.sys to get to the hardware info. I was
wondering if that is the only way. What is needed to get the info?

Thanks,
Nathan

The general consensus seems to be that hardware vendors don't care to
provide us with a standardized interface, or standardized WMI drivers, for
retrieving fan speeds, voltages, CPU temp, etc. Doing it yourself appears
to involve a lot of painstaking research and corporate lawyers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top