Top 10 Memory Processes

ps aux | sort -rk 4,4 | head -n 10
It displays the top 10 processes sorted by memory usage
Sample Output
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
powercen 31878 24.1  3.3 3138164 546484 ?      Sl   11:45  24:06 pmdtm -PR -gmh alsea -gmp 6015 -guid 6b122687-8aeb-481a-a33f-867a59c14fee -rst 180 -s ...
powercen  2639  0.0  3.2 1626772 531944 ?      Sl   Jun20  44:22 /u01/home/app/powercen/Informatica/9.5.1/java/bin/java -Dfile.encoding=UTF-8 -d64 -Xmx512M ...
powercen 27794  9.0  2.1 2809284 344388 ?      Sl   10:43  14:34 pmdtm -PR -gmh alsea -gmp 6015 -guid 6b122687-8aeb-481a-a33f-867a59c14fee -rst 180 -s ...
powercen 13796  0.2  2.1 3406808 349972 ?      Sl   Jun19 337:10 /u01/home/app/powercen/Informatica/9.5.1/java/bin/java -ea -Djava.awt.headless=true ... -Xmx2048m ...
powercen 32222  101 19.9 4805632 3262688 ?     Sl   11:55  90:33 pmdtm -PR -gmh alsea -gmp 6015 -guid 6b122687-8aeb-481a-a33f-867a59c14fee -rst 180 -s ...
powercen 14036  0.3  1.6 2841340 269712 ?      Sl   Jun19 449:57 /u01/home/app/powercen/Informatica/9.5.1/server/bin/pmrepagent - RG9tYWluX0RFVlRFU1Q= RGVzYXJyb2xsbw== ...
ctmagent  6176  0.0  1.6 4804504 276240 ?      Sl   Mar29 165:32 ./JRE/bin/java -classpath exe/ctminf.jar com.bmc.ctm.cminf.Start start 4
powercen 14218  0.1  1.5 1927368 260112 ?      Sl   Jun19 181:00 /u01/home/app/powercen/Informatica/9.5.1/server/bin/pmserver RG9tYWluX0RFVlRFU1Q= SVNfRGVzYXJyb2xsbw== ...
powercen 13963  0.1  1.1 1356460 195172 ?      Sl   Jun19 168:50 /u01/home/app/powercen/Informatica/9.5.1/java/bin/java -XX:GCTimeRatio=9 -XX:MaxPermSize=128m -Xmx512M ...

3
By: x3mboy
2019-09-26 16:37:33

1 Alternatives + Submit Alt

What Others Think

You can further reduce (clean up) the output by piping to awk. i.e.: only display the %usage and corresponding application ps aux | sort -rk 4,4 | head -n 10 | awk '{print $4,$11}'
n0a110w · 6 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: