how to check temperature with C / C++ script

This is a discussion on how to check temperature with C / C++ script within the Linux Programming forums, part of the Platform Specific Boards category; hi, can anyone tell me how to check temperature in linux with C / C++ programming? just a little script ...

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    1

    how to check temperature with C / C++ script

    hi,

    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 08:04 PM.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

    --
    Mats
    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, 08:25 AM
  2. Script in games
    By Shakti in forum Game Programming
    Replies: 7
    Last Post: 09-27-2006, 01:27 AM
  3. From script to C to C++
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 09-11-2006, 05:35 AM
  4. Check application visibility
    By 3saul in forum Linux Programming
    Replies: 2
    Last Post: 02-13-2006, 05:13 PM
  5. temperature
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 08-12-2002, 12:31 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21