Display the top ten running processes - sorted by memory usage

ps axo %mem,pid,euser,cmd | sort -nr | head -n 10
Sample Output
11.5  1957 lainme   firefox http://twitter.com/keyi_bu/status/256446157193093120/photo/1
 3.4  1813 lainme   /usr/bin/gnome-shell
 3.3  1867 lainme   /usr/bin/python2 /usr/bin/hotot-gtk3
 2.6  5183 lainme   conky
 1.5  1645 root     /usr/bin/Xorg :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-3aSYDI/database -nolisten tcp vt8
 1.0  1854 lainme   pidgin
 1.0 18439 lainme   fcitx
 0.9  1998 lainme   /usr/lib/firefox/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /usr/lib/firefox/omni.ja 1957 plugin
 0.4  1821 lainme   nm-applet
 0.4  1785 lainme   /usr/lib/gnome-settings-daemon/gnome-settings-daemon

By: lainme
2012-10-12 03:27:26

4 Alternatives + Submit Alt

  • ps returns all running processes which are then sorted by the 4th field in numerical order and the top 10 are sent to STDOUT. Show Sample Output

    ps aux | sort -nk +4 | tail
    root · 2009-01-23 17:12:33 234

  • 5
    ps aux --sort -rss | head
    unixmonkey42657 · 2012-11-14 17:47:50 7
  • Display the top processes sorted by memory usage. This is mostly useful because it's easy to remember and can give me a quick 'top' view of a group of servers when used over pssh. (Though I'd recommend |head -10 to minimize the output). Show Sample Output

    top -b -o +%MEM |head -17
    dak1n1 · 2016-03-16 22:14:34 8
  • This command is better for just displaying the memory in KiB. Show Sample Output

    ps -eo size,command --sort -size | head
    bracourt · 2016-09-30 20:03:21 12

What Others Think

Die Villa Roma ist nicht zuletzt aufgrund ihrer exklusiven Nachtclub-Atmosphäre und ihrer 5-Sterne-Erotik ein ganz besonderes Bordell in München. Ihr Aufenthalt bei uns am Frankfurter Ring fängt mit einer herzlichen Begrüßung an. Bordell München
villaroma1 · 48 weeks and 5 days ago
We started True People Check because we saw a significant need for high-quality open source intelligence (OSINT) in the insurance industry.social media investigation company
truepeoplecheck1 · 48 weeks and 3 days ago
thesportstation1 · 45 weeks and 4 days ago
Moving your property office may be pretty the obstacle for those getting into their new domestic. There are such a lot of factors to think about it is often tough to hold it immediately. Well, when it comes to shifting in Arizona all of us recognise our stuff so permit us to shed a touch light on the evil business of relocating a home workplace. http://nicolosimovers.com/">tucson movers
nicolosimovers1 · 45 weeks ago
DIMO is one of most professional manufacturers with rich experience in producing bathroom mirrors,especially LED bathroom mirrors and illuminated mirror cabinets. Through 12 years development, we have owned two factories in city of Shaoxing and Hangzhou. hotel led bathroom mirrors
bathroomled · 45 weeks ago
L’actualité sur le monde des enchères, du design, de la déco et objets rares. Des histoires insolites et une sélection de belles choses à vendre. fauteuil barcelona occasion
auctionlab1 · 40 weeks and 1 day ago
Vi erbjuder tuningvärldens bästa programvaror och custommaps till dom flesta bilar. För andra modifieringar, kontakta oss! bsr
boosttuning · 39 weeks ago
Nice and good post If it's not too much trouble, guarantee that you have checked every one of the reports and that you are 100% happy with them. Also, do ask about the endorsed NOC of the lodging society by the concerned specialists. Bahria town Lahore Along these lines, the fulfillment of the clients can be guaranteed.
victoria12 · 38 weeks and 5 days ago
Kitchen renovation is viewed as an expensive engagement, forcing most homeowners to seek ways of reducing costs. One of the things that people often do is to eliminate the services of a kitchen designer during a renovation process. green kitchen cabinets
cabinetdiy · 38 weeks and 2 days ago
Thanks for this post Victoria City Lahore A top notch private Project Launched by Sheranwala bunch. 3, 5, 10 Marla and 1 Kanal Plots accessible in simple Installments
victoria12 · 37 weeks and 5 days ago
Over the past decade, DroCo Roofing has served communities across Northeast Ohio with their residential and commercial roofing, siding, gutter, window and door needs. Whether you're looking to improve the value and look of your home or need to repair storm damage, our highly experienced team of professionals will have your home looking better than new. roofing company akron
drocoroofing · 27 weeks and 2 days ago
Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies baby pug puppies for sale pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
Perfecthomepugs · 20 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: