If ps hangs, try ps -M which should still work by not getting detailed information from processes.