Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Temperature monitoring
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01357147
Message ID:
01357208
Vues:
22
>Hi All,
>
>Does anyone know where to find or have any examples of picking up the Temperature from the Motherboards temperature sensor? I want to try and write something to shutdown a Server if the air-conditioning fails and the ambient temperatue inside the case starts going up.
>
>Thanks,

The MSAcpi has to be enabled on the motherboard for this to work. You would need to use this at regular interval to detect the changes in temperature.
strComputer = "."
objWMIService = Getobject("winmgmts:\\" + strComputer + "\root\WMI")
colItems = objWMIService.ExecQuery("SELECT * FROM MSAcpi_ThermalZoneTemperature",,48)
For Each objItem In colItems
	? "-----------------------------------"
	? "MSAcpi_ThermalZoneTemperature instance"
	? "-----------------------------------"
	? "Current Temperature: " + transform(objItem.CurrentTemperature/100)
	? "Critical Trip Point: " + transform(objItem.CriticalTripPoint/100)
	? "Thermal Stamp: " + transform(objItem.ThermalStamp)
Next
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform