I recently got a shiny new macbook air and I absolutely love it. However, I noticed that once in a while it would shutdown a core to keep the heat down. I really didn’t like that so I bought CoolBook. The software claims to undervolt your cpu, which is “safe” (read: user be careful). I believe that it does do this and it does say that macbook air support is not fully tested on the site, so I was warned.
After configuring the CoolBook driver to allow my cpu to scale to its full 1800mhz while being undervolted by approx .5v, the driver appeared to work correctly. I am using two applications to monitor my system, MenuMeters and Tempature Monitor. Both provide me with good indicators of cpu load and tempature. Another warning, I am not using a benchmarking tool aside from my observations. This is not the way to compare things!
My basic benchmark was a 5 minute continuous process. In this case gcc builds. Before installing CoolBook or the latest firmware, a cpu core would generally shutdown 2 mintues into the build. The cpu would also run very hot and the fans would rarely, if ever, turn on. However, I never ran into kernel panics.
After installing CoolBook, I was able to build all the software needed, but my CPU would typically reach tempatures of 80c or higher. I believe the OS X kernel will panic at 85c. I attempted to use the CoolBook max tempature feature, but that clearly didn’t work. My CPU would consistently break the limit and set off many alerts. I am also pretty sure that it caused a few kernel panics; disabeling it cut the number significantly. CoolBook also appeared to favor one core over the other and would typically schedule the 1st core to handle the bulk of the load. I am not sure why this scheduling occured, but it was not a good indicator of a properly functioning kernel. Finally, the fan was still unheard from on the Air, not a good sign.
During my CoolBook usage, a firmware update came out for the Air and I installed it, then reloaded CoolBook. The CoolBook software did not work well with this update. The cpu would typically scale to loads of 2.5 or greatly and easily reach the 85c kernel panic tempature. It pretty much rendered the system worthless for longer build cycles. I removed the software and it now schedules both cpu’s evenly and runs about 10c cooler than with CoolBook.
I know the CoolBook developer warns that the Macbook Air is not really supported and that’s all fine. I’m not angry about the software failing, I was warned. I am pretty pissed at all the people who claim CoolBook is a great piece of software on the Air. There are plenty of threads screaming about this (Just google CoolBook+Macbook+Air), and I am pretty sure they’re all users that never actually tested the software. Again, if the main issue for a user is view You Tube, I probably shouldn’t take their advice and I didn’t. Then there is Macworld and Chip Chick, both WRONG and Totally Lame! They should actually test their claims, but I guess not! Also, do either one of your sites use a computer for anything else than rick rolling?
The Bottom Line:
- Don’t use CoolBook on your Air. It doesn’t work correctly and will cause kernel panics. Apple’s latest firmaware is pretty good and runs cool. When you’re doing heavy builds, the fan will run. Sorry…
- Don’t believe anyone who’s biggest complaint is that they can’t watch You Tube.
- Finally, hacking the kernel is a hard and unstable process. It is not a good policy to install kernel mods that you cannot review if they affect the cpu directly.
Well, I certainly learned my lessons. Hope this is helpful. It’s got my interesting in OS X kernel hacking perked so look for more from me on that.
convert this post to pdf.
Tags: Macbook Air · OS X
December 1st, 2007 · 5 Comments
Using Macports to install Apache2 is a cinch. First, make sure you actually have Macports installed and correctly configured. If you don’t visit www.macports.org where you can find the Macports download and documentation.Once that’s all taken care of you will need prepare for the Apache2 install. (Note: If you’re not using Leopard, try these instructions at 2tbsp: Installing Apache2 and PHP 5 with MacPorts.) Also note, there is a serious error with mod_ssl when installing with Macports. You have to turn this off before Apache2 will load. If you need mod_ssl, then Leopard may not be for you. Run a few Google searches for more info before continuing.At this point you’re ready to install. Begin by entering:
$ sudo port install sqlite3
This will being the install of the sqlite3 package. This step must come first to ensure proper installation. If you don’t install sqlite3 there is a good chance the portfile will not be able to load it as a dependency to Apache2 during the managed installation and your install will fail. If you get the error:
sudo: port: command not found
This means you did not add Macports to your user enviroment. You need to go back and add Macports, I use the following:
Once in the Pico text editor add the following lines:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export EDITOR=/usr/bin/pico
Write the file out using ctrl-o, then exit pico with ctrl-x and at the prompt type:
Finally check that you’re correctly configured:
This should return the following along with a bunch of other variables:
TERM_PROGRAM=Apple_Terminal
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
If you path matches this output you’re good to go, retype:
$ sudo port install sqlite3
Since your environment is correctly installed, Macports will take control and install sqlite3. Once you’ve got installed sqlite3, you need to install apache2. Start by typing:
$ sudo port install apache2
Let Macports install your apache2 server. This can take a little while since Macports may need to download a number of dependencies, so grab a quick snack or read something. When you come back you should see the following code:
###########################################################
# A startup item has been generated that will aid in
# starting apache2 with launchd. It is disabled# by default. Execute the following command to start it,
# and to cause it to launch at startup:
## sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
###########################################################
Just cut and past the final line to add the startup item to LaunchD:
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
Once that startup item is loaded Apache will be able to launch on login. You might also want to start, stop and restart Apache while logged in. I use an alias to the apachectl application at /opt/local/apache2/bin/apachectl. To create the alias, add the following line to your bash ~/.profile file:
alias apachestart='sudo /opt/local/apache2/bin/apachectlstart'
alias apachestop='sudo /opt/local/apache2/bin/apachectlstop'
alias apacherestart='sudo /opt/local/apache2/bin/apachectlrestart'
I’ve used these commands because they describe the actions I want to perform. You could also do what Chad at 2tbsp suggests at just alias apachectl with any name besides apachectl such as:
alias apachectl2='sudo /opt/local/apache2/bin/apachectl'
Great so you’ve almost got everything ready to launch Apache for the first time! Now you need to setup your httpd.conf file. Goto your shell prompt and type the following to create your httpd.conf file:
$ sudo ditto /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.conf
Now we have to do a few more things to properly configure this file for Leopard and Apache2. There is a serious error with mod_ssl when installing with Macports. You have to turn this off before Apache2 will load. If you need SSL, then Leopard may not be for you. Let’s configure this file, go into Pico and find the line that controls the ssl_module, then turn that off:
$ sudo pico /opt/local/apache2/conf/httpd.conf
#LoadModule ssl_module modules/mod_ssl.so
Next, find your DocumentRoot. By default is set to /opt/local/apache2/htdocs, but you can set it to any folder you want. If you’ve been using the built-in server, set it to /Library/Webserver/Documents; I set it to /Users/[your login]/Sites. Do this in your httpd.conf by typing the following:Swap
DocumentRoot "/opt/local/apache2/htdocs"
for
DocumentRoot "/Users/[Login Name]/Sites"
or enter the directory of your choice. Then swap:
Directory "/opt/local/apache2/htdocs"
for
Directory "/Users/[Login Name]/Sites"
One thing to pay attention for, both your DocumentRoot and your main Directory need to be the same. Go back and check, if they’re different, make them the same. Your server will not work correctly if you do not. Now save and close the httpd.conf file and return to your command line. We are now going to start Apache for the first time and if all the files were configured correctly the server will load. At the command line type:
$ apachestart #This will only work if you used my alias suggested earlier in this article.
Launch any browser, type in http://localhost and see the Leopard Personal Site test page if you linked to your /user/[login name]/sites directory.

To stop the server go back to the command prompt and enter:
$ apachestop #Make sure your alias is setup correctly.
Well that’s it for setting up your webserver with macports. Of course you could have just turned on web sharing in your sharing prefs, but that’s boring and you can’t update that server as easily. If you want to learn more about the Apache Web Server check out their site: httpd.apache.org. Also try reading up on how to configure new directives for your httpd.conf file.Thanks for reading and check back soon for more info on setting up MySQL5 and PHP5 with the web server you just build.
convert this post to pdf.
Tags: Science and Technology · Software
Just wanted to give a quick review of this software. WP-Syntax is a plug in for Wordpress. I use it to format code within my blog. This software is pretty nice and integrates smoothly. It uses the GeSHi highlighting engine to perform the operation on <pre> tagged content. Usage is as follows:
<pre lang="language">Put your code here</pre>
Also, don’t forget to add the extra formatting styles to your stylesheet for some extra pizazz. Just incase you haven’t yet here they are again (these styles and the plugin were written by Ryan Mcgeary:
.wp_syntax {
color: #100;background-color: #f9f9f9;
border: 1px solid silver;
margin: 0 0 1.5em 0;
overflow: auto;}
/* IE FIX */
.wp_syntax {
overflow-x: auto;
overflow-y: hidden;
padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 15 : 0);
width: 100%;}
.wp_syntax table {border-collapse: collapse;}
.wp_syntax div, .wp_syntax td {vertical-align: top;padding: 2px 4px;}
.wp_syntax .line_numbers {text-align: right;background-color: #def;
color: gray;overflow: visible;}
/* potential overrides for other styles */
.wp_syntax pre {margin: 0;width: auto;float: none;clear: none;overflow: visible;}
convert this post to pdf.
Tags: Science and Technology · Software
All work and no play
I began configuring my systems for development by using the available binaries that were pre-compiled and posted to their respective sites. These worked great for the most part since I was new to dynamic languages. I really felt that I was super advanced for not using a packaged development app such as MAMP, XAMPP or Locomotive (which are great, don’t get me wrong). The problem was this; updating prepackaged binaries sucked. I had to basically uninstall everything and re-install. Combine that with how little I was actually learning by just using what was given, I really started to hate that and went back to MAMP and Locomotive for a while.Finally, I read an article by Dan Benjamin who writes Hivelogic. His tutorial was excellent in taking me through the steps to build and configure a RoR stack for my system; much thanks! So now I was set to go with a new custom install and I used Gems to manage my ruby extension packages. I was also spending an enormous amount of time compiling Apache, PHP, and MYSQL servers on various systems. In comparison, Gems was a godsend! I decided to go forward with finding a package manager that would function as well for all my software so I could stop the insanity of continuously compiling software from scratch.
MacPorts vs Fink
I pulled both sources off the web and installed them. Here’s the thing although, I am running Leopard, now at 10.5.1. Fink’s Leopard distro was still in beta, MacPorts was not. I tried Fink first because I hear a lot of good things about it. So I pulled the source and built it. Fink loaded ok, but I ran into many issues with configuring newly installed software. I believed Fink may be a more powerful, albeit more complex, manager. I grew frustrated and took a break. MacPorts had also just released its Leopard distro. Again, I pulled the source and built it. I ran the selfupdate and I was off. At this point I had to reconfigure my shell and a few other daemons so that my new Macports installs of Apache2 Php5 and MYSQL would run instead of the built in versions. That was pretty straight forward and I was done. Now all my installs were managed by Macports and will be from now on.
The Bottom Line
If you’re doing a lot of system building, interested in UNIX/Open Source Applications, or you just like a bit more power out of your computer, ditch the super-easy road and learn how to use the command line for effective software instillation and configuration. If you couldn’t be bothered then don’t, use MAMP or Locomotive and don’t shocked when some advanced features don’t work. I’m planning to follow up with instructions for doing all of the actions I described in this editorial. I will try not to duplicate current information on the web. If you can’t wait, try a google search. That’s how I learned.
convert this post to pdf.
Tags: Science and Technology · Software
This my shinny new website! Yay! Hopefully I will have enough time to build my own design and keep this site updated!
convert this post to pdf.
Tags: Random