<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fb0Rnq</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fb0Rnq"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Fb0Rnq"/>
	<updated>2026-05-23T23:52:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29278</id>
		<title>Script for Undervolt Stress Testing</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29278"/>
		<updated>2007-04-12T23:16:21Z</updated>

		<summary type="html">&lt;p&gt;Fb0Rnq: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script helps in calibrating voltages when [[Pentium M undervolting and underclocking|undervolting a Pentium M processor]].&lt;br /&gt;
&lt;br /&gt;
People have many different tolerances for how far they will undervolt their system.  Some are eager to just run their Pentium-Ms at 700mV and abandon safety; they ramp their systems as far as they can without crashing their system, and maybe they pull the voltages up a margin from the failure point.  However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.  In the worst case, the system will fail months later, and the blame might be assigned to, say, a kernel upgrade or patch when really the system failed due to intermittent lack of power.  &lt;br /&gt;
&lt;br /&gt;
Many would like to guard themselves again such a failure and consequently have opted to run a prime number stress test such as [http://www.mersenne.org/prime.htm| MPrime] in a &amp;quot;torture test&amp;quot; mode, while they ramp down their voltages to find a comfortable margin from the failure point.  However, as per recommendations from a [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2006-July/034806.html| thread of the Linux-Thinkpad mailing list], perhaps even more can be done.  Following such advice, this script not only runs MPrime, but also toggles on and off a lot of power-demanding features of the laptop throughout the course of the test.  The idea is to more rapidly expose corner cases in which the system might act up.&lt;br /&gt;
&lt;br /&gt;
{{NOTE|Please feel ''very free'' to improve/fix this script.  My intent for its posting is to make its ownership as public as possible.  There's no need to try to E-mail me to validate your changes.  If you feel they are in the best interest of the public, just make the changes.  The script attempts to employ pre-conditions to intelligently apply functionality only to those laptops that appear to support it.  Hopefully, its framework will allow for extension without heavy redesign.}}&lt;br /&gt;
&lt;br /&gt;
{{WARN| There are ''very important'' warnings embedded into the comments of this script.  I have left them there because if you copy this script to your system, I would want you to carry these warnings as comments with you.  Please read these comments and the script very carefully.  Stress testing an undervolted system is not a trivial undertaking and you need to be as accountable as possible for what a script like this does.}}&lt;br /&gt;
&lt;br /&gt;
{{MoveToCode}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# DESCRIPTION AND MOTIVATION &lt;br /&gt;
# --------------------------&lt;br /&gt;
# Designed for an undervolted laptops with frequency stepping, this script&lt;br /&gt;
# swings the system between aggressive and low power use, and also swings&lt;br /&gt;
# among the available frequencies.&lt;br /&gt;
# &lt;br /&gt;
# The idea is that such exteme use of the system will likely explore corner&lt;br /&gt;
# cases where the system might fail.  Hopefully, such testing can curtail the&lt;br /&gt;
# time necessary to establish confidence in undervolted systems.&lt;br /&gt;
#&lt;br /&gt;
# In the background the MPrime program, a prime number search engine, runs in a&lt;br /&gt;
# &amp;quot;torture test&amp;quot; mode, in which it tests computations against known results and&lt;br /&gt;
# errs out if there's a discrepancy.  Unless it errs out, this script runs&lt;br /&gt;
# forever.&lt;br /&gt;
# &lt;br /&gt;
# IMPLEMENTATION&lt;br /&gt;
# --------------&lt;br /&gt;
# The design of this script attempts to address laptops beyond the Thinkpad T42&lt;br /&gt;
# for which it was designed.  Many of the function definitions are prepended&lt;br /&gt;
# with conditionals that check the system for functionality and either bail out&lt;br /&gt;
# or disable features accordingly.&lt;br /&gt;
#&lt;br /&gt;
# In particular, the nature of what &amp;quot;aggressive&amp;quot; constitutes is defined by a &lt;br /&gt;
# number of &amp;quot;toggle_&amp;quot; functions.  The pre-pended conditional to these functions&lt;br /&gt;
# appends the function name to $AGGRESSIVE_TOGGLES if the system appears to&lt;br /&gt;
# support the feature.  The toggle_aggression function then calls all the &lt;br /&gt;
# functions in $AGGRESSIVE_TOGGLES.  Look at these &amp;quot;toggle_&amp;quot; functions for &lt;br /&gt;
# examples of how to extend this script for other possible stressing.&lt;br /&gt;
#&lt;br /&gt;
# EXTERNAL PROGRAMS EMPLOYED&lt;br /&gt;
# --------------------------&lt;br /&gt;
# Test system integriy (required):  MPrime - http://www.mersenne.org/prime.htm&lt;br /&gt;
# Download files:  curl - http://curl.haxx.se&lt;br /&gt;
# Read random sectors from CD:  spew (for gorge) - http://spew.berlios.de&lt;br /&gt;
# Keep hard disk active:  stress - http://weather.ou.edu/~apw/projects/stress/&lt;br /&gt;
#&lt;br /&gt;
# EXECUTION&lt;br /&gt;
# ---------&lt;br /&gt;
# Read this script including all the warnings below, and then make sure all the&lt;br /&gt;
# variables in the &amp;quot;Script Globals&amp;quot; section are appropriately set. &lt;br /&gt;
#&lt;br /&gt;
# This script uses the mprime binary with the &amp;quot;-t&amp;quot; switch for the MPrime&lt;br /&gt;
# &amp;quot;torture test.&amp;quot;  This test by default uses all the memory available on the&lt;br /&gt;
# system.  However, if you run this system for many hours, your kernel may run&lt;br /&gt;
# out of memory, and kill mprime and this script.  To spare yourself this&lt;br /&gt;
# problem, use the &amp;quot;NightMemory=&amp;quot; and &amp;quot;DayMemory=&amp;quot; parameters in MPrime's&lt;br /&gt;
# local.ini file, a file typically in the same directory as the mprime&lt;br /&gt;
# executable (read the MPrime documentation for specifics).  The torture test&lt;br /&gt;
# by default uses the greater of these two settings, so just set them both a&lt;br /&gt;
# reasonable margin away from the total amount of memory available on your&lt;br /&gt;
# system.  On a system with 512MB of RAM, I set these parameters both to 448,&lt;br /&gt;
# and had enough memory left over to run my normal set of background processes.&lt;br /&gt;
#&lt;br /&gt;
# The arguments of this script are &amp;quot;aggression&amp;quot; toggles to disable.  Any&lt;br /&gt;
# function below that begins with &amp;quot;toggle_$OPTION&amp;quot; can be disabled by using&lt;br /&gt;
# $OPTION as one of the arguments of this script.  Otherwise, all the stressing&lt;br /&gt;
# that a system supports are enabled by default.&lt;br /&gt;
#&lt;br /&gt;
# Because of Warning 3 below, I recommend you run this script as&lt;br /&gt;
#&lt;br /&gt;
#     stress_test 2&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fb0Rnq</name></author>
		
	</entry>
</feed>