Is there any way, such as an application or a terminal command, to display a log of every application that has been running on the computer? A bit like a keylogger, but for applications instead of keyboard. I did not find anything on the internet.
If it does not exist, do you think that programming such a tool would be possible?
Thank you for your help
Best Answer
There is an application called Time Sink ($5, free trial available) which can track time spent in an application in the foreground. I believe it also tracks background time too.
For a native and more techy solution, you can run this terminal command:
This command will run top every 5 seconds as defined by -d, -b is for batch mode and this is used for sending output to a file. You wouldn't want to have this running all the time unless you're compressing the log file or using logrotate, as the log file would get large.