Spotlight's Impact on PowerBook Battery Life?
Viltvodlian Deoderan asks: "So, Spotlight for Mac OS X Tiger is very cool. I can now let my innate ability to disorganize things shine through. However, when using my PowerBook unplugged, it seems that my battery lasts a noticeably less time. A close reading of Ars Technica's description of how spotlight works suggests that this is due to keeping the index file up-to-date on disk. Has anyone else noticed the same thing? Does someone have a better explanation for why my battery seems to drain out, prematurely? Is there some way real-time indexing can be turned off to conserve power?"
Try turning off the pr0n. you're welcome.
Drag the volume you don't want indexed into the Privacy pane in Spotlight preferences.
Read this:
0 808165343661
http://www.macosxhints.com/article.php?story=2005
It is actually a bug with the driver for the new USB scrolling trackpad. This has been noted in various forums and Apple are aware of this problem.
If you plug in an external mouse and disable the trackpad, or replace the driver with SideTrack, the problem goes away.
This only effects the 2005 Powerbooks, and causes much higher CPU and memory load.
Will
per mere, per terras
sed: 2: "/| *{/,/| *}/ {
...": bad flag in substitute command: '/'
...
/g;
Maybe I should have bought that sed and awk book
#!/usr/bin/perl
my $info = `/usr/sbin/ioreg -p IODeviceTree -n "battery" -w 0`;
my $batteryinfo = $info;
$batteryinfo =~ s/\n//g;
$batteryinfo =~ s/^.*\"(IOBatteryInfo)\" = \(\{(.*)\}\).*$/$1\n$2/g;
$batteryinfo =~ s/\"([\w ]*)\"=/\t$1:
$batteryinfo =~ s/,/\n/g;
print $batteryinfo . "\n\n";
Does the trick too though, and is easily modifiable to log the fields too. It outputs in the format:
IOBatteryInfo
Capacity: 4400
Amperage: 18446744073709550638
Cycle Count: 9
Current: 3262
Voltage: 11655
Flags: 4
AbsoluteMaxCapacity: 4400
God, do I have to type in loads of standard english text here to get it to submit? Bah! Well, here I am, stuck at home waiting for a delivery of a hard drive and drive enclosure. I'm sitting on my iBook wondering when it will turn up. I should be at work, but I can get away with not turning up as I can work from home. Foo foo foo foo. Is that a van I can hear? It appears not, no, wait, yes it is! Hurrah, a parcel! Fun fun fun fun. Gosh, I wonder if this is enough text.
No, it is not enough text. Sheesh, how frustrating. For a site for geeks, it is remarkably frustrating to post geeky stuff.
I'm just going to add logging to the script above, and then I can do what I said I'd do above.