Get Real-Time Statistics about System Processes 

On Unix-based systems, you can use SemanticImport to get real-time statistics about the system processes.

Start by running the system shell.

In[1]:=
Click for copyable input
X

Next, run the "ps" command and retrieve its output after a small pause.

In[2]:=
Click for copyable input
X

Parse the data using SemanticImportString.

In[3]:=
Click for copyable input
X
Out[3]=

Make a function that shows the processes with the highest CPU usage.

In[4]:=
Click for copyable input
X

Make a dynamically updating display of CPU usage.

In[5]:=
Click for copyable input
X
Out[5]=