Changing the CPU priority of Mac OS X apps with ‘renice’

Mac’s Activity Monitor app is great, but there’s one thing it can’t do. As a long-time Windows user, I’m accustomed to tweaking the CPU priority on apps that are very CPU-intensive, e.g. compressing video, etc. On Mavericks I’ve noticed a couple of apps tend to slow my system right down (iTunes, Unarchiver, Google Drive), and wanted a quick way to get them under control. So I wrote this shell script.

#!/bin/bash
for APP in iTunes Unarchiver Drive ; do
  PID=`ps -Ac -o pid,command | grep ${APP}$ | awk '{print \$1}'`
  if [ -z $PID ] ; then
    echo \[$APP\] not running
  else
    echo \[$APP\] sudo 20 renice $PID
    sudo renice 20 $PID
  fi
done

Microsoft and Nokia

So Microsoft bought Nokia. I can’t say I’m surprised. It will be interesting to see if this can bring them back from the brink of irrelevancy. I love the look of Windows Phone as an OS, and have been quite outspoken on my anticipation for the Nokia Lumia 1020 as the ultimate travel companion. However, Microsoft needs to experience a fundamental attitude shift if they’re going to claw their way back into the mobile devices market.

The Apple vs. Android vs. Microsoft debate is thoroughly uninteresting. Each platform has their strengths and weaknesses. Apple got there first with shiny touch phones and pioneered the App Store business model. Google snatched up the software-only market by stealing Microsoft’s modus operandiā€”build the OS and the cheap hardware will come, along with butt-loads of market-share. Microsoft is kind of a wild card. They’re that arrogant corporate jock that storms in late and gate-crashes the hipster/nerd frat party. Google’s dominance and market share is quite straightforward. Android is popular, not because it’s good, but because it’s free and it’s “good enough”. The interesting debate, and the only one worth having, is about brand attitude.

Read full post →