LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-03-2011, 05:43 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
Unable to understand ps output.


I m executing ps command and sorting it according to memory usage.

Please find the output of the command.

Code:
# ps aux --sort pmem
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2060   624 ?        Ss   01:54   0:00 init [5]
root         2  0.0  0.0      0     0 ?        S<   01:54   0:00 [migration/0]
root         3  0.0  0.0      0     0 ?        SN   01:54   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S<   01:54   0:00 [watchdog/0]
root         5  0.0  0.0      0     0 ?        S<   01:54   0:00 [migration/1]
root         6  0.0  0.0      0     0 ?        SN   01:54   0:00 [ksoftirqd/1]
root         7  0.0  0.0      0     0 ?        S<   01:54   0:00 [watchdog/1]
root         8  0.0  0.0      0     0 ?        S<   01:54   0:04 [events/0]
root         9  0.0  0.0      0     0 ?        S<   01:54   0:00 [events/1]
root        10  0.0  0.0      0     0 ?        S<   01:54   0:00 [khelper]
root        11  0.0  0.0      0     0 ?        S<   01:54   0:00 [kthread]
root        15  0.0  0.0      0     0 ?        S<   01:54   0:00 [kblockd/0]
root        16  0.0  0.0      0     0 ?        S<   01:54   0:00 [kblockd/1]
root        17  0.0  0.0      0     0 ?        S<   01:54   0:00 [kacpid]
root        77  0.0  0.0      0     0 ?        S<   01:54   0:00 [cqueue/0]
root        78  0.0  0.0      0     0 ?        S<   01:54   0:00 [cqueue/1]
root        81  0.0  0.0      0     0 ?        S<   01:54   0:00 [khubd]
root        83  0.0  0.0      0     0 ?        S<   01:54   0:00 [kseriod]
root       153  0.0  0.0      0     0 ?        S    01:54   0:00 [pdflush]
root       154  0.0  0.0      0     0 ?        S    01:54   0:00 [pdflush]
root       155  0.0  0.0      0     0 ?        S<   01:54   0:00 [kswapd0]
root       156  0.0  0.0      0     0 ?        S<   01:54   0:00 [aio/0]
root       157  0.0  0.0      0     0 ?        S<   01:54   0:00 [aio/1]
root       314  0.0  0.0      0     0 ?        S<   01:54   0:00 [kpsmoused]
root       348  0.0  0.0      0     0 ?        S<   01:54   0:00 [ata/0]
root       349  0.0  0.0      0     0 ?        S<   01:54   0:00 [ata/1]
root       350  0.0  0.0      0     0 ?        S<   01:54   0:00 [ata_aux]
root       366  0.0  0.0      0     0 ?        S<   01:54   0:00 [ksnapd]
root       369  0.0  0.0      0     0 ?        S<   01:54   0:00 [kjournald]
root       397  0.0  0.0      0     0 ?        S<   01:54   0:00 [kauditd]
root       431  0.0  0.0   2440   908 ?        S<s  01:54   0:00 /sbin/udevd -d
root      3644  0.0  0.0      0     0 ?        S<   01:54   0:00 [kmpathd/0]
root      3645  0.0  0.0      0     0 ?        S<   01:54   0:00 [kmpathd/1]
root      3670  0.0  0.0      0     0 ?        S<   01:55   0:00 [kjournald]
root      3672  0.0  0.0      0     0 ?        S<   01:55   0:00 [kjournald]
root      4020  0.0  0.0  12128   632 ?        S<sl 01:55   0:00 auditd
root      4022  0.0  0.0  12048   648 ?        S<sl 01:55   0:00 /sbin/audispd
root      4046  0.0  0.0   1716   564 ?        Ss   01:55   0:00 syslogd -m 0
root      4049  0.0  0.0   1672   404 ?        Ss   01:55   0:00 klogd -x
root      4061  0.0  0.0   2428   364 ?        Ss   01:55   0:00 irqbalance
rpc       4082  0.0  0.0   1808   556 ?        Ss   01:55   0:00 portmap
root      4111  0.0  0.0   1920   808 ?        Ss   01:55   0:00 rpc.statd
root      4148  0.0  0.0   5436   584 ?        Ss   01:55   0:00 rpc.idmapd
dbus      4167  0.0  0.0   2744   804 ?        Ss   01:55   0:00 dbus-daemon --s
root      4178  0.0  0.0   2148   756 ?        Ss   01:55   0:00 /usr/sbin/hcid
root      4182  0.0  0.0   1740   500 ?        Ss   01:55   0:00 /usr/sbin/sdpd
root      4206  0.0  0.0      0     0 ?        S<   01:55   0:00 [krfcommd]
root      4245  0.0  0.1  22964  1268 ?        Ssl  01:55   0:00 pcscd
root      4267  0.0  0.0   1904   448 ?        Ss   01:55   0:00 /usr/bin/hidd -
root      4283  0.0  0.1  10828  1308 ?        Ssl  01:55   0:00 automount
root      4302  0.0  0.0   1664   536 ?        Ss   01:55   0:00 /usr/sbin/acpid
root      4313  0.0  0.0   5080   492 ?        Ss   01:55   0:00 ./hpiod
root      4318  0.0  0.4  13256  4692 ?        S    01:55   0:00 python ./hpssd.
root      4333  0.0  0.1   6988  1048 ?        Ss   01:55   0:00 /usr/sbin/sshd
root      4344  0.0  0.1   9744  2032 ?        Ss   01:55   0:00 cupsd
root      4356  0.0  0.0   2720   836 ?        Ss   01:55   0:00 xinetd -stayali
root      4390  0.0  0.1   9020  1860 ?        Ss   01:55   0:00 sendmail: accep
smmsp     4398  0.0  0.1   8072  1512 ?        Ss   01:55   0:00 sendmail: Queue
root      4409  0.0  0.0   1896   360 ?        Ss   01:55   0:00 gpm -m /dev/inp
root      4421  0.0  0.1   5260  1104 ?        Ss   01:55   0:00 crond
xfs       4452  0.0  0.1   3924  1704 ?        Ss   01:55   0:00 xfs -droppriv -
root      4473  0.0  0.0   2240   428 ?        Ss   01:55   0:00 /usr/sbin/atd
avahi     4509  0.0  0.1   2568  1328 ?        Ss   01:55   0:00 avahi-daemon: r
avahi     4510  0.0  0.0   2568   308 ?        Ss   01:55   0:00 avahi-daemon: c
68        4521  0.0  0.3   5540  3560 ?        Ss   01:55   0:00 hald
root      4522  0.0  0.0   3132   968 ?        S    01:55   0:00 hald-runner
68        4529  0.0  0.0   1992   796 ?        S    01:55   0:00 hald-addon-acpi
68        4534  0.0  0.0   1996   780 ?        S    01:55   0:00 hald-addon-keyb
root      4543  0.1  0.0   1948   612 ?        S    01:55   0:09 hald-addon-stor
root      4621  0.0  0.0   1932   344 ?        S    01:55   0:00 /usr/sbin/smart
root      4626  0.0  0.0   1652   424 tty1     Ss+  01:55   0:00 /sbin/mingetty
root      4627  0.0  0.0   1652   424 tty2     Ss+  01:55   0:00 /sbin/mingetty
root      4630  0.0  0.0   1652   424 tty3     Ss+  01:55   0:00 /sbin/mingetty
root      4635  0.0  0.0   1656   424 tty4     Ss+  01:55   0:00 /sbin/mingetty
root      4637  0.0  0.0   1656   448 tty5     Ss+  01:55   0:00 /sbin/mingetty
root      4638  0.0  0.0   1656   428 tty6     Ss+  01:55   0:00 /sbin/mingetty
root      4639  0.0  0.2  15448  2332 ?        Ss   01:55   0:00 /usr/sbin/gdm-b
root      4729  0.0  0.2  16168  2220 ?        S    01:55   0:00 /usr/sbin/gdm-b
root      4731  0.0  0.3  27392  3740 ?        Sl   01:55   0:00 /usr/libexec/gd
root      4732  0.0  0.4  10732  4848 tty7     Ss+  01:55   0:01 /usr/bin/Xorg :
root      4746  0.0  0.9  24444  9772 ?        SN   01:55   0:00 /usr/bin/python
gdm       4756  0.0  1.5  30488 15540 ?        Ss   01:55   0:00 /usr/libexec/gd
root      4758  0.0  0.1   2552  1104 ?        SN   01:55   0:00 /usr/libexec/ga
root      4763  0.0  0.2  10036  2936 ?        Ss   01:58   0:04 sshd: root@pts/
root      4765  0.0  0.1   4528  1396 pts/1    Ss   01:58   0:00 -bash
root      4797  0.0  0.2   9844  2836 ?        Ss   01:59   0:00 sshd: root@pts/
root      4799  0.0  0.1   4528  1408 pts/2    Ss+  01:59   0:00 -bash
root      5534  0.0  0.0   4216   900 pts/1    R+   04:04   0:00 ps aux --sort p
i dont think memory is sorted here .Please help.
 
Old 05-03-2011, 06:17 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Hi,

This (--sort pmem not working) seems to be a bug (procps: in ps, add rss-style sorting for %mem and pmem keywords)

Try this instead:
Code:
ps aux --sort rss
Hope this helps.
 
1 members found this post helpful.
Old 05-03-2011, 06:34 AM   #3
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by druuna View Post
Hi,

This (--sort pmem not working) seems to be a bug (procps: in ps, add rss-style sorting for %mem and pmem keywords)

Try this instead:
Code:
ps aux --sort rss
Hope this helps.
Thanks its working for me.
 
Old 05-03-2011, 06:39 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,809

Rep: Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168
Doesn't appear to have been fixed upstream - still fails on procps-3.2.8.18 (Fedora 15)
 
Old 05-03-2011, 11:03 AM   #5
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by syg00 View Post
Doesn't appear to have been fixed upstream - still fails on procps-3.2.8.18 (Fedora 15)
Which command you are talking about.
Code:
# ps aux --sort pmem
or
Code:
# ps aux --sort rss
 
Old 05-03-2011, 11:14 AM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
pinga123, take a look at "htop".
 
Old 05-03-2011, 11:20 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Hi,
Quote:
Originally Posted by pinga123 View Post
Which command you are talking about.
Code:
# ps aux --sort pmem
or
Code:
# ps aux --sort rss
I'm sure he's talking about ps aux --sort pmem, which does not work on procps versions 3.2.8-9, 3.2.8-10 and 3.2.8.18 (the ones I could check, probably 3.2.8.11 up to 3.2.8.17 are also not patched yet).

ps aux --sort rss does work on the three versions I checked.

Hope this helps.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help to understand tcpdump output tkmsr Linux - Networking 3 03-07-2011 01:47 AM
[SOLVED] how to understand the following output of traceroute jcwkyl Linux - Networking 3 07-12-2010 03:33 AM
how to understand valgrind output? santoshturamari Linux - Newbie 0 11-04-2008 04:57 AM
Help me understand my top output neocontrol Linux - Server 5 02-21-2008 05:46 PM
help me to understand the output of chkrootkit ddaas Linux - Security 2 04-19-2005 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration