OS X System Scripts -- Quick scripts to easily manage Battery & Internet performance
Manage Battery & Internet Performance
I've been using QuickSilver a good bit, and these tools are built to quickly give access to some system preferences that would have required a few mouse clicks / terminal entries. Designed for laptop users, as desktops don't typically see a varied environment. They are not complex scripts, and they can all be modified to fit whatever needs you may have.
Power Scripts
The scripts call the 'pmset' program, which needs to run as the root user to take effect. For this reason, the scripts will prompt you for the Admin password when you run them. If you'd prefer to not enter the password every time, you can open the files in Script Editor, and put the password into the script. There are instructions in the comments of the script on how to do this.
- powerLongBattery.scpt - to be used when maximum battery life is needed. Sleep the screen after three minutes, sleep the hard divers after 5 minutes, and sleep the computer after 7 minutes, and reduce the processor performance. Also remember to dim your screen brightness and turn of Airport (if not using it) for best results. These properties are not gracefully applescritpable, so well, there you have it.
- powerDvdBattery.scpt - For watching a DVD on battery power. Reduced CPU, and hard drives sleep right away, but the display and the computer won't sleep for 4 hours of inactivity. Remember to turn off your Airport if not using it.
- powerPluggedIn.scpt - When plugged in, don't sleep the computer or the hard drives, and set the processor to fastest performance. Sleep the screen after 30 minutes.
Internet Speed
These scripts use the 'sysctl' command to configure network settings for various network scenarios.
- internetBroadbandConfig.scpt - Makes it so that your computer uses
larger "windows" of information. Specifically, the settings are:
net.inet.tcp.sendspace is set to 262144
net.inet.tcp.recvspace is set to 262144
kern.ipc.maxsockbuf is set to 2097152
net.inet.tcp.delayed_ack is set to 0
net.inet.udp.recvspace is set to 65535
- internetDefaultConfig.scpt - Restores the default settings, which are more dial-up friendly.
Specifically, the settings are:
net.inet.tcp.sendspace is set to 32768
net.inet.tcp.recvspace is set to 32768
kern.ipc.maxsockbuf is set to 262144
net.inet.tcp.delayed_ack is set to 1
net.inet.udp.recvspace is set to 42080
Cost & License
System Scripts are free. The scripts are easy to modify and read, and are fully commented. Do with them as you see fit.
Compatibility & Support
System Scripts will work best on OS X 10.3 (Panther). The are untested on any other version of OS X.
Send any support questions or feature requests to: systemscripts at bigethan dot com. I don't take any responsibility for any damage this program does to your computer. Backups are always a good idea.
Version History
1.0 -- Initial Release. Oct 15, 2004
Other Related Software & Sites
- Powerbook Battery Research - An interesting breakdown of how much various options use the power.
- Bandwidth Optimizer - Installs a startupItem that changes the settings of the internet for broadband.