You want to list all running processes on your system, sorted by memory usage in descending order. Which command will achieve this?1.0 Marksfree -m | sort -r -k 2ps aux | sort -n -k 4top -mhtop --sort-memoryps -e | sort -r -k 5
Question
You want to list all running processes on your system, sorted by memory usage in descending order. Which command will achieve this?1.0 Marksfree -m | sort -r -k 2ps aux | sort -n -k 4top -mhtop --sort-memoryps -e | sort -r -k 5
Solution
The command that will list all running processes on your system, sorted by memory usage in descending order is ps aux --sort=-%mem.
Here's a step-by-step breakdown of how this command works:
-
ps: This is the command that reports a snapshot of the current processes. -
aux: These are options to thepscommand.ashows processes for all usersudisplays the process's user/ownerxalso shows processes not attached to a terminal
-
--sort=-%mem: This option sorts the process listing by the memory usage in descending order. The-sign before%memindicates descending order.
Please note that the commands you provided in the question either do not sort the processes by memory usage or do not display all running processes. For example, top -mh and top --sort-memory are not valid commands, and free -m | sort -r -k 2 displays memory usage, not running processes.
Similar Questions
Which of the following Powershell commands will sort processes by amount of non-paged memory, in descending order?1 pointGet-Process| Sort -property ID, ProcessNameGet-Process| Sort WS -ascending | Select -property ID, ProcessNameGet-Process| Sort CPU -descending | Select -property ID, ProcessNameGet-Process| Sort NPM -descending | Select -property ID, ProcessName
18. What is the command to find maximum memory taking process on the server?
20. What is the command to find the currently running process in Unix Server?
Which of the following tools can help you gather information about the processes running on a Windows operating system?
.Question 1Which of the following tools can help you gather information about the processes running on a Windows operating system?1 pointThe Task Manager The tasklist utility from a command promptThe Get-Process commandlet from a PowerShell promptAll of the above
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.