Add Comment
|
Related Links
|
TrackBack
BatteryTimer.sh (GPL)Recently my friend has received the OLPC laptop, the XO. This laptop can run for more than 3 hours on battery power, in theory. There is a black-and-white display mode that is suppose to save a lot of battery power. But controversy exists that claims the battery life didn't change in black-and-white mode. So I decided to write this battery timer to determine how long the battery life is exactly. This will not only help us determine how long the battery lasts in color and black-and-white mode on the XO, but will also help you determine battery life on your new and older notebook computers. This script will run on any UNIX-based operating system, such as Linux, Mac OS, or the Sugar OS on the OLPC. To use it, charge the battery all the way up, unplug the notebook from the wall AC adapter, execute the BatteryTimer.sh script that is attached to this thread, and wait till the notebook dies. After the notebook dies, boot it up again. BatteryTimer.sh will create a log file called "BatteryTimer.txt" in the directory where you executed BatteryTimer.sh. This log file contains the time stamp at the start and end of execution. Use this command to see the battery life: "cat BatteryTimer.txt" For a controlled comparison between two or more computing modes (such as color vs. black-and-white on the OLPC), you should not use the computer while the BatteryTimer.sh is running. On the other hand, if you want to measure how long the battery lasts during your day-to-day routine, you can start this script while you are using your notebook computer. BatteryTimer.sh is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site. Chieh Cheng Today, I needed this BatteryTimer.sh utility to test how long my MSi Wind U100 lasts on an external battery source, with an DC/AC power converter. I found that this utility loops unnecessary number of times. The UNIX date utility is only precise own to one second. There is no need to time stamp more than once per second, which creates an unnecessary large time stamp file. Therefore, I have modified it slightly to only records time once per second, dramatically reducing the output file size. One beauty of BatteryTimer.sh is that it does not put an artificial load on your system, allowing you to measure battery time with any kind of load you like to introduce into your system. You can mix and match various CPU load, disk I/O load, and external connection load at will. Chieh Cheng
Add Comment
|
Related Links
|
TrackBack
Did your message disappear? Read the Forums FAQ. Add CommentSpam Control | * indicates required field TrackBackTrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites. Send Ping | TrackBack URL | Spam Control No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here. Messages, files, and images copyright by respective owners. |
Products
|
Services
59 Users Online
|
Copyright © 1996 - 2025. All Rights Reserved. |