LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices



Reply
 
Search this Thread
Old 04-27-2005, 03:25 PM   #1
bucovaina78
Member
 
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian,Ubuntu,Finnix,LFS
Posts: 282

Rep: Reputation: 33
writing simple acpi program


How do I write a program that simply monitors the cpu temperature. I know that the temperature can be read in

/proc/acpi/thermal_zone/temperature

Let's say it update's every 2 seconds.




And another question


How do I control the trigger for fan speed. I think my fan stops at 40C and starts again at 45C.

I know that the fan is able to run at 3 speeds (no action, normal, full)

Can anybody tell me where and how I can change the trigger for the fan, and the speeds.


Thx

Wannes
 
Old 04-27-2005, 08:46 PM   #2
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
If you just want to monitor the temp in X, there are already programs to do that. GKrellM is very popular.

If you want to monitor it from the command line you could do it with a simple bash script.

Code:
#!/bin/bash
FILE="/proc/acpi/thermal_zone/temperature"
while :
do
    i=`cat $FILE`
    echo -e -n "\033[7s"
    tput cup 0 69
    echo -n $i
    echo -e -n "\033[8u"
    sleep 2
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help writing a simple program justintime32 Mandriva 8 03-04-2005 09:12 PM
Help writing a simple script Garibaldi3489 Linux - General 10 12-18-2004 07:22 PM
writing a simple file system in linux Deepthi_57 Linux - Newbie 1 05-03-2004 01:42 AM
Simple Question re: enabling ACPI in BIOS tigerflag Slackware - Installation 11 04-21-2004 07:40 AM
Writing a simple KDE application yapp Programming 1 12-10-2003 04:39 PM


All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration