‘top’ mainly displays processes that consume the most system resources. To monitor job processes, run ‘top’, press ‘u’, enter your user ID, and then press enter to filter only your processes. For memory usage, focus on the RES column. In the example below, the MATLAB programs are each consuming 1.2GB of memory and fully utilizing three CPUs. You can press ‘?’ for help and ‘q’ to quit. For more details, you can refer to the link provided:
https://gridpane.com/kb/how-to-use-the-top-command-to-monitor-system-processes-and-resource-usage/