need to keep track of my cpu temp via internet...

Discussion in 'OT Technology' started by Hydrogen, Jun 21, 2008.

  1. Hydrogen

    Hydrogen building block

    Joined:
    Apr 14, 2005
    Messages:
    2,615
    Likes Received:
    0
    Location:
    Joliet, IL
    I need a way to keep track of my cpu temp via the internet. I am thinking of something with a nice api like twitter or facebook. Twitter would be cool because then the data can be sms'ed to my cell. Facebook would be more work because an application would have to be developed for it, plus a database.

    1. Set up a cron script to get the temp data from terminal.
    2. Save data to xml file.
    3. Curl to transfer xml to blah blah blah api
    4. API posts to client.
    5. My pocket vibrates with the data that my computer is over heating.

    Few rules: must be open source, using ubuntu.

    Just wondering if anyone has any experience with the Twitter API or Facebook API, or can point me in a direction.

    Thanks.

    edit: hell it would probably be easier to have a phone that can do SSH
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    seems over-complicated, imo. You could very easily just have a cron script check the temp, and if over a certain threshold, it can send an email to your phone.

    no 3rd party API or crazy sites required.
     
  3. Hydrogen

    Hydrogen building block

    Joined:
    Apr 14, 2005
    Messages:
    2,615
    Likes Received:
    0
    Location:
    Joliet, IL
    Thanks for your reply. I will look into some emailing scripts.

    The benefit of using an internet client is so I can pull the information when ever and where ever.
     
  4. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    you could just as easily append the temp reading to a text file and host that. ftp would be a quick solution and also would not rely on 3rd party api.
     
  5. Hydrogen

    Hydrogen building block

    Joined:
    Apr 14, 2005
    Messages:
    2,615
    Likes Received:
    0
    Location:
    Joliet, IL
  6. trouphaz

    trouphaz New Member

    Joined:
    Sep 22, 2003
    Messages:
    2,666
    Likes Received:
    0
    can you explain why you need to monitor your computer temps so much? obviously you got it working at this point and i have nothing really to add. it just seems like a very strange thing to need to constantly monitor your PC's temp from afar to the point that you had to program some interface for it.
     
  7. Hydrogen

    Hydrogen building block

    Joined:
    Apr 14, 2005
    Messages:
    2,615
    Likes Received:
    0
    Location:
    Joliet, IL
    It's not going to stay on inevitably. Just so I know my computer can do work while I am away with out having to worry about it overheating, thus preventing lose in productivity (ie [email protected], etc).

    It was a learning experience, I don't work with technology professionally any more so it is always good to keep up on it. Plus I am new to the linux command line and shell scripts.
     
  8. Limp_Brisket

    Limp_Brisket New Member

    Joined:
    Jan 2, 2006
    Messages:
    48,422
    Likes Received:
    0
    Location:
    Utah
    are you overclocking your machine or something?
     
  9. TomDlgns

    TomDlgns OT Supporter

    Joined:
    Oct 24, 2004
    Messages:
    60,899
    Likes Received:
    323
  10. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    What good is this? If you can't see the readout locally, you won't be close enough to do anything about the problem if it does overheat.

    Just buy a better heatsink and call it a day.

    EDIT: Run [email protected] over the weekend and keep an eye on it. If it doesn't overheat then, it won't overheat while you're gone.
     
  11. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,444
    Likes Received:
    12
    you're making a simple solution way too complex. the hardest part is to see if the install of ubuntu has all of the acpi functions

    if you have data in your /proc/acpi/thermal_zone directory, some of which may be your cpu temps, you can email whomever when the value reaches a certain threshold

    THRESHOLD=70
    TEMPINFO=`cat /proc/acpi/thermal_zone/*/temperature`
    VALUE=`echo $TEMPINO | awk '{print $2}'`

    if [ $VALUE -ge $THRESHOLD ] then
    echo $TEMPINFO | mailx -s "WARNING: Your CPU is $VALUE C" [email protected]
    fi
     
  12. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    What script language is that, where the opposite of If is Fi?
     
  13. trouphaz

    trouphaz New Member

    Joined:
    Sep 22, 2003
    Messages:
    2,666
    Likes Received:
    0
    shell scripting. ksh, bash, sh.

    if [ test ]
    then
    do some shit
    elif [ test ]
    do some other shit
    fi
     
  14. Hydrogen

    Hydrogen building block

    Joined:
    Apr 14, 2005
    Messages:
    2,615
    Likes Received:
    0
    Location:
    Joliet, IL
    nope, typical early 2000s amd laptop that gets hot

    i used xsensors to pull the data, but i will look into acpi.
    linux, fi is just an 'end if'
     
  15. piratepenguin

    piratepenguin New Member

    Joined:
    Jun 18, 2006
    Messages:
    1,067
    Likes Received:
    0
    Location:
    Ireland
    Until the next heat wave...

    Won't the comp shut itself off if it gets too hot?

    edit: as far as I can tell my comp used to have serious overheating issues, but it would just shut itself off. It still works (though I have reason to suspect this caused my sound card to feck up). (I did suspect before it was electrostatic crap, but I added a new fan and the issue SEEMS to have stopped)

    You can setup phpsysinfo or the like and then you can see your temp, ram usage, disk space etc in a pretty interface from a far.

    edit: and yes, it's been Summertime when my overheating probs were serious. Well, my room is like a fucking greenhouse in Summertime.
     
    Last edited: Jun 23, 2008
  16. crontab

    crontab (uid = 0)

    Joined:
    Nov 14, 2000
    Messages:
    23,444
    Likes Received:
    12
    seems like xsensors only gives you info in a gui. doesn't help much in scripting. if xsensors can pull the info, that info should be somewhere in proc.
     
  17. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    God damn UNIX abbreviations. Do you really save any effort typing CP instead of copy, or LS instead of list? No, you don't. You know how much more effort it takes to type ELSEIF instead if ELIF? Zero.
     
  18. piratepenguin

    piratepenguin New Member

    Joined:
    Jun 18, 2006
    Messages:
    1,067
    Likes Received:
    0
    Location:
    Ireland
    Let's you get things done quicker. For defo I would say.

    And absolutely no effort to remember really . . .

    copy file1 file2
    cp file1 file2

    I like the UNIX way really :dunno:
     
  19. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    That's what A/C and curtains are for.
     
  20. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I don't like the UNIX way. Yes, you can learn to remember CP instead of copy, but you don't need to learn to remember copy. "Hmm, what's the command to copy a file? Ah hell, I'll just try 'copy'. Oh hey, it works!" It's called intuitiveness, and that's the thing that *nix needs more than anything else. Thank God Canonical was smart enough to figure that one out. I could give a shit if they make Debian more efficient, more secure, whatever...how about more usable? Yeah, there's an idea.
     
  21. piratepenguin

    piratepenguin New Member

    Joined:
    Jun 18, 2006
    Messages:
    1,067
    Likes Received:
    0
    Location:
    Ireland
    nautilus goes :wavey:

    Terminal is about efficiency.

    And I use Ubuntu and I get very pissed off at it's inability to do certain things from the GUI - like automount filesystems. Terrible. But the command line is a secret weapon that is to be learned.
     
  22. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    1. If you don't like the lack of a GUI for Feature X, go make one -- it's open-source, after all, that's what you're supposed to do if you see a problem.

    2. I've never had a problem with a filesystem not automounting, at least not after Kubuntu 7.04.

    3. Why is automounting even an issue? The only time you wouldn't want a filesystem to automount is under special circumstances that I have no comprehension of, so automounting should be the default -- NOT the other way around. And what do you know, Canonical figured that one out too. Smart guys.
     
  23. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    on windows I like automount. on linux, not so much. It has to do with how linux defaults to mounting filesystems, where "quick removal" would potentially damage the filesystem. Windows defaults to a "sync" io on removable devices so that you can effective remove the device without unmounting, assuming you wern't actively writing to the filesystem, at the time.

    linux CAN be configured to mount "sync", but it seems to have a signifigant performance hit that isn't present on windows. Furthermore, it's not the default -- and it should be.
     
  24. trouphaz

    trouphaz New Member

    Joined:
    Sep 22, 2003
    Messages:
    2,666
    Likes Received:
    0
    it keeps out the people who shouldn't be working on command line anyway. if you can't figure out how to copy a file, then stay out of the command line. :big grin:
     
  25. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    :werd:

    on a side note, I hate how I'm always typing "ls" or "ifconfig" in my windows command prompt :o
     

Share This Page