<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Script_for_Undervolt_Stress_Testing</id>
	<title>Script for Undervolt Stress Testing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Script_for_Undervolt_Stress_Testing"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;action=history"/>
	<updated>2026-05-12T19:02:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=38811&amp;oldid=prev</id>
		<title>Akw: Undervolt Stress Testing Script moved to 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=38811&amp;oldid=prev"/>
		<updated>2008-09-12T11:20:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/Undervolt_Stress_Testing_Script&quot; class=&quot;mw-redirect&quot; title=&quot;Undervolt Stress Testing Script&quot;&gt;Undervolt Stress Testing Script&lt;/a&gt; moved to &lt;a href=&quot;/wiki/Script_for_Undervolt_Stress_Testing&quot; title=&quot;Script for Undervolt Stress Testing&quot;&gt;Script for Undervolt Stress Testing&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:20, 12 September 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Akw</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=38758&amp;oldid=prev</id>
		<title>Akw at 09:53, 2 September 2008</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=38758&amp;oldid=prev"/>
		<updated>2008-09-02T09:53:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:53, 2 September 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l494&quot; &gt;Line 494:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 494:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;digg /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scripts]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scripts]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1thinkwiki:diff::1.12:old-29294:rev-38758 --&gt;
&lt;/table&gt;</summary>
		<author><name>Akw</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29294&amp;oldid=prev</id>
		<title>Ljs: fix broken link</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29294&amp;oldid=prev"/>
		<updated>2007-04-13T06:57:06Z</updated>

		<summary type="html">&lt;p&gt;fix broken link&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 06:57, 13 April 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;People have many different tolerances for how far they will undervolt their system.&amp;#160; 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.&amp;#160; However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.&amp;#160; 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.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;People have many different tolerances for how far they will undervolt their system.&amp;#160; 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.&amp;#160; However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.&amp;#160; 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.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&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.&amp;#160; However, as per recommendations from a [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2006-July/034806.html&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| &lt;/del&gt;thread of the Linux-Thinkpad mailing list], perhaps even more can be done.&amp;#160; 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.&amp;#160; The idea is to more rapidly expose corner cases in which the system might act up.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&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.&amp;#160; 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.&amp;#160; 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.&amp;#160; The idea is to more rapidly expose corner cases in which the system might act up.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NOTE|Please feel ''very free'' to improve/fix this script.&amp;#160; My intent for its posting is to make its ownership as public as possible.&amp;#160; There's no need to try to E-mail me to validate your changes.&amp;#160; If you feel they are in the best interest of the public, just make the changes.&amp;#160; The script attempts to employ pre-conditions to intelligently apply functionality only to those laptops that appear to support it.&amp;#160; Hopefully, its framework will allow for extension without heavy redesign.}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{NOTE|Please feel ''very free'' to improve/fix this script.&amp;#160; My intent for its posting is to make its ownership as public as possible.&amp;#160; There's no need to try to E-mail me to validate your changes.&amp;#160; If you feel they are in the best interest of the public, just make the changes.&amp;#160; The script attempts to employ pre-conditions to intelligently apply functionality only to those laptops that appear to support it.&amp;#160; Hopefully, its framework will allow for extension without heavy redesign.}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1thinkwiki:diff::1.12:old-29283:rev-29294 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ljs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29283&amp;oldid=prev</id>
		<title>Hmh: Undo corruption</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29283&amp;oldid=prev"/>
		<updated>2007-04-13T02:33:53Z</updated>

		<summary type="html">&lt;p&gt;Undo corruption&lt;/p&gt;
&lt;a href=&quot;https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;amp;diff=29283&amp;amp;oldid=29278&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Hmh</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29278&amp;oldid=prev</id>
		<title>Fb0Rnq at 23:16, 12 April 2007</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=29278&amp;oldid=prev"/>
		<updated>2007-04-12T23:16:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;amp;diff=29278&amp;amp;oldid=24217&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Fb0Rnq</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=24217&amp;oldid=prev</id>
		<title>Thinker: MoveToCode</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=24217&amp;oldid=prev"/>
		<updated>2006-08-17T07:31:32Z</updated>

		<summary type="html">&lt;p&gt;MoveToCode&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:31, 17 August 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot; &gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{WARN| There are ''very important'' warnings embedded into the comments of this script.&amp;#160; 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.&amp;#160; Please read these comments and the script very carefully.&amp;#160; 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;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{WARN| There are ''very important'' warnings embedded into the comments of this script.&amp;#160; 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.&amp;#160; Please read these comments and the script very carefully.&amp;#160; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{MoveToCode}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1thinkwiki:diff::1.12:old-23527:rev-24217 --&gt;
&lt;/table&gt;</summary>
		<author><name>Thinker</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23527&amp;oldid=prev</id>
		<title>Thinker: wikilink</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23527&amp;oldid=prev"/>
		<updated>2006-07-24T17:05:22Z</updated>

		<summary type="html">&lt;p&gt;wikilink&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:05, 24 July 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This script helps in calibrating voltages when [[Pentium M undervolting and underclocking|undervolting a Pentium M processor]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;People have many different tolerances for how far they will undervolt their system.&amp;#160; 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.&amp;#160; However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.&amp;#160; 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.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;People have many different tolerances for how far they will undervolt their system.&amp;#160; 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.&amp;#160; However, this provides only a weak degree of security as a number of failures can occur that might not surface immediately.&amp;#160; 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.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1thinkwiki:diff::1.12:old-23519:rev-23527 --&gt;
&lt;/table&gt;</summary>
		<author><name>Thinker</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23519&amp;oldid=prev</id>
		<title>TNKS: Typo</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23519&amp;oldid=prev"/>
		<updated>2006-07-24T16:10:00Z</updated>

		<summary type="html">&lt;p&gt;Typo&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:10, 24 July 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot; &gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# IMPLEMENTATION&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# IMPLEMENTATION&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# --------------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# --------------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The design of this script attempts to address &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;laptops beyond the Thinkpad&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The design of this script attempts to address laptops beyond the Thinkpad &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;T42&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T42 &lt;/del&gt;for which it was designed.&amp;#160; Many of the function definitions are prepended&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# for which it was designed.&amp;#160; Many of the function definitions are prepended&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# with conditionals that check the system for functionality and either bail out&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# with conditionals that check the system for functionality and either bail out&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# or disable features accordingly.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# or disable features accordingly.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1thinkwiki:diff::1.12:old-23517:rev-23519 --&gt;
&lt;/table&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23517&amp;oldid=prev</id>
		<title>TNKS at 15:55, 24 July 2006</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Script_for_Undervolt_Stress_Testing&amp;diff=23517&amp;oldid=prev"/>
		<updated>2006-07-24T15:55:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&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;
&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 the laptops beyond the Thinkpad&lt;br /&gt;
# T42 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;&amp;amp;1 | tee output&lt;br /&gt;
#&lt;br /&gt;
# so that you have a persistent record of what has happened in case your battery&lt;br /&gt;
# drains completely.&lt;br /&gt;
#&lt;br /&gt;
# Keeping in mind Warning 1.1, run the script for as long as it takes to &lt;br /&gt;
# establish confidence in your system (a few hours, half a day, etc.).&lt;br /&gt;
#&lt;br /&gt;
# WARNINGS&lt;br /&gt;
# --------&lt;br /&gt;
# 1) This is a STRESS test, and it is very possible that you may witness some&lt;br /&gt;
# very bad behavior.  Some systems might already be on the verge of breaking,&lt;br /&gt;
# and this script might push them over the edge, and damage them irreparably.&lt;br /&gt;
# Especially since you've probably undervolted your system, please accept the&lt;br /&gt;
# inherent risk in running this script.  In fact, I have even seen some&lt;br /&gt;
# unexpected behavior on non-undervolted systems running this script.  &lt;br /&gt;
#&lt;br /&gt;
# 1.1) This is a STRESS test, and it will run your system very hot at times.&lt;br /&gt;
# Since you are probably running this test because you've undervolted your&lt;br /&gt;
# system, you assumedly care a lot about conserving your battery's charge.&lt;br /&gt;
# However, running a system hot and needlessly running through charging cycles&lt;br /&gt;
# will tax your battery more than just normal use.  It is very difficult to&lt;br /&gt;
# even estimate how much of your battery's life you may throw away running&lt;br /&gt;
# this test.  In all likelihood on a battery that's not too old or too new, it&lt;br /&gt;
# should be imperceptible, and the security you'll gain after running this test&lt;br /&gt;
# will be worth it.  You can alway run this script without the battery&lt;br /&gt;
# connected -- just run it with an &amp;quot;ac_via_smapi&amp;quot; argument to disable &lt;br /&gt;
# toggling from the ac to battery power.&lt;br /&gt;
#&lt;br /&gt;
# 2) Please READ THIS SCRIPT BEFORE RUNNING IT.  It was very much designed for my&lt;br /&gt;
# personal system, and although it worked very well for my needs, it relies &lt;br /&gt;
# heavily on a number of external programs for full functionality.  Finding these&lt;br /&gt;
# programs isn't so bad (with the exception of MPrime all were available as &lt;br /&gt;
# Debian packages -- spew, gorge, curl, etc.).  As I noted above, I've tried to &lt;br /&gt;
# structure this script such that it can be extended (as opposed to overwritten) &lt;br /&gt;
# to support other functionality.  However, you should also read this script &lt;br /&gt;
# entirely because it's not mature, so it's difficult for me to document all the &lt;br /&gt;
# strange ways in which it might behave under various circumstances.&lt;br /&gt;
#&lt;br /&gt;
# 3) This script might drain your battery completely.  It has some strong measures&lt;br /&gt;
# to prevent that from happening, but I can't make guarantees.   &lt;br /&gt;
#&lt;br /&gt;
# 4) Be mindful that upon breaking out of this script, your system maybe not be&lt;br /&gt;
# in an agreeable state.  There is a bash trap that performs a lot of cleanup &lt;br /&gt;
# if you exit with a Ctrl-C.  But I didn't make the code to revert the CD's speed, &lt;br /&gt;
# the wireless device's original txpower, the display's brightness, etc.  Also, the &lt;br /&gt;
# bash trap isn't perfect, and might fail to restore the system.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
set -e  # Script designed to bail out on any irregularities.&lt;br /&gt;
&lt;br /&gt;
##############################################&lt;br /&gt;
# SCRIPT GLOBALS                             #&lt;br /&gt;
#  (may need some adjusting for your system) #&lt;br /&gt;
##############################################&lt;br /&gt;
&lt;br /&gt;
MPRIME_BIN=&amp;quot;./gimps/mprime&amp;quot; # MPrime binary location (get from&lt;br /&gt;
                            #   http://www.mersenne.org/freesoft.htm)&lt;br /&gt;
AGGRESSIVE_SLEEP_SEC=90     # Seconds for &amp;quot;agressive&amp;quot; testing interval when &lt;br /&gt;
                            #   testing with a fixed frequency&lt;br /&gt;
NONAGGRESSIVE_SLEEP_SEC=120 # Seconds for non-&amp;quot;aggressive&amp;quot; testing interval&lt;br /&gt;
                            #   when testing with a fixed frequency&lt;br /&gt;
FREQ_CYCLE_SLEEP_SEC=15     # Seconds for each random frequency when testing&lt;br /&gt;
                            #   with a fixed aggression&lt;br /&gt;
FREQ_CYCLE_NUM=15           # Number of random frequencies to cycle through &lt;br /&gt;
                            #   when testing with a fixed aggression&lt;br /&gt;
CAPACITY_LIMIT=50           # Minimum mWh required in battery before the script&lt;br /&gt;
                            #   takes time out to recharge the battery&lt;br /&gt;
SECONDS_TO_CHARGE=300       # Seconds to charge is $CAPACITY_LIMIT is reached&lt;br /&gt;
WIFI_DEVICE=eth1            # Set to garbage if you don't want to use wifi &lt;br /&gt;
MAX_TXPOWER=20              # Tx power (dB) used for wifi device in aggressive&lt;br /&gt;
                            #   mode (off in non-aggressive mode)&lt;br /&gt;
CDROM_DEV_FILE=/dev/hdc     # Set to garbage if you don't want to use the CD-ROM&lt;br /&gt;
MAX_CD_SPEED=24             # Speed of CD in aggressive mode (off in&lt;br /&gt;
                            #   non-aggressive mode)&lt;br /&gt;
&lt;br /&gt;
# Some services need to be stopped to prevent a conflict with&lt;br /&gt;
# aggressive/non-aggressive mode settings.  These services are restarted in&lt;br /&gt;
# reverse order upon the script's exit.  You can customize the path to these&lt;br /&gt;
# scripts here if your flavor of GNU doesn't use /etc/init.d/.&lt;br /&gt;
#&lt;br /&gt;
SERVICES_TO_STOP=&amp;quot;tpsmapi powernowd acpid sleepd laptop-mode&amp;quot;&lt;br /&gt;
PATH_TO_SERVICES_SCRIPTS=&amp;quot;/etc/init.d&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Some info that should be in SysFS or ProcFS.&lt;br /&gt;
#&lt;br /&gt;
SYS_CPU_DIR=/sys/devices/system/cpu/cpu0/cpufreq&lt;br /&gt;
FREQS=&amp;quot;$(cat $SYS_CPU_DIR/scaling_available_frequencies)&amp;quot;&lt;br /&gt;
FREQS_ARRAY=($FREQS)&lt;br /&gt;
SYS_TPSMAPI_BAT_DIR=/sys/devices/platform/smapi/BAT0&lt;br /&gt;
IBM_ACPI_BRIGHTNESS_FILE=/proc/acpi/ibm/brightness&lt;br /&gt;
RF_KILL_FILE=/sys/class/net/$WIFI_DEVICE/device/rf_kill&lt;br /&gt;
&lt;br /&gt;
############&lt;br /&gt;
# BINARIES #&lt;br /&gt;
############&lt;br /&gt;
#&lt;br /&gt;
# Establishes paths for all binaries to make it easier for functions to test if&lt;br /&gt;
# they are executable with 'test -x &amp;quot;$BINARY_BIN&amp;quot;'.  &lt;br /&gt;
#&lt;br /&gt;
{&lt;br /&gt;
  CURL_BIN=$(which curl)&lt;br /&gt;
  GORGE_BIN=$(which gorge)&lt;br /&gt;
  STRESS_BIN=$(which stress)&lt;br /&gt;
  IWCONFIG_BIN=$(which iwconfig)&lt;br /&gt;
  IFUP_BIN=$(which ifup)&lt;br /&gt;
  IFDOWN_BIN=$(which ifdown)&lt;br /&gt;
  EJECT_BIN=$(which eject)&lt;br /&gt;
  CPUFREQSET_BIN=$(which cpufreq-set)&lt;br /&gt;
  KILLALL_BIN=$(which killall)&lt;br /&gt;
  RENICE_BIN=$(which renice)&lt;br /&gt;
} || true&lt;br /&gt;
&lt;br /&gt;
#############&lt;br /&gt;
# FUNCTIONS #&lt;br /&gt;
############# &lt;br /&gt;
&lt;br /&gt;
# clean_up()&lt;br /&gt;
#&lt;br /&gt;
# Kills mprime background job and starts services that were stopped at the&lt;br /&gt;
# beginning of the scripts execution.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then echo &amp;quot;Sorry, this script uses killall&amp;quot; ; exit 1&lt;br /&gt;
fi&lt;br /&gt;
for service in $SERVICES_TO_STOP ; do&lt;br /&gt;
  if [ ! -x &amp;quot;$PATH_TO_SERVICES_SCRIPTS/$service&amp;quot; ]&lt;br /&gt;
    then echo &amp;quot;$PATH_TO_SERVICES_SCRIPTS/$service can't be called.&amp;quot; ; exit 1&lt;br /&gt;
  fi&lt;br /&gt;
done&lt;br /&gt;
clean_up()&lt;br /&gt;
{&lt;br /&gt;
  $KILLALL_BIN -q mprime || true&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
  local SERVICES_TO_START=&amp;quot;&amp;quot;&lt;br /&gt;
  for service in $SERVICES_TO_STOP&lt;br /&gt;
    do SERVICES_TO_START=&amp;quot;$service $SERVICES_TO_START&amp;quot;&lt;br /&gt;
  done&lt;br /&gt;
  for service in $SERVICES_TO_START&lt;br /&gt;
    do $PATH_TO_SERVICES_SCRIPTS/$service start&lt;br /&gt;
  done&lt;br /&gt;
}&lt;br /&gt;
trap &amp;quot;echo 'cleaning up...' ; clean_up&amp;quot; SIGINT SIGTERM SIGHUP&lt;br /&gt;
&lt;br /&gt;
# do_sleep()&lt;br /&gt;
#&lt;br /&gt;
# Before starting a testing interval, checks in the battery is low, and charges the&lt;br /&gt;
# battery if necessary.  After the testing interval, the running status of the &lt;br /&gt;
# mprime background job is verified. &lt;br /&gt;
#&lt;br /&gt;
# TODO: I've not addressed multiple batteries, APM, or ACPI.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -r &amp;quot;$SYS_TPSMAPI_BAT_DIR/remaining_capacity&amp;quot; ] &lt;br /&gt;
  then &lt;br /&gt;
    echo -n &amp;quot;WARNING: Thinkpad SMAPI SysFS interface not &amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo &amp;quot;available to detect if battery&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo -n &amp;quot;         level too low.  This script could drain &amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
    echo &amp;quot;all of your battery.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
fi&lt;br /&gt;
do_sleep()&lt;br /&gt;
{&lt;br /&gt;
  if [ -r &amp;quot;$SYS_TPSMAPI_BAT_DIR/remaining_capacity&amp;quot; ] ; then&lt;br /&gt;
    local REMAINING_CAPACITY&lt;br /&gt;
    while REMAINING_CAPACITY=$(cat $SYS_TPSMAPI_BAT_DIR/remaining_capacity \&lt;br /&gt;
                                2&amp;gt; /dev/std) \&lt;br /&gt;
      &amp;amp;&amp;amp; REMAINING_CAPACITY=${REMAINING_CAPACITY%% *} \&lt;br /&gt;
      &amp;amp;&amp;amp; [ &amp;quot;$REMAINING_CAPACITY&amp;quot; ] \&lt;br /&gt;
      &amp;amp;&amp;amp; [ &amp;quot;$REMAINING_CAPACITY&amp;quot; -lt &amp;quot;$CAPACITY_LIMIT&amp;quot; ] ; do&lt;br /&gt;
        echo ; echo -n &amp;quot;Battery is too low to continue, &amp;quot; &lt;br /&gt;
        echo &amp;quot;taking a break to charge up.&amp;quot;&lt;br /&gt;
        OLD_AGGRESSIVE=&amp;quot;$AGGRESSIVE&amp;quot;&lt;br /&gt;
        if [ &amp;quot;AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
        sleep $SECONDS_TO_CHARGE &lt;br /&gt;
        if [ ! &amp;quot;$OLD_AGGRESSIVE&amp;quot; = &amp;quot;$AGGRESSIVE&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
    done&lt;br /&gt;
  fi&lt;br /&gt;
  sleep $1&lt;br /&gt;
  if kill -0 $MPRIME_PID 2&amp;gt; /dev/null &lt;br /&gt;
    then return 0&lt;br /&gt;
    else &lt;br /&gt;
      echo ; echo &amp;quot;mprime bailed out here!&amp;quot;&lt;br /&gt;
      clean_up&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# set_frequency()&lt;br /&gt;
#&lt;br /&gt;
# Changes the frequency of the processor to $1.&lt;br /&gt;
#&lt;br /&gt;
# TODO: Perhaps there should be other ways to change the frequency another way.&lt;br /&gt;
#       I found cpufreq-set convenient because it handles both ProcFS _and_&lt;br /&gt;
#       SysFS.&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$CPUFREQSET_BIN&amp;quot; ] ; then&lt;br /&gt;
  echo &amp;quot;Sorry, the set_frequency() function needs to be updated&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  echo &amp;quot;    to change frequencies without cpufreq-set.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  exit 1&lt;br /&gt;
fi&lt;br /&gt;
set_frequency()&lt;br /&gt;
{&lt;br /&gt;
  $CPUFREQSET_BIN -f $1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_ac_via_smapi()&lt;br /&gt;
#&lt;br /&gt;
# If the system is an Thinkpad with the tp_smapi kernel module set up, the &lt;br /&gt;
# ac power is cut in an aggressive mode and returned in the non-agressive mode. &lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$SYS_TPSMAPI_BAT_DIR/force_discharge&amp;quot; \&lt;br /&gt;
  -a -w &amp;quot;$SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_ac_via_smapi&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_ac_via_smapi()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
      echo 0 &amp;gt; $SYS_TPSMAPI_BAT_DIR/force_discharge &lt;br /&gt;
      echo 0 &amp;gt; $SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&lt;br /&gt;
    else &lt;br /&gt;
      echo 1 &amp;gt; $SYS_TPSMAPI_BAT_DIR/force_discharge &lt;br /&gt;
      echo 5 &amp;gt; $SYS_TPSMAPI_BAT_DIR/inhibit_charge_minutes&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_ibm_acpi_brightness()&lt;br /&gt;
#&lt;br /&gt;
# If the Thinkpad ibm_acpi kernel module is set up, the brightness of screen&lt;br /&gt;
# is set to the brightest setting in an agressive mode and the dimmest setting&lt;br /&gt;
# otherwise.&lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$IBM_ACPI_BRIGHTNESS_FILE&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_ibm_acpi_brightness&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_ibm_acpi_brightness()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then echo level 0 &amp;gt; $IBM_ACPI_BRIGHTNESS_FILE&lt;br /&gt;
    else echo level 7 &amp;gt; $IBM_ACPI_BRIGHTNESS_FILE&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_intel_wireless()&lt;br /&gt;
#&lt;br /&gt;
# Turns the wireless device on in power-hogging mode when aggressive, and&lt;br /&gt;
# turns the device off otherwise.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Designed for the Intel 2200BG open source driver, and may not be &lt;br /&gt;
#   compatible with much else.  &lt;br /&gt;
#&lt;br /&gt;
if [ -w &amp;quot;$RF_KILL_FILE&amp;quot; -a -x &amp;quot;$PKILL_BIN&amp;quot; -a -x &amp;quot;$IFDOWN_BIN&amp;quot; \&lt;br /&gt;
  -a -x &amp;quot;$IFUP_BIN&amp;quot; -a -x &amp;quot;$IWCONFIG_BIN&amp;quot; -a &amp;quot;$WIFI_DEVICE&amp;quot; ] \&lt;br /&gt;
    &amp;amp;&amp;amp; grep &amp;quot;$WIFI_DEVICE&amp;quot; /proc/net/wireless&lt;br /&gt;
      then &lt;br /&gt;
        AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_intel_wireless&amp;quot;&lt;br /&gt;
        $IWCONFIG_BIN $WIFI_DEVICE txpower $MAX_TXPOWER&lt;br /&gt;
        $IWCONFIG_BIN $WIFI_DEVICE power off&lt;br /&gt;
fi&lt;br /&gt;
toggle_intel_wireless()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then echo 1 &amp;gt; $RF_KILL_FILE&lt;br /&gt;
    else &lt;br /&gt;
      echo 0 &amp;gt; $RF_KILL_FILE&lt;br /&gt;
      $PKILL_BIN ^ifdown$\|^ifup$ || true&lt;br /&gt;
      $IFDOWN_BIN $WIFI_DEVICE 2&amp;gt; /dev/null || true&lt;br /&gt;
      $IFUP_BIN $WIFI_DEVICE 2&amp;gt; /dev/null&lt;br /&gt;
      local NUM_OF_TRIES=0&lt;br /&gt;
      while $IWCONFIG_BIN $WIFI_DEVICE | grep unassociated &amp;gt; /dev/null \&lt;br /&gt;
          &amp;amp;&amp;amp; [ &amp;quot;$NUM_OF_TRIES&amp;quot; -lt 15 ]&lt;br /&gt;
        do sleep 3&lt;br /&gt;
        NUM_OF_TRIES=$(($NUM_OF_TRIES + 1))&lt;br /&gt;
      done&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_gorge()&lt;br /&gt;
#&lt;br /&gt;
# In an aggressive mode, reads data from the CD-ROM at random offsets using the &lt;br /&gt;
# 'gorge' command (http://spew.berlios.de/).&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Don't use a DVD, as the speed set by `eject' doesn't affect DVDs.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Make sure to use a CD with more than 450MB of data.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$GORGE_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; -a -r &amp;quot;$CDROM_DEV_FILE&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_gorge&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_gorge()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $GORGE_BIN || true&lt;br /&gt;
    else &lt;br /&gt;
      $GORGE_BIN -r 450M $CDROM_DEV_FILE 2&amp;gt; /dev/null &amp;amp;&lt;br /&gt;
      local GORGE_PID=$!&lt;br /&gt;
      #&lt;br /&gt;
      # My laptop needed a little priority push to get gorge CD reading started&lt;br /&gt;
      # in sync with the interval.&lt;br /&gt;
      #&lt;br /&gt;
      if [ -x &amp;quot;$RENICE_BIN&amp;quot; ]&lt;br /&gt;
        then $RENICE_BIN -2 -p $GORGE_PID &amp;gt; /dev/null&lt;br /&gt;
      fi&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_stress()&lt;br /&gt;
#&lt;br /&gt;
# Runs the `stress' program (http://weather.ou.edu/~apw/projects/stress/) in &lt;br /&gt;
# the aggressive mode with settings to issue a large number of write(), &lt;br /&gt;
# unlink(), and sync() events.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$STRESS_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_stress&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_stress()&lt;br /&gt;
{&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $STRESS_BIN || true&lt;br /&gt;
    else $STRESS_BIN -q -i 1 -d 1 &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_curl()&lt;br /&gt;
#&lt;br /&gt;
# Downloads a file (to drain power through the wireless device) in the&lt;br /&gt;
# aggressive mode using `curl'.&lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$CURL_BIN&amp;quot; -a -x &amp;quot;$KILLALL_BIN&amp;quot; ]&lt;br /&gt;
  then AGGRESSIVE_TOGGLES=&amp;quot;$AGGRESSIVE_TOGGLES toggle_curl&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
toggle_curl()&lt;br /&gt;
{&lt;br /&gt;
  URL_FIRST_HALF=&amp;quot;http://cdimage.debian.org/cdimage/weekly-builds/&amp;quot;&lt;br /&gt;
  URL_SECOND_HALF=&amp;quot;i386/iso-cd/debian-testing-i386-binary-1.iso&amp;quot;&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then $KILLALL_BIN -q $CURL_BIN || true&lt;br /&gt;
    else $CURL_BIN $URL_FIRST_HALF$URL_SECOND_HALF &amp;gt; /dev/null 2&amp;gt; /dev/null &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# toggle_aggression()&lt;br /&gt;
#&lt;br /&gt;
# Runs all the &amp;quot;toggle_&amp;quot; functions supported by the system unless specified&lt;br /&gt;
# as disabled in the script arguments.&lt;br /&gt;
#&lt;br /&gt;
for toggle_to_disable in $@ &lt;br /&gt;
  do AGGRESSIVE_TOGGLES=$(echo $AGGRESSIVE_TOGGLES \&lt;br /&gt;
                            | sed -e &amp;quot;s/toggle_$toggle_to_disable//&amp;quot;)&lt;br /&gt;
done&lt;br /&gt;
toggle_aggression()&lt;br /&gt;
{ &lt;br /&gt;
  for toggle in $AGGRESSIVE_TOGGLES ; do $toggle ; done&lt;br /&gt;
  if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ]&lt;br /&gt;
    then AGGRESSIVE=&amp;quot;false&amp;quot;&lt;br /&gt;
    else AGGRESSIVE=&amp;quot;true&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#########&lt;br /&gt;
# SETUP #&lt;br /&gt;
#########&lt;br /&gt;
&lt;br /&gt;
# Stopping services that might interfere with the system state this script&lt;br /&gt;
# controls (precondition satisfied in definition of clean_up).&lt;br /&gt;
#&lt;br /&gt;
for service in $SERVICES_TO_STOP&lt;br /&gt;
  do /etc/init.d/$service stop&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Setting CD to a fast speed &lt;br /&gt;
#&lt;br /&gt;
if [ -x &amp;quot;$EJECT_BIN&amp;quot; ] &lt;br /&gt;
  then $EJECT_BIN -x $MAX_CD_SPEED&lt;br /&gt;
elif [ -x &amp;quot;$HDPARM_BIN&amp;quot; ]&lt;br /&gt;
  then $HDPARM_BIN -E $MAX_CD_SPEED&lt;br /&gt;
fi &lt;br /&gt;
&lt;br /&gt;
# Starting the prime number search&lt;br /&gt;
#&lt;br /&gt;
if [ ! -x &amp;quot;$MPRIME_BIN&amp;quot; ] ; then &lt;br /&gt;
  echo &amp;quot;mprime program not executable/found.&amp;quot; &amp;gt; /dev/stderr&lt;br /&gt;
  exit 1&lt;br /&gt;
fi  &lt;br /&gt;
$MPRIME_BIN -t &amp;gt; mprime_output.txt &amp;amp;&lt;br /&gt;
MPRIME_PID=$!&lt;br /&gt;
&lt;br /&gt;
########&lt;br /&gt;
# BODY #&lt;br /&gt;
########&lt;br /&gt;
&lt;br /&gt;
while true ; do&lt;br /&gt;
  for f in $FREQS ; do&lt;br /&gt;
    echo &amp;quot;Cycling aggression twice for ${f}kHz: &amp;quot;&lt;br /&gt;
    set_frequency $f&lt;br /&gt;
    if [ ! &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
    for i in 1 2 ; do&lt;br /&gt;
      echo &amp;quot;    high &amp;quot; ; do_sleep $AGGRESSIVE_SLEEP_SEC ; toggle_aggression&lt;br /&gt;
      echo &amp;quot;    low &amp;quot; ; do_sleep $NONAGGRESSIVE_SLEEP_SEC ; toggle_aggression&lt;br /&gt;
    done&lt;br /&gt;
    echo &lt;br /&gt;
    for i in 1 2 ; do&lt;br /&gt;
      if [ $i -eq 1 ] &lt;br /&gt;
        then&lt;br /&gt;
          if [ ! &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
          echo &amp;quot;Random freqs under high aggression: &amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
          if [ &amp;quot;$AGGRESSIVE&amp;quot; = &amp;quot;true&amp;quot; ] ; then toggle_aggression ; fi&lt;br /&gt;
          echo &amp;quot;Random freqs under low aggression: &amp;quot;&lt;br /&gt;
      fi &lt;br /&gt;
      for (( i=1 ; i&amp;lt;=$FREQ_CYCLE_NUM ; i+=1 )) ; do&lt;br /&gt;
        FREQ=${FREQS_ARRAY[$(($RANDOM % 6))]}&lt;br /&gt;
        echo &amp;quot;    ${FREQ}...&amp;quot;&lt;br /&gt;
        set_frequency $FREQ&lt;br /&gt;
        do_sleep $FREQ_CYCLE_SLEEP_SEC&lt;br /&gt;
      done&lt;br /&gt;
      echo&lt;br /&gt;
    done&lt;br /&gt;
  done&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripts]]&lt;/div&gt;</summary>
		<author><name>TNKS</name></author>
		
	</entry>
</feed>