<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.freegeek.org/index.php?action=history&amp;feed=atom&amp;title=MacBuild_Battery_Test</id>
	<title>MacBuild Battery Test - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.freegeek.org/index.php?action=history&amp;feed=atom&amp;title=MacBuild_Battery_Test"/>
	<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;action=history"/>
	<updated>2026-05-05T22:37:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=68405&amp;oldid=prev</id>
		<title>AshleySueMas: /* How to use it */</title>
		<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=68405&amp;oldid=prev"/>
		<updated>2013-09-12T00:48:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;How to use it&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:48, 12 September 2013&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-l38&quot; &gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;Once the system&amp;#039;s battery has been drained, reconnect power to the system, power it on, navigate to the directory with the battery test script via the terminal, and run it again.  It should see that &amp;quot;bat_mon&amp;quot; exists and tell you how long the battery lasted.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;Once the system&amp;#039;s battery has been drained, reconnect power to the system, power it on, navigate to the directory with the battery test script via the terminal, and run it again.  It should see that &amp;quot;bat_mon&amp;quot; exists and tell you how long the battery lasted.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Macintosh&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Delete&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>AshleySueMas</name></author>
	</entry>
	<entry>
		<id>http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=62855&amp;oldid=prev</id>
		<title>Lynnae at 17:34, 21 June 2012</title>
		<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=62855&amp;oldid=prev"/>
		<updated>2012-06-21T17:34:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:34, 21 June 2012&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 class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;This &lt;/del&gt;is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;battery &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;test currently used on laptops coming out of MacBuild.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 class=&quot;diffchange diffchange-inline&quot;&gt;---THIS SCRIPT IS NO LONGER IN USE---&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 class=&quot;diffchange diffchange-inline&quot;&gt;Coconutbattery &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;used to determine &lt;/ins&gt;battery &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;capacity percentage&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 class=&quot;diffchange diffchange-inline&quot;&gt;[[User:Lynnae|Lynnae]] 17:34, 21 June 2012 (UTC)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;==Code==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;==Code==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;/table&gt;</summary>
		<author><name>Lynnae</name></author>
	</entry>
	<entry>
		<id>http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=35288&amp;oldid=prev</id>
		<title>Serge at 18:54, 10 October 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=35288&amp;oldid=prev"/>
		<updated>2008-10-10T18:54:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:54, 10 October 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-l30&quot; &gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;Once the system&amp;#039;s battery has been drained, reconnect power to the system, power it on, navigate to the directory with the battery test script via the terminal, and run it again.  It should see that &amp;quot;bat_mon&amp;quot; exists and tell you how long the battery lasted.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;Once the system&amp;#039;s battery has been drained, reconnect power to the system, power it on, navigate to the directory with the battery test script via the terminal, and run it again.  It should see that &amp;quot;bat_mon&amp;quot; exists and tell you how long the battery lasted.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;[[Category:Macintosh]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Serge</name></author>
	</entry>
	<entry>
		<id>http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=35105&amp;oldid=prev</id>
		<title>Serge: New page: This is the battery test currently used on laptops coming out of MacBuild. ==Code==   #!/bin/bash  #macbuild battery test    BATFI=$HOME/bat_mon    if [ -f &quot;$BATFI&quot; ]; then    MINZ=$(wc -l...</title>
		<link rel="alternate" type="text/html" href="http://wiki.freegeek.org/index.php?title=MacBuild_Battery_Test&amp;diff=35105&amp;oldid=prev"/>
		<updated>2008-10-03T18:51:06Z</updated>

		<summary type="html">&lt;p&gt;New page: This is the battery test currently used on laptops coming out of MacBuild. ==Code==   #!/bin/bash  #macbuild battery test    BATFI=$HOME/bat_mon    if [ -f &amp;quot;$BATFI&amp;quot; ]; then    MINZ=$(wc -l...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is the battery test currently used on laptops coming out of MacBuild.&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #macbuild battery test&lt;br /&gt;
 &lt;br /&gt;
 BATFI=$HOME/bat_mon&lt;br /&gt;
 &lt;br /&gt;
 if [ -f &amp;quot;$BATFI&amp;quot; ]; then&lt;br /&gt;
   MINZ=$(wc -l &amp;quot;$BATFI&amp;quot; | awk &amp;#039;{print $1}&amp;#039;)&lt;br /&gt;
   echo &amp;quot;battery lasted $MINZ minutes&amp;quot;&lt;br /&gt;
 else  &lt;br /&gt;
   while sleep 60; do&lt;br /&gt;
     echo &amp;quot;testing battery life!&amp;quot; | tee -a $BATFI&lt;br /&gt;
   done&lt;br /&gt;
 fi&lt;br /&gt;
==How it works==&lt;br /&gt;
This script is pretty straightforward: when you run it on a system for the first time, it creates a file called &amp;quot;bat_mon&amp;quot; in the user&amp;#039;s home directory, echoes &amp;quot;testing battery life!&amp;quot; in the terminal every 60 seconds, and appends the line to &amp;quot;bat_mon&amp;quot;.  Essentially each new &amp;quot;testing battery life!&amp;quot; line in &amp;quot;bat_mon&amp;quot; is equal to a minute of runtime.  When you run this on a system the second time, the script will realize &amp;quot;bat_mon&amp;quot; already exists, count the lines in the file, and tell you how many minutes the battery lasted.  Keep in mind that you will have to delete &amp;quot;bat_mon&amp;quot; if you want to run the script anew.&lt;br /&gt;
&lt;br /&gt;
==How to use it==&lt;br /&gt;
You can either copy the code above and save it to [filename].sh (the name can be whatever you want, but make sure it ends in .sh) or download it from [http://llama.freegeek.org/~serge/batterytest.sh here].  &lt;br /&gt;
&lt;br /&gt;
Once you&amp;#039;ve got the script set up, go ahead and set up the system for the battery test (e.g. disable the screensaver, put an audio CD in the system&amp;#039;s optical drive, set whatever media player to repeat, play the disc, and disconnect the system&amp;#039;s power supply)&lt;br /&gt;
&lt;br /&gt;
You then have to open up a terminal, navigate to the directory the file is in, and type:&lt;br /&gt;
&lt;br /&gt;
 oem@macbox:~$ sh [filename].sh&lt;br /&gt;
&lt;br /&gt;
to start it, replacing [filename] with whatever you called it.  Keep the terminal open while the script is running.&lt;br /&gt;
&lt;br /&gt;
Once the system&amp;#039;s battery has been drained, reconnect power to the system, power it on, navigate to the directory with the battery test script via the terminal, and run it again.  It should see that &amp;quot;bat_mon&amp;quot; exists and tell you how long the battery lasted.&lt;/div&gt;</summary>
		<author><name>Serge</name></author>
	</entry>
</feed>