Fastest way to drain battery

40,160

Solution 1

Keeping your CPU's busy can be done with a script. Just run the following in 2 consoles:

yes > /dev/null

If you have more than 2 CPU's you need to run it in more consoles. Another option is to write a slightly more complicated script that uses multiprocessing but this is the simplest thing that will max out your CPUs.

Solution 2

If you can run utilities that cause moving parts to work, then that should drain a the battery fairly quickly. Writing CDs or DVDs, copying large amounts of data (such as with @Soumya92's suggestion in a Comment [to your Question] to convert videos which would also consume processing power), or even running a scan on your hard drive for bad sectors (which would require reading every sector) are some things that come to mind.

For using a script, you'd probably have to write your own. It could run in an endless loop copying large amounts of files to a RAM disk (that way when the power goes out, you won't have a corrupt disk to deal with since RAM disks don't matter), a partition used for temporary file storage, or a USB memory stick (or external hard drive).

Here's a more complete list of ideas:

  • Write CDs or DVDs
  • Copy large amounts of data
  • Convert videos (@Soumya92's suggestion in a Comment to the original Question)
  • Run a hard drive scan for bad sectors
  • Write a custom script that copies data to temporary storage, repeatedly
  • Turn up sound, brightness, and other features
  • Plug in a USB cellular phone charger (and charge a phone that's powered on)
  • Plug in a USB reading lamp and turn the light on
  • Plug in a USB fan and run it
  • Plug in an iPod (or similar device) and play music or videos at full volume and brightness
  • Download torrents of public domain movies or music (assuming you can find some)
  • Play some online games (especially the 3D kind that require more graphics processing power)
  • Backup your entire hard drive to an external hard drive
  • Install BOINC and run SETI@home (or other BOINC projects): http://setiathome.berkeley.edu/
  • Set up a Virtual PC, install Unix or Linux, and compile FFMPEG, VLC, OpenJDK 7, and TomCat (plus, anything else you'd like to experiment with)
  • Engage in video chat with your friends
  • Encrypt important data using the most complicated and most secure algorithms you can find

Whatever can bog down your system with lots of disk I/O (which also includes CD and DVD activity) and high CPU utilization should do the trick. Additional power drain from USB devices that don't have their own power sources can help too.

Solution 3

In general, use 100% of CPU usage, turn up the brightness, don't let it go to sleep.

Share:
40,160
Tyilo
Author by

Tyilo

Lol

Updated on September 18, 2022

Comments

  • Tyilo
    Tyilo over 1 year

    I'm using Mac OS X 10.7.1 on a Macbook Core 2 Duo.
    What's the fastest way of draining the battery without crashing the system and preferable by using some sort of a script?

  • Randolf Richardson
    Randolf Richardson over 12 years
    The "yes" command should be upgraded to a multi-threaded version. ;-P
  • Badu
    Badu over 12 years
    This certainly maxes out the processor in a pretty quick and easy script.
  • Tyilo
    Tyilo over 12 years
    IF you have two cpu's use yes > /dev/null & yes > /dev/null
  • slm
    slm over 12 years
    This worked under Linux too!
  • suweller
    suweller almost 12 years
    Writing data to disk shortens its lifespan, so I would advise against doing this.
  • Jack
    Jack over 8 years
    Whilst keeping the CPU busy is easily achieved and will definitely drain battery, keeping the screen on at it's brightest setting as you mentioned will always be the biggest power consumer, +1.
  • bertieb
    bertieb over 8 years
    Can you elaborate ?
  • Prasanna
    Prasanna over 8 years
    Excuse my ignorance - how is it different from looping a same video on a media player....