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