LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2010, 10:47 AM   #1
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Rep: Reputation: 0
How can I detect a throttled clock in software


I'm running on a Xenon L5408 and my OS is CentOS 5.4. The system I'm developing needs to be able to run in a room that *may* get rather hot.

When the core temperatures gets up to around 99DegC I get the following message sent to the terminal. "temperature above threshold cpu clock throttled". So Linux some how knows whats going on.

So I'm now running in a degraded state. My question is, from an application I'm writting (c++), how would I go about detecting a throttled clock.

Many Thanks,
 
Old 06-03-2010, 10:52 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
you can read kernel messages via /proc file system: /proc/acpi/processor/CPU0/throttling
 
Old 06-04-2010, 04:15 AM   #3
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the reply. I've looked at this file and it says <not supported>

Further looking round on the web and I see that "/proc/acpi is being replaced by interfaces in /sys and new software should not look in /proc." (ref- http://acpi.sourceforge.net/document...processor.html)

But I can't find a throttling under /sys. Do you know where the correct version is? Or is it not supported in my OS?
 
Old 06-04-2010, 04:54 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Why do you care ?.
Strictly speaking the CPU (core) is running degraded, not what we normally think of as "the clock" from a userspace perspective. It's possible the CPU could drop into different states at any time, not just from temp.
 
Old 06-04-2010, 06:16 AM   #5
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
I want to be able to log (in my own logfile) when the CPU is running degraded to help with diagnosing the events the happened before the throttling occured.(Maybe a fan failed just before the throttling)

It might also enable me to stop processors intensive but none critical applications in the system.

Also, I'd like to know to what extent its throttling. Looking at the link I've gave above it appears the throttling can be in various state (of forced sleeping)
 
Old 06-04-2010, 11:46 PM   #6
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
Quote:
Further looking round on the web and I see that "/proc/acpi is being replaced by interfaces in /sys and new software should not look in /proc." (ref- http://acpi.sourceforge.net/document...processor.html)

But I can't find a throttling under /sys.
/sys/devices/system/cpu/cpu0/thermal_throttle/throttle_count
 
Old 06-07-2010, 03:52 AM   #7
mookNOW
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 0
the contents of /sys/devices/system/cpu/cpu0 on my machine is...

cache
cpufreq
crash_notes
topology

I don't seem to have a thermal_throttle directory. Is there something I need to active in the operating system?
 
  


Reply



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
CPU0: Temperature above threshold, cpu clock throttled help Elnegro8 Linux - Hardware 7 03-11-2009 06:05 AM
Temperature above threshold, cpu clock throttled deathsfriend99 Linux - Software 11 12-08-2008 12:37 PM
Can sendmail be throttled down? thekillerbean Linux - Software 4 05-26-2005 12:45 AM
Soundcard (snd_via82xx) sounds like a throttled chimp alex.e.c Linux - Hardware 2 05-20-2004 08:42 AM
Samba connections throttled by windows XP? BinaryBob Linux - Networking 3 12-12-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:51 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
Open Source Consulting | Domain Registration