Quick linux script to check memory usage per program

A long time ago somebody shared me the following script to check memory usage per program.

$ ps aux  | awk '{print $6" "$11,$12,$13,$14}' | 
egrep -v "0.*\[.*\]" |
awk '{print $1/1024" MB --> "$2,$3,$4,$5}' | sort -g

Output is the similar to the following:
….
6.39062 Mb –> gnome-screensaver
6.85547 Mb –> /usr/libexec/vino-server –sm-disable
7.22656 Mb –> /usr/libexec/multiload-applet-2 –oaf-activate-iid=OAFIID:GNOME_MultiLoadApplet_Factory –oaf-ior-fd=18
7.27344 Mb –> /usr/libexec/gnome-settings-daemon
7.98438 Mb –> C:\windows\system32\explorer.exe /desktop
8.35547 Mb –> /usr/libexec/gnome-volume-manager –sm-disable
10.8438 Mb –> metacity
11.1094 Mb –> c:\Archivos de programa\Alcatel\A4980\Alcatel 4980\a4980.exe
14.7305 Mb –> vinagre
20.1914 Mb –> gnome-terminal
20.6758 Mb –> planner
21.2227 Mb –> c:\Archivos de programa\Alcatel\A4980\Alcatel 4980\a4980.exe
24.2578 Mb –> gnome-panel
25.5977 Mb –> nautilus
31.6602 Mb –> claws-mail
91.875 Mb –> gedit
109.188 Mb –> /usr/bin/X :0 -audit 0
144.84 Mb –> /usr/bin/firefox

 

3 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Using Debian IceWeasel Debian IceWeasel 3.0.6 on Debian GNU/Linux Debian GNU/Linux

    Acabo de pasarlo y sí, da mucha información… como que el gnome usa demasiada memoria

    Comment by carocr — February 8, 2010 #

  2. Using Mozilla Firefox Mozilla Firefox 3.5.6 on Gentoo Linux Gentoo Linux

    En lo personal no veo que el gnome ocupe demasiada memoria, pero si aplicaciones como Mozilla Firefox, evince, OpenOffice 😐

    Comment by vostorga — February 10, 2010 #

  3. Using Debian IceWeasel Debian IceWeasel 3.0.6 on Debian GNU/Linux Debian GNU/Linux

    Perfecto el script.. XD y por si queres la memoria total esto:

    $ps aux|awk ‘{print $6″ “$11,$12,$13,$14}’|egrep -v “0.*\[.*\]”|awk ‘{sum+=$1/1024}END{print sum}’

    vostorga++

    Comment by Manuel Flores — February 17, 2010 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.