Thread: how to check temperature with C / C++ script

  1. #1
    Registered User
    Join Date
    May 2009

    how to check temperature with C / C++ script


    can anyone tell me how to check temperature in linux with C / C++ programming? just a little script will do. i need it for my new program. i seek the CPU temperature. Thanks a lot.
    Last edited by altic; 05-28-2009 at 07:04 PM.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    What temperature is it that you want to check? The met-office does a web-site that will give you the outside temperature. If you want the room temperature, you probably need a sensor of some sort.

    If you want to know the CPU or Case temperature you need to interface with the sensors in the system - lm-sensors is a package that will let you do that. Not quite sure how you actually interface to that.

    But from your question, it's not clear even which temperature you are looking to see.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using expect script in C program
    By nitinmhetre in forum Linux Programming
    Replies: 1
    Last Post: 12-21-2006, 07:25 AM
  2. Script in games
    By Shakti in forum Game Programming
    Replies: 7
    Last Post: 09-27-2006, 12:27 AM
  3. From script to C to C++
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 09-11-2006, 04:35 AM
  4. Check application visibility
    By 3saul in forum Linux Programming
    Replies: 2
    Last Post: 02-13-2006, 04:13 PM
  5. temperature
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 08-11-2002, 11:31 PM
Website Security Test