How to enable process accounting on macOS My Macbook Pro occasionally will use up high CPU and freeze after being left idle overnight. How can I enable process accounting so that I can track down the processes that consume most of the CPU?
You can either use an app to turn on process accounting or use command line tools:


App: Onyx


CLI:


Open Terminal and enter:

sudo mkdir /var/account
sudo touch /var/account/acct
sudo accton /var/account/acct

With sa you can print the system accounting statistics. Check man sa