I have found that using activity monitor I get all the information I need. I now just need a way to access this information via preferably Python or even Bash and Apple Script. I just need to get the information at regular intervals and put it in a log file while my program is running.
Get Details of Running Applications on Terminal
activity-monitorpythonterminal
Related Question
- Run Python Script on any Mac computer
- Python – How to Make an Executable .py File for Non-Programmers
- How to Create Reverse Shell Using High Sierra – macOS Terminal Guide
- Get two-factor authentication code from terminal
- Automator Python Script – Operation Not Permitted on Catalina
- macOS – Terminal Can’t Execute Files in Current Working Directory
- Tell if running process is running under Rosetta or is M1-native by Command Line
Best Answer
The terminal command
top
will give you a list of running processes biggest ones first. Doman top
and you will have a complete explanation of the syntax for your version.Also of interest might be
ps
, especially if used in scripts. Runman ps
for the details.So, just to add this will give the initial information without any processes shown:
Based on the example shown in the man page for top. And this is what it looks like :