Knowee
Questions
Features
Study Tools

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

🧐 Not the exact question you are looking for?Go ask a question

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:

  1. ps: This is the command that reports a snapshot of the current processes.

  2. aux: These are options to the ps command.

    • a shows processes for all users
    • u displays the process's user/owner
    • x also shows processes not attached to a terminal
  3. --sort=-%mem: This option sorts the process listing by the memory usage in descending order. The - sign before %mem indicates 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.

This problem has been solved

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

1/1

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.