SlideShare a Scribd company logo
1 of 8
Design Spec. of
nVidia Throttling Monitor(nTM)
 Purpose
This program was created to monitor CPU related behavior, by reporting result
after thermal management mechanism starts with information such as throttled
CPU temperature, frequency and trigger flag.
 Preparation
1. Ubuntu/Linux environment is recommended to run this tool.
2. This tool will be functional in any kind of product on Android platform by
adb shell, including Smart phone (S500) and Tablet
(A720/A510/A700/A210/A100).
 Contributions
1. Help User (RD/TE) to be familiar with the basic operation of CPU throttling
mechanism no matter on platform nVidia Tegra or QCT 8X series.
2. Customized configuration of testing count, timing and throttling threshold
are done within this tool to fit with different need in specified project.
3. Automatically report for the result of successfully CPU throttled by
customized messages such as, “Normal”, “PASS” or “Failed”.
4. Can be logged to text file for developer’s reference when problems need to
be traced or solved.
 Concept
1. All related source code was created with shell script under GPL agreement .
2. Several arguments, variables or path may need to be fixed or adjusted by
specified project.
3. By regularly reporting routines, it will show the current platform
information (CPU frequency/temperature/flag, etc.), once the customized
threshold was reached, the information will changed to show messages
related to throttled result.
4. This tool will be automatically shutdown once the goal (successfully
throttled) was done, otherwise the process will keep going on monitoring.
 Operation
1. Copy tool “run_nTM.sh” to path where adb resides.
cp run_nTM.sh /the/path/of/your/adb
2. Change permission by the following command,
chmod 755 run_nTM.sh
3. Execute by the following command,
./run_nTM.sh
4. Console will show message as follow, please input with decimal number.
5. Input customized Throttling threshold with decimal number.
6. Daemon will start to monitor as the following message, Status item will
keep showing “Normal” when one any threshold was reached.
7. Daemon starts analyze the latest status once Throttling threshold was
reached by the following message, If DUT is still getting hot, the
monitoring daemon will keep working as usual by show “Failed, try again!”
as below:
8. The “PASS” message will be popup to user when any one of cooling
condition was reached, including the lower of CPU frequency, temperature,
or Throttling flag was dismissed. Daemon will be automatically killed once
the result is PASS within 10 seconds. (customizable)
 Implementation
Source code is presented at the bottom of this document.
#!/bin/bash
#
# Program: nVidia Throttling Monitor (nTM)
# This program was created to monitor CPU temperature
# and clock, reporting result after throttle mechanism starts.
#Arthor:
# StanleyTW_Chang@acer.com.tw
# History:
# 2012/10/25 v0.2
#Sysfs node:
# CPU Temperature: /sys/devices/platform/tegra-i2c.4/i2c-4/4-004c/temperature
# CPU Frequency: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
# CPU Frequency: /d/clock/cpu/rate
# Throttle Flag: /sys/devices/system/cpu/cpu0/cpufreq/throttle
# Throttle Flag: /d/cpu-tegra/throttle
count=0
cpu_tp=0
cpu_ck=0
new_ck=0
cpu_tl=2
tl_level=0
st_level=90
bat_tp=0
chg_cr=0
tmp_lv=0
echo -n "Please Input Testing Count : "
read count
if [ "$count" = 0 -o "$count" = "" ]; then
echo "Invalid count, input AGAIN! "
read count
fi
echo -n "Please Input Throttle Threshold (>0) : "
read tl_level
if [ "$tl_level" = 0 -o "$tl_level" = "" ]; then
echo "Invalid threshold, input AGAIN! "
read tl_level
if [ "$tl_level" = 0 -o "$tl_level" = "" ]; then
echo "Wrong Threshold again, program terminated. "
exit 0
fi
fi
echo "-----------------------------"
for (( x=1 ; x<=count ; x=x+1 ))
do
today=`date`
echo $today
echo "nTM Getting data count [$x]"
echo " "
tmp_lv=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4-
004c/temperature_alert)
echo "Alert_limit: $tmp_lv"
cpu_tp=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4-
004c/ext_temperature)
echo "CPU_now_tmp: $cpu_tp"
cpu_ck=$(./adb shell cat /d/clock/cpu/rate)
echo "CPU_cur_feq: $cpu_ck"
cpu_tl=$(./adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/throttle)
# echo "Throt_state: $cpu_tl"
bat_tp=$(./adb shell cat /sys/dev-info_battery/Temperature)
echo "Bat_now_tmp: $bat_tp"
chg_cr=$(./adb shell cat /sys/dev-info_battery/Charge_current)
echo "Chg_current: $chg_cr"
echo " "
if [ "$cpu_tl" = 1 -o "$cpu_tp" > $tl_level ]; then
echo "Status: Over Threshold $tl_level"
echo "Action: Start Throttling"
for (( y=1 ; y<=5 ; y=y+1 ))
do
new_ck=$(./adb shell cat /d/clock/cpu/rate)
echo "CPU_cur_feq: $new_ck"
sleep 2
cpu_tp=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4-
004c/ext_temperature)
if [ "$cpu_tp" < $tl_level -o $new_ck < $cpu_ck ]; then
echo "Result: Throttle Completed"
cpu_ck=$(./adb shell cat /d/clock/cpu/rate)
cpu_tp=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4-
004c/ext_temperature)
echo " "
echo "??Info after Throttling "
echo "??CPU_now_tmp: $cpu_tp"
echo "??CPU_cur_feq: $cpu_ck"
echo "??Bat_now_tmp: $bat_tp"
echo "??Chg_current: $chg_cr"
sleep 2
echo " "
echo "Report: Function PASS!"
echo "nTM will auto terminate in 10 seconds..."
echo " "
sleep 10
exit 0
else
if [ $y = 5 ]; then
echo "Result: Failed, try again!"
else
echo "Result: cooling stage $y"
fi
fi
done
else
echo "Status: Normal"
fi
echo "-----------------------------"
sleep 3
done
echo "nTM complete with $count times"
echo "-----------------------------"

More Related Content

Viewers also liked

Aagw3 zhe guo3
Aagw3   zhe guo3Aagw3   zhe guo3
Aagw3 zhe guo3mcomanescu
 
How to deploy docker container inside ikoula's cloud
How to deploy docker container inside ikoula's cloudHow to deploy docker container inside ikoula's cloud
How to deploy docker container inside ikoula's cloudNicolas Trauwaen
 
Str 581 guide 3 89) Which social responsibility theory has been advocated by ...
Str 581 guide 3 89) Which social responsibility theory has been advocated by ...Str 581 guide 3 89) Which social responsibility theory has been advocated by ...
Str 581 guide 3 89) Which social responsibility theory has been advocated by ...sankarananthcj
 
How To Leverage Employee Generated Content to Support Your Recruiting Efforts
How To Leverage Employee Generated Content to Support Your Recruiting Efforts How To Leverage Employee Generated Content to Support Your Recruiting Efforts
How To Leverage Employee Generated Content to Support Your Recruiting Efforts RecruitingDaily.com LLC
 
Curriculum RKDF UNIVERSITY.PPT
Curriculum RKDF UNIVERSITY.PPTCurriculum RKDF UNIVERSITY.PPT
Curriculum RKDF UNIVERSITY.PPTMoeez Shem
 
Marcia Godinho - Portfolio Julho 2014 (Low Resolution)
Marcia Godinho - Portfolio Julho 2014 (Low Resolution)Marcia Godinho - Portfolio Julho 2014 (Low Resolution)
Marcia Godinho - Portfolio Julho 2014 (Low Resolution)Marcia Godinho
 

Viewers also liked (12)

Left - Right
Left - RightLeft - Right
Left - Right
 
Sejarah uang
Sejarah uangSejarah uang
Sejarah uang
 
Aagw3 zhe guo3
Aagw3   zhe guo3Aagw3   zhe guo3
Aagw3 zhe guo3
 
How to deploy docker container inside ikoula's cloud
How to deploy docker container inside ikoula's cloudHow to deploy docker container inside ikoula's cloud
How to deploy docker container inside ikoula's cloud
 
Kế hoạch
Kế hoạchKế hoạch
Kế hoạch
 
Test
TestTest
Test
 
Str 581 guide 3 89) Which social responsibility theory has been advocated by ...
Str 581 guide 3 89) Which social responsibility theory has been advocated by ...Str 581 guide 3 89) Which social responsibility theory has been advocated by ...
Str 581 guide 3 89) Which social responsibility theory has been advocated by ...
 
How To Leverage Employee Generated Content to Support Your Recruiting Efforts
How To Leverage Employee Generated Content to Support Your Recruiting Efforts How To Leverage Employee Generated Content to Support Your Recruiting Efforts
How To Leverage Employee Generated Content to Support Your Recruiting Efforts
 
Aprestamiento
AprestamientoAprestamiento
Aprestamiento
 
Curriculum RKDF UNIVERSITY.PPT
Curriculum RKDF UNIVERSITY.PPTCurriculum RKDF UNIVERSITY.PPT
Curriculum RKDF UNIVERSITY.PPT
 
Curing Diabetes
Curing DiabetesCuring Diabetes
Curing Diabetes
 
Marcia Godinho - Portfolio Julho 2014 (Low Resolution)
Marcia Godinho - Portfolio Julho 2014 (Low Resolution)Marcia Godinho - Portfolio Julho 2014 (Low Resolution)
Marcia Godinho - Portfolio Julho 2014 (Low Resolution)
 

Similar to Tegra Throttling Monitor

OSTEP Chapter2 Introduction
OSTEP Chapter2 IntroductionOSTEP Chapter2 Introduction
OSTEP Chapter2 IntroductionShuya Osaki
 
Micro c lab2(led patterns)
Micro c lab2(led patterns)Micro c lab2(led patterns)
Micro c lab2(led patterns)Mashood
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docxfelicidaddinwoodie
 
망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15종인 전
 
Remote temperature monitor (DHT11)
Remote temperature monitor (DHT11)Remote temperature monitor (DHT11)
Remote temperature monitor (DHT11)Parshwadeep Lahane
 
maXbox Starter 42 Multiprocessing Programming
maXbox Starter 42 Multiprocessing Programming maXbox Starter 42 Multiprocessing Programming
maXbox Starter 42 Multiprocessing Programming Max Kleiner
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debuggingHao-Ran Liu
 
HKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightHKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightLinaro
 
Servers and Processes: Behavior and Analysis
Servers and Processes: Behavior and AnalysisServers and Processes: Behavior and Analysis
Servers and Processes: Behavior and Analysisdreamwidth
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyAnne Nicolas
 
intro unix/linux 10
intro unix/linux 10intro unix/linux 10
intro unix/linux 10duquoi
 
Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)Julien SIMON
 
How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanIvan Silva
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share.Gastón. .Bx.
 

Similar to Tegra Throttling Monitor (20)

OSTEP Chapter2 Introduction
OSTEP Chapter2 IntroductionOSTEP Chapter2 Introduction
OSTEP Chapter2 Introduction
 
Presentación1
Presentación1Presentación1
Presentación1
 
Micro c lab2(led patterns)
Micro c lab2(led patterns)Micro c lab2(led patterns)
Micro c lab2(led patterns)
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
 
망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15망고100 보드로 놀아보자 15
망고100 보드로 놀아보자 15
 
Remote temperature monitor (DHT11)
Remote temperature monitor (DHT11)Remote temperature monitor (DHT11)
Remote temperature monitor (DHT11)
 
maXbox Starter 42 Multiprocessing Programming
maXbox Starter 42 Multiprocessing Programming maXbox Starter 42 Multiprocessing Programming
maXbox Starter 42 Multiprocessing Programming
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugging
 
2004 ugm-tips-tricks
2004 ugm-tips-tricks2004 ugm-tips-tricks
2004 ugm-tips-tricks
 
INET for Starters
INET for StartersINET for Starters
INET for Starters
 
HKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with CoresightHKG18-TR14 - Postmortem Debugging with Coresight
HKG18-TR14 - Postmortem Debugging with Coresight
 
Servers and Processes: Behavior and Analysis
Servers and Processes: Behavior and AnalysisServers and Processes: Behavior and Analysis
Servers and Processes: Behavior and Analysis
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 
intro unix/linux 10
intro unix/linux 10intro unix/linux 10
intro unix/linux 10
 
Alta disponibilidad en GNU/Linux
Alta disponibilidad en GNU/LinuxAlta disponibilidad en GNU/Linux
Alta disponibilidad en GNU/Linux
 
Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)
 
How to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by IvanHow to solve misalignment lun netapp on linux servers by Ivan
How to solve misalignment lun netapp on linux servers by Ivan
 
Boot prom basics
Boot prom basicsBoot prom basics
Boot prom basics
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
AIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge ShareAIX Advanced Administration Knowledge Share
AIX Advanced Administration Knowledge Share
 

Recently uploaded

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Tegra Throttling Monitor

  • 1. Design Spec. of nVidia Throttling Monitor(nTM)
  • 2.  Purpose This program was created to monitor CPU related behavior, by reporting result after thermal management mechanism starts with information such as throttled CPU temperature, frequency and trigger flag.  Preparation 1. Ubuntu/Linux environment is recommended to run this tool. 2. This tool will be functional in any kind of product on Android platform by adb shell, including Smart phone (S500) and Tablet (A720/A510/A700/A210/A100).  Contributions 1. Help User (RD/TE) to be familiar with the basic operation of CPU throttling mechanism no matter on platform nVidia Tegra or QCT 8X series. 2. Customized configuration of testing count, timing and throttling threshold are done within this tool to fit with different need in specified project. 3. Automatically report for the result of successfully CPU throttled by customized messages such as, “Normal”, “PASS” or “Failed”. 4. Can be logged to text file for developer’s reference when problems need to be traced or solved.  Concept 1. All related source code was created with shell script under GPL agreement . 2. Several arguments, variables or path may need to be fixed or adjusted by specified project. 3. By regularly reporting routines, it will show the current platform information (CPU frequency/temperature/flag, etc.), once the customized threshold was reached, the information will changed to show messages related to throttled result. 4. This tool will be automatically shutdown once the goal (successfully throttled) was done, otherwise the process will keep going on monitoring.  Operation 1. Copy tool “run_nTM.sh” to path where adb resides. cp run_nTM.sh /the/path/of/your/adb 2. Change permission by the following command, chmod 755 run_nTM.sh
  • 3. 3. Execute by the following command, ./run_nTM.sh 4. Console will show message as follow, please input with decimal number. 5. Input customized Throttling threshold with decimal number. 6. Daemon will start to monitor as the following message, Status item will keep showing “Normal” when one any threshold was reached. 7. Daemon starts analyze the latest status once Throttling threshold was reached by the following message, If DUT is still getting hot, the monitoring daemon will keep working as usual by show “Failed, try again!” as below:
  • 4. 8. The “PASS” message will be popup to user when any one of cooling condition was reached, including the lower of CPU frequency, temperature, or Throttling flag was dismissed. Daemon will be automatically killed once the result is PASS within 10 seconds. (customizable)  Implementation Source code is presented at the bottom of this document.
  • 5. #!/bin/bash # # Program: nVidia Throttling Monitor (nTM) # This program was created to monitor CPU temperature # and clock, reporting result after throttle mechanism starts. #Arthor: # StanleyTW_Chang@acer.com.tw # History: # 2012/10/25 v0.2 #Sysfs node: # CPU Temperature: /sys/devices/platform/tegra-i2c.4/i2c-4/4-004c/temperature # CPU Frequency: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq # CPU Frequency: /d/clock/cpu/rate # Throttle Flag: /sys/devices/system/cpu/cpu0/cpufreq/throttle # Throttle Flag: /d/cpu-tegra/throttle count=0 cpu_tp=0 cpu_ck=0 new_ck=0 cpu_tl=2 tl_level=0 st_level=90 bat_tp=0 chg_cr=0 tmp_lv=0 echo -n "Please Input Testing Count : " read count if [ "$count" = 0 -o "$count" = "" ]; then echo "Invalid count, input AGAIN! " read count fi echo -n "Please Input Throttle Threshold (>0) : " read tl_level if [ "$tl_level" = 0 -o "$tl_level" = "" ]; then
  • 6. echo "Invalid threshold, input AGAIN! " read tl_level if [ "$tl_level" = 0 -o "$tl_level" = "" ]; then echo "Wrong Threshold again, program terminated. " exit 0 fi fi echo "-----------------------------" for (( x=1 ; x<=count ; x=x+1 )) do today=`date` echo $today echo "nTM Getting data count [$x]" echo " " tmp_lv=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4- 004c/temperature_alert) echo "Alert_limit: $tmp_lv" cpu_tp=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4- 004c/ext_temperature) echo "CPU_now_tmp: $cpu_tp" cpu_ck=$(./adb shell cat /d/clock/cpu/rate) echo "CPU_cur_feq: $cpu_ck" cpu_tl=$(./adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/throttle) # echo "Throt_state: $cpu_tl" bat_tp=$(./adb shell cat /sys/dev-info_battery/Temperature) echo "Bat_now_tmp: $bat_tp" chg_cr=$(./adb shell cat /sys/dev-info_battery/Charge_current) echo "Chg_current: $chg_cr" echo " "
  • 7. if [ "$cpu_tl" = 1 -o "$cpu_tp" > $tl_level ]; then echo "Status: Over Threshold $tl_level" echo "Action: Start Throttling" for (( y=1 ; y<=5 ; y=y+1 )) do new_ck=$(./adb shell cat /d/clock/cpu/rate) echo "CPU_cur_feq: $new_ck" sleep 2 cpu_tp=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4- 004c/ext_temperature) if [ "$cpu_tp" < $tl_level -o $new_ck < $cpu_ck ]; then echo "Result: Throttle Completed" cpu_ck=$(./adb shell cat /d/clock/cpu/rate) cpu_tp=$(./adb shell cat /sys/class/i2c-dev/i2c-4/device/4- 004c/ext_temperature) echo " " echo "??Info after Throttling " echo "??CPU_now_tmp: $cpu_tp" echo "??CPU_cur_feq: $cpu_ck" echo "??Bat_now_tmp: $bat_tp" echo "??Chg_current: $chg_cr" sleep 2 echo " " echo "Report: Function PASS!" echo "nTM will auto terminate in 10 seconds..." echo " " sleep 10 exit 0 else if [ $y = 5 ]; then echo "Result: Failed, try again!" else echo "Result: cooling stage $y" fi fi done
  • 8. else echo "Status: Normal" fi echo "-----------------------------" sleep 3 done echo "nTM complete with $count times" echo "-----------------------------"