Find the answer to your Linux question:
Results 1 to 3 of 3
Hi i have got 512 MB RAM top shows most of my memory used up while i am unable to figure out which process is eating my memory plz see ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2

    which process is eating my memory

    Hi

    i have got 512 MB RAM
    top shows most of my memory used up while i am unable to figure out which process is eating my memory

    plz see my top and ps -aux output

    [root@delhi65 bin]# top

    top - 17:25:18 up 46 days, 2:36, 1 user, load average: 0.00, 0.47, 2.04
    Tasks: 57 total, 2 running, 55 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0% us, 0.3% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 508068k total, 506012k used, 2056k free, 1168k buffers
    Swap: 1015800k total, 172k used, 1015628k free, 482856k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1 root 16 0 3416 572 1408 S 0.0 0.1 0:04.85 init
    2 root 34 19 0 0 0 S 0.0 0.0 0:01.38 ksoftirqd/0
    3 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 events/0
    4 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
    5 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
    22 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
    35 root 12 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
    23 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
    34 root 15 0 0 0 0 S 0.0 0.0 20:28.71 kswapd0
    108 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
    182 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 ata/0
    184 root 21 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
    185 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
    193 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kmirrord/0
    202 root 15 0 0 0 0 S 0.0 0.0 0:14.01 kjournald
    1143 root 6 -10 3212 508 1340 S 0.0 0.1 0:00.17 udevd
    1823 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
    2140 root 16 0 2020 576 1340 S 0.0 0.1 0:07.33 syslogd
    2144 root 16 0 2760 468 1292 S 0.0 0.1 0:00.00 klogd
    2165 rpc 22 0 2448 596 1420 S 0.0 0.1 0:00.00 portmap
    2185 rpcuser 16 0 2808 760 1460 S 0.0 0.1 0:00.00 rpc.statd
    2218 root 16 0 3472 588 1344 S 0.0 0.1 0:00.00 rpc.idmapd
    2289 root 16 0 4168 544 1368 S 0.0 0.1 0:00.24 nifd
    2319 nobody 18 0 14208 1016 1468 S 0.0 0.2 0:00.00 mDNSResponder
    2331 root 15 0 3260 812 1460 S 0.0 0.2 0:00.16 smartd
    2341 root 20 0 2684 532 1288 S 0.0 0.1 0:00.00 acpid
    2389 root 17 0 4992 1524 3528 S 0.0 0.3 0:38.05 sshd
    2400 root 21 0 2108 828 1732 S 0.0 0.2 0:00.00 xinetd
    2440 root 15 0 3116 536 1488 S 0.0 0.1 0:00.00 gpm
    [root@delhi65 bin]# ps -aux
    Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    root 1 0.0 0.1 3416 572 ? S Jul23 0:04 init [3]
    root 2 0.0 0.0 0 0 ? SN Jul23 0:01 [ksoftirqd/0]
    root 3 0.0 0.0 0 0 ? S< Jul23 0:00 [events/0]
    root 4 0.0 0.0 0 0 ? S< Jul23 0:00 [khelper]
    root 5 0.0 0.0 0 0 ? S< Jul23 0:00 [kacpid]
    root 22 0.0 0.0 0 0 ? S< Jul23 0:00 [kblockd/0]
    root 35 0.0 0.0 0 0 ? S< Jul23 0:00 [aio/0]
    root 23 0.0 0.0 0 0 ? S Jul23 0:00 [khubd]
    root 34 0.0 0.0 0 0 ? S Jul23 20:28 [kswapd0]
    root 108 0.0 0.0 0 0 ? S Jul23 0:00 [kseriod]
    root 182 0.0 0.0 0 0 ? S< Jul23 0:00 [ata/0]
    root 184 0.0 0.0 0 0 ? S Jul23 0:00 [scsi_eh_0]
    root 185 0.0 0.0 0 0 ? S Jul23 0:00 [scsi_eh_1]
    root 193 0.0 0.0 0 0 ? S< Jul23 0:00 [kmirrord/0]
    root 202 0.0 0.0 0 0 ? S Jul23 0:14 [kjournald]
    root 1143 0.0 0.0 3212 508 ? S<s Jul23 0:00 udevd
    root 1823 0.0 0.0 0 0 ? S Jul23 0:00 [kjournald]
    root 2140 0.0 0.1 2020 576 ? Ss Jul23 0:07 syslogd -m 0
    root 2144 0.0 0.0 2760 468 ? Ss Jul23 0:00 klogd -x
    rpc 2165 0.0 0.1 2448 596 ? Ss Jul23 0:00 portmap
    rpcuser 2185 0.0 0.1 2808 760 ? Ss Jul23 0:00 rpc.statd
    root 2218 0.0 0.1 3472 588 ? Ss Jul23 0:00 rpc.idmapd
    root 2289 0.0 0.1 4168 544 ? Ss Jul23 0:00 nifd -n
    nobody 2319 0.0 0.1 14208 1016 ? Ssl Jul23 0:00 mDNSResponder
    root 2331 0.0 0.1 3260 812 ? S Jul23 0:00 /usr/sbin/smartd
    root 2341 0.0 0.1 2684 532 ? Ss Jul23 0:00 /usr/sbin/acpid
    root 2389 0.0 0.2 4992 1524 ? Ss Jul23 0:38 /usr/sbin/sshd
    root 2400 0.0 0.1 2108 828 ? Ss Jul23 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
    root 2440 0.0 0.1 3116 536 ? Ss Jul23 0:00 gpm -m /dev/input/mice -t imps2
    root 2450 0.0 0.1 4032 828 ? Ss Jul23 0:00 crond
    xfs 2476 0.0 0.3 3764 1612 ? Ss Jul23 0:00 xfs -droppriv -daemon
    daemon 2495 0.0 0.1 2764 644 ? Ss Jul23 0:00 /usr/sbin/atd
    dbus 2514 0.0 0.2 2296 1224 ? Ss Jul23 0:00 dbus-daemon-1 --system
    root 2527 0.0 0.2 3968 1032 ? Ss Jul23 0:00 cups-config-daemon
    root 2548 0.0 0.0 1684 408 tty1 Ss+ Jul23 0:00 /sbin/mingetty tty1
    root 2567 0.0 0.0 2356 408 tty2 Ss+ Jul23 0:00 /sbin/mingetty tty2
    root 2580 0.0 0.0 2668 408 tty3 Ss+ Jul23 0:00 /sbin/mingetty tty3
    root 2593 0.0 0.0 2784 404 tty4 Ss+ Jul23 0:00 /sbin/mingetty tty4
    root 2606 0.0 0.0 2864 404 tty5 Ss+ Jul23 0:00 /sbin/mingetty tty5
    root 2619 0.0 0.0 3148 408 tty6 Ss+ Jul23 0:00 /sbin/mingetty tty6
    root 3256 0.0 0.1 3588 852 ? Ss Jul23 0:00 /usr/bin/ssh-agent -s
    root 3290 0.0 0.2 2716 1176 ? Ss Jul23 0:00 dbus-daemon-1 --fork --print-pid 8 --print-addre
    root 31089 0.0 0.0 0 0 ? S Aug13 0:00 [pdflush]
    root 31092 0.0 0.0 0 0 ? S Aug13 0:00 [pdflush]
    root 28734 0.0 0.3 7700 1976 ? Ss 15:50 0:00 sshd: bill [priv]
    bill 28736 0.0 0.4 7704 2056 ? S 15:50 0:00 sshd: bill@pts/1
    bill 28737 0.0 0.2 4356 1392 pts/1 Ss 15:50 0:00 -bash
    root 28759 0.0 0.2 4644 1148 pts/1 S 15:50 0:00 su -
    root 28760 0.0 0.2 4752 1472 pts/1 S 15:50 0:00 -bash
    root 28937 0.0 0.3 4700 1704 ? Ss 17:15 0:00 /usr/local/apache2/bin/httpd -k start
    daemon 28938 0.0 0.3 4844 1836 ? S 17:15 0:00 /usr/local/apache2/bin/httpd -k start
    daemon 28939 0.0 0.3 4828 1700 ? S 17:15 0:00 /usr/local/apache2/bin/httpd -k start
    daemon 28940 0.0 0.3 4828 1700 ? S 17:15 0:00 /usr/local/apache2/bin/httpd -k start
    daemon 28941 0.0 0.3 4828 1700 ? S 17:15 0:00 /usr/local/apache2/bin/httpd -k start
    daemon 28942 0.0 0.3 4828 1700 ? S 17:15 0:00 /usr/local/apache2/bin/httpd -k start
    daemon 28943 0.0 0.3 4836 1724 ? S 17:17 0:00 /usr/local/apache2/bin/httpd -k start
    root 28956 0.0 0.1 4016 776 pts/1 R+ 17:25 0:00 ps -aux



    Please help
    i am a newbie in linux.

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,789
    The best way to find this out is to sort by memory usage. When you have top open press Shift+F (the shift *IS* needed) Then press the letter that corresponds to memory usage (n if i recollect properly) Then it will show the most memory usage program at the top
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2
    already sorted by memory ....but none of processes show heavy usage

    Cpu(s): 0.3% us, 0.0% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 508068k total, 505744k used, 2324k free, 1480k buffers
    Swap: 1015800k total, 172k used, 1015628k free, 482064k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ GROUP COMMAND
    28736 bill 16 0 7704 2056 3684 S 0.0 0.4 0:00.13 bill sshd
    28734 root 16 0 7700 1976 3684 S 0.0 0.4 0:00.02 root sshd
    28938 daemon 16 0 4844 1836 2368 S 0.0 0.4 0:00.00 daemon httpd
    28940 daemon 16 0 4832 1836 2368 S 0.0 0.4 0:00.00 daemon httpd
    28942 daemon 15 0 4832 1836 2368 S 0.0 0.4 0:00.00 daemon httpd
    28939 daemon 16 0 4828 1732 2368 S 0.0 0.3 0:00.00 daemon httpd
    28941 daemon 16 0 4828 1732 2368 S 0.0 0.3 0:00.00 daemon httpd
    28943 daemon 16 0 4836 1724 2368 S 0.0 0.3 0:00.00 daemon httpd
    28937 root 16 0 4700 1704 2368 S 0.0 0.3 0:00.00 root httpd
    2476 xfs 16 0 3764 1612 2380 S 0.0 0.3 0:00.00 xfs xfs
    2389 root 17 0 4992 1524 3528 S 0.0 0.3 0:38.05 root sshd
    28760 root 15 0 4752 1472 4016 S 0.0 0.3 0:00.12 root bash
    28737 bill 16 0 4356 1392 4016 S 0.0 0.3 0:00.01 bill bash
    2514 dbus 16 0 2296 1224 2052 S 0.0 0.2 0:00.17 dbus dbus-daemon-1
    3290 root 16 0 2716 1176 2052 S 0.0 0.2 0:00.00 root dbus-daemon-1
    28759 root 15 0 4644 1148 3832 S 0.0 0.2 0:00.00 bill su
    2527 root 22 0 3968 1032 2508 S 0.0 0.2 0:00.00 root cups-config-dae
    2319 nobody 18 0 14208 1016 1468 S 0.0 0.2 0:00.00 nobody mDNSResponder
    28959 root 16 0 2540 944 1664 R 0.3 0.2 0:00.14 root top
    3256 root 18 0 3588 852 3200 S 0.0 0.2 0:00.00 root ssh-agent
    2400 root 21 0 2108 828 1732 S 0.0 0.2 0:00.00 root xinetd
    2450 root 16 0 4032 828 3512 S 0.0 0.2 0:00.15 root crond
    2331 root 15 0 3260 812 1460 S 0.0 0.2 0:00.16 root smartd
    2185 rpcuser 16 0 2808 760 1460 S 0.0 0.1 0:00.00 rpcuser rpc.statd
    2495 daemon 16 0 2764 644 1384 S 0.0 0.1 0:00.14 daemon atd
    2165 rpc 22 0 2448 596 1420 S 0.0 0.1 0:00.00 rpc portmap
    2218 root 16 0 3472 588 1344 S 0.0 0.1 0:00.00 root rpc.idmapd
    2140 root 16 0 2020 576 1340 S 0.0 0.1 0:07.33 root syslogd
    1 root 16 0 3416 572 1408 S 0.0 0.1 0:04.85 root init

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...