MATLAB: How to create a list of the processes that are currently running on the system

How can I create a list of the processes that are currently running on my system in a text file that I can view later or send to MathWorks support?

Best Answer

This article will show you how to run a command that will create a list which represents a snapshot of the processes that are running on your system, and then send the output to a file on your system. The command will create the file for you, you will not need to create it ahead of time. For all of the commands below, you can choose a different location and file name by editing file path and file name in the command.
 
 
Windows:
 
Open the Command Prompt. If needed, use the Search feature in Windows to find the Command Prompt.
 
Run the following command exactly as it is shown below:
 
tasklist.exe > %USERPROFILE%\Desktop\processlog.txt
 
 This will create a text document on the desktop called processlog.txt.
 
Mac:
 
 Open Terminal. If needed, use the Search feature in OS X to find Terminal.
 
 Run the following command:
ps aux > ~/Desktop/processlog.txt
 
 This will create a text document on your desktop called processlog.txt.
 
 Linux:
 
 Open the Console.
 
 Run the following command:
ps aux > ~/processlog.txt
 
  This will create a text document in your Home folder called processlog.txt.
 
Note: If you receive a permissions denied error, make sure that you have listed a file location where you have write permissions. You can also start the Command Prompt on Windows as an Administrator, and run the Mac and Linux commands as sudo in order to override permissions on your target folder.