top alternative for GPU usage and networking I want to get all the info from Activity Monitor in the terminal (because I am executing these commands in macOS app). It also has to terminate - e.g. for top I can write:

top -pid &lt;somepid&gt; -l3 -n30 &gt; test ; tail -n42 ./test &gt; ./test2 ; open ./test2

and this would get 3 recordings and terminate.

So far, I managed to run top command and get most of the metrics. However, there are many that top doesn't provide, such as GPU and networking.

I am familiar with systemstats but this is not on a per-process basis. I can grep some parts of systemstats, but there is not guarantee that my process is going to be in the list of GPU usage section.

Need to support 10.14 Mojave and 10.15 Catalina

Any other commands that I can use, or maybe ways I can tweak systemstats to work for my case?
netstat : This command shows network status
iostat : This command displays information about CPU usage, and I/O statistics
vm_stat : This command virtual memory statistics


To my knowledge, there is no command to get GPU usage on macOS.