ps on remote Mac doesn't work

Solution 1:

I had this issue when upgrading from OS X El Capitan 10.11.6 to Sierra 10.13.6

After checking for non Apple kernel extensions as follows

kextstat | grep -v com.apple

I found a number of Acronis True Image 2020 kernel extensions

Despite moving it from Applications to the bin I had to use their cleanup_tool to fully remove the kernel extensions that were blocking ps

Once I did that, and rebooted ps -ef and other commands then worked as normal.