Replace native OSX code with ps output parsing