Recent Changes - Search:

Softwares

.

Display-running-processes-sorted-by-memory-usage

Main.Display-running-processes-sorted-by-memory-usage History

Hide minor edits - Show changes to markup

December 14, 2012, at 04:14 PM by 115.242.216.32 -
Changed lines 26-27 from:

ubuntu 1537 0.1 1.9 253948 15092 ? Sl 12:13 0:00 /usr/lib/gnome-panel/wnck-applet ubuntu 1545 0.0 1.9 279028 15112 ? Sl 12:13 0:00 /usr/lib/indicator-applet/indicator-applet-complete

to:

ubuntu 1537 0.1 1.9 253948 15092 ? Sl 12:13 0:00 /usr/lib/gnome-panel/w ubuntu 1545 0.0 1.9 279028 15112 ? Sl 12:13 0:00 /usr/lib/indicator-

Changed line 29 from:

ubuntu 1374 0.0 2.2 119316 17636 ? Sl 12:13 0:00 /usr/bin/python /usr/bin/zeitgeist-daemon

to:

ubuntu 1374 0.0 2.2 119316 17636 ? Sl 12:13 0:00 /usr/bin/python

Changed line 32 from:

ubuntu 1658 0.0 2.9 237088 23152 ? S 12:13 0:00 /usr/bin/python /usr/share/system-config-printer/applet.py

to:

ubuntu 1658 0.0 2.9 237088 23152 ? S 12:13 0:00 /usr/bin/python

August 20, 2012, at 06:53 AM by 15.211.153.75 -
Added lines 22-35:

ubuntu@server3:~$ ps aux | sort -nk +4 | tail
ubuntu    1537  0.1  1.9 253948 15092 ?        Sl   12:13   0:00 /usr/lib/gnome-panel/wnck-applet
ubuntu    1545  0.0  1.9 279028 15112 ?        Sl   12:13   0:00 /usr/lib/indicator-applet/indicator-applet-complete
ubuntu    1302  0.1  2.0 323316 16488 ?        Sl   12:13   0:00 gnome-panel
ubuntu    1374  0.0  2.2 119316 17636 ?        Sl   12:13   0:00 /usr/bin/python /usr/bin/zeitgeist-daemon
ubuntu    1705  0.5  2.2 265060 17580 ?        Sl   12:15   0:02 gnome-terminal
ubuntu    1295  0.1  2.9 442536 23388 ?        Sl   12:13   0:00 nautilus
ubuntu    1658  0.0  2.9 237088 23152 ?        S    12:13   0:00 /usr/bin/python /usr/share/system-config-printer/applet.py
mysql      916  0.0  3.0 170128 23960 ?        Ssl  12:13   0:00 /usr/sbin/mysqld

August 20, 2012, at 06:50 AM by 15.211.153.75 -
Changed lines 28-29 from:

]$ ps --help

to:

$ ps --help

Added line 53:
Changed lines 60-61 from:

@] (:tableend:)

to:

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :) (:cellnr:)

[@

August 20, 2012, at 06:48 AM by 15.211.153.75 -
Added lines 54-76:

Example:

etime ELAPSED elapsed time since the process was started, in the form [[DD-]hh:]mm:ss.

@] (:tableend:) ubuntu@server3:~$ ps -eo etime,rss,vsz,pid,cputime,cmd --width 100 --sort rss,vsz | head -n 1

       ELAPSED   RSS    VSZ   PID     TIME CMD

ubuntu@server3:~$ ps -eo etime,rss,vsz,pid,cputime,cmd --width 100 --sort rss,vsz | tail --lines 10

      03:42 15188 325268  1312 00:00:00 nm-applet --sm-disable
      03:42 16488 323316  1302 00:00:00 gnome-panel
      01:55 17580 265060  1705 00:00:00 gnome-terminal
      03:41 17636 119316  1374 00:00:00 /usr/bin/python /usr/bin/zeitgeist-daemon
      03:12 23152 237088  1658 00:00:00 /usr/bin/python /usr/share/system-config-printer/applet.py
      03:42 23388 442536  1295 00:00:00 nautilus
      03:47 23960 170128   916 00:00:00 /usr/sbin/mysqld
      03:38 37244 123496  1549 00:00:01 /usr/bin/ruby1.8 /usr/bin/puppet master --masterport=8140
      03:48 54816 154496   826 00:00:02 /usr/bin/X :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-t
      01:51 173432 775488 1765 00:00:25 /usr/lib/firefox-4.0/firefox-bin

ubuntu@server3:~$

@] (:tableend:)

August 20, 2012, at 06:44 AM by 15.211.153.75 -
Added lines 22-53:

ps help

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :) (:cellnr:)

]$ ps --help
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
r  only running processes             U  processes for specified users
x  processes w/o controlling ttys     t  by tty
*********** output format **********  *********** long options ***********
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  virtual memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy

(:tableend:)

August 20, 2012, at 06:40 AM by 15.211.153.75 -
Added lines 1-26:

(:Google1:) (:Googletxt:)


Display the top ten running processes - sorted by memory usage

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

(:table border=1 width=50% bgcolor=yellow cellspacing=0 :) (:cellnr:)

ps aux | sort -nk +4 | tail


or 


ps -eo rss,vsz,pid,cputime,cmd --width 100 --sort rss,vsz | tail --lines 10

(:tableend:)


(:Googlemm:)

Edit - History - Print - Recent Changes - Search
Page last modified on December 14, 2012, at 04:14 PM