On Tuesday 05 February 2008 19:33, James D. Parra wrote:
On Tuesday 05 February 2008 09:45, James D. Parra wrote:
Hello,
How can I find out what process or application is using all of my memory?
The "ps" and "top" commands or KSysGuard or "qps" GUIs can all do this. The System Monitor KDE panel applet ("KTimeMon") is nice for giving an overview of memory allocation (in particular, it's the easiest way to see the breakdown between cache, buffers, used and free memory).
But do you have an actual problem? Is your system behaving badly? Linux manages its RAM to maximize its utilization, which means often there is little or no RAM that is technically "free," since its being used for file system buffers or other caching. But such RAM is readily available to be reassigned to other purposes.
This often alarms those unfamiliar with Linux, expecting that when the so-called "free" memory is low the system is in trouble and imminent failure is likely. That is rarely so.
~~~~
Thanks Randall. There is no X server running on this system so the gui utilities won't help here. When using top it shows the %, but doesn't reveal the whole story. I'd like to know which process is using the most bytes, if possible.
From top;
top - 10:38:38 up 1:13, 1 user, load average: 1.39, 1.35, 1.25 Tasks: 82 total, 2 running, 80 sleeping, 0 stopped, 0 zombie Cpu0 : 60.5%us, 38.5%sy, 0.0%ni, 0.0%id, 1.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu1 : 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2059684k total, 1666780k used, 392904k free, 260k buffers Swap: 4200988k total, 0k used, 4200988k free, 1266288k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5439 root 25 0 245m 142m 8260 R 99 7.1 19:08.17 parse-metadata 159 root 16 0 0 0 0 S 0 0.0 0:00.28 pdflush <snip>
Yes, zmd is hogging all of the cpu after a reboot and I have disabled novel-zmd from the system start up, but this is a mail server and clients were getting out of memory errors when attempting to connect to the server prior to 'parse-metadata' running. The 'out of memory' error was fixed after rebooting, although I noticed the memory used creeping up again. What syntax for ps will show which app' or process is using most of the RAM?
Any and all insights are most appreciated.
Thank you,
~James
Use the switches for ps to find out more. A simple "ps axo com,sz " will yield some thing like rikjoh@sparhawk:~> ps axo comm,sz COMMAND SZ init 172 ksoftirqd/0 0 events/0 0 khelper 0 kthread 0 kacpid 0 kblockd/0 0 pdflush 0 pdflush 0 aio/0 0 kswapd0 0 kseriod 0 xfslogd/0 0 xfsdatad/0 0 xfsbufd 0 xfssyncd 0 xfssyncd 0 udevd 460 khubd 0 w1_control 0 w1_bus_master1 0 gkrellmd 8832 dbus-daemon 888 syslog-ng 472 klogd 407 resmgrd 552 portmap 383 kdm 688 X 14093 kdm 912 rpciod/0 0 lockd 0 acpid 373 cupsd 1633 nfsd4 0 nfsd 0 nfsd 0 nfsd 0 nfsd 0 rpc.mountd 487 sshd 869 ntpd 1034 .... Check the man for ps and see what magical numbers you can find. -- /Rikard ----------------------------------------------------------------------------- email : rikard.j@rikjoh.com web : http://www.rikjoh.com mob: : +46 (0)763 19 76 25 ------------------------ Public PGP fingerprint ---------------------------- < 15 28 DF 78 67 98 B2 16 1F D3 FD C5 59 D4 B6 78 46 1C EE 56 >