Solved

What is eating all of my memory?

Posted on 2009-07-06
26
1,960 Views
Last Modified: 2013-12-06
Hi

Just recently a number of files have started eating up my memory. The text below is a cut and paste of the main ofenders. I got it by typing #top into putty.

Does anybody know what these things are?  I installed htmldoc recently. Is it something to do with that?

Kind Regards,

Adrian Smith
1606 root      20   0  6728  916  400 S    0  0.1   0:01.65 dhclient

 1647 root      20   0  5896  600  476 S    0  0.1   0:12.31 syslogd

 1650 root      20   0  3792  436  344 S    0  0.0   0:00.01 klogd

 1674 dbus      20   0 21248  868  656 S    0  0.1   0:00.00 dbus-daemon

 1713 sw-cp-se  20   0 60084 3240 1356 S    0  0.3   0:00.99 sw-cp-serverd

 1725 root      20   0 60592 1224  676 S    0  0.1   0:10.57 sshd

 1736 root      20   0 21628  892  680 S    0  0.1   0:00.09 xinetd

 1751 root      20   0 40852  916  540 S    0  0.1   0:00.00 couriertcpd

 1753 root      20   0 33548 1424 1088 S    0  0.1   0:00.00 courierlogger

 1761 root      20   0 40852  920  540 S    0  0.1   0:00.00 couriertcpd

Open in new window

0
Comment
Question by:lwfuk
  • 13
  • 9
  • 3
  • +1
26 Comments
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
On the server -- please post an output of the following: 'ps auuwx'
0
 
LVL 1

Expert Comment

by:dontdig
Comment Utility
i biggest offender is GNOME or KDE ....yes it truth in linux  these display managers sucks lots of ram but if ur not using any then may be the new programs of unnecessary packages are eating ram just remove them from start-up via chkconfig and check if its still same or not
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
except this one
 1713 sw-cp-se  20   0 60084 3240 1356 S    0  0.3   0:00.99 sw-cp-serverd

all are linux basic programm which is Ok

by loooking those, i am not seeing too much memory use

run this command , to show which process is eating your memory

ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
also

after running top command

press Shift +M  

it will short the output by memory use higher to lower

0
 

Author Comment

by:lwfuk
Comment Utility
Dear mwecomputers

Here is the printout.

# ps auuwx

 

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root         1  0.0  0.0  10336   760 ?        Ss   Jul02   0:07 init [3]

root         2  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kthreadd]

root         3  0.0  0.0      0     0 ?        S<   Jul02   0:00 [migration/0]

root         4  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ksoftirqd/0]

root         5  0.0  0.0      0     0 ?        S<   Jul02   0:00 [migration/1]

root         6  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ksoftirqd/1]

root         7  0.0  0.0      0     0 ?        S<   Jul02   0:07 [events/0]

root         8  0.0  0.0      0     0 ?        S<   Jul02   0:08 [events/1]

root         9  0.0  0.0      0     0 ?        S<   Jul02   0:00 [khelper]

root       116  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kblockd/0]

root       117  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kblockd/1]

root       118  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kacpid]

root       119  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kacpi_notify]

root       210  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ata/0]

root       211  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ata/1]

root       212  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ata_aux]

root       213  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ksuspend_usbd]

root       218  0.0  0.0      0     0 ?        S<   Jul02   0:00 [khubd]

root       221  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kseriod]

root       281  0.0  0.0      0     0 ?        S    Jul02   0:01 [pdflush]

root       282  0.0  0.0      0     0 ?        S    Jul02   0:02 [pdflush]

root       283  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kswapd0]

root       284  0.0  0.0      0     0 ?        S<   Jul02   0:00 [aio/0]

root       285  0.0  0.0      0     0 ?        S<   Jul02   0:00 [aio/1]

root       286  0.0  0.0      0     0 ?        S<   Jul02   0:00 [nfsiod]

root       287  0.0  0.0      0     0 ?        S<   Jul02   0:00 [cifsoplockd]

root       288  0.0  0.0      0     0 ?        S<   Jul02   0:00 [cifsdnotifyd]

root       290  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfs_mru_cache]

root       291  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfslogd/0]

root       292  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfslogd/1]

root       293  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfsdatad/0]

root       294  0.0  0.0      0     0 ?        S<   Jul02   0:01 [xfsdatad/1]

root      1013  0.0  0.0      0     0 ?        S<   Jul02   0:00 [scsi_eh_0]

root      1015  0.0  0.0      0     0 ?        S<   Jul02   0:00 [scsi_eh_1]

root      1046  0.0  0.0      0     0 ?        S<   Jul02   0:00 [exec-osm/0]

root      1047  0.0  0.0      0     0 ?        S<   Jul02   0:00 [exec-osm/1]

root      1095  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kstriped]

root      1097  0.0  0.0      0     0 ?        S<   Jul02   0:00 [ksnapd]

root      1098  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kondemand/0]

root      1099  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kondemand/1]

root      1104  0.0  0.0      0     0 ?        S<   Jul02   0:00 [rpciod/0]

root      1105  0.0  0.0      0     0 ?        S<   Jul02   0:00 [rpciod/1]

root      1116  0.0  0.0      0     0 ?        S<   Jul02   0:43 [md6_raid1]

root      1122  0.0  0.0      0     0 ?        S<   Jul02   0:00 [md5_raid1]

root      1128  0.0  0.0      0     0 ?        S<   Jul02   0:11 [md1_raid1]

root      1130  0.0  0.0      0     0 ?        S<   Jul02   0:02 [kjournald]

root      1164  0.0  0.0      0     0 ?        S<   Jul02   0:00 [kauditd]

root      1266  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfsbufd]

root      1267  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfsaild]

root      1268  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfssyncd]

root      1269  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfsbufd]

root      1270  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfsaild]

root      1271  0.0  0.0      0     0 ?        S<   Jul02   0:00 [xfssyncd]

root      1606  0.0  0.0   6728   916 ?        Ss   Jul02   0:01 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0

root      1647  0.0  0.0   5896   600 ?        Ss   Jul02   0:12 syslogd -m 0

root      1650  0.0  0.0   3792   436 ?        Ss   Jul02   0:00 klogd -x

dbus      1674  0.0  0.0  21248   868 ?        Ss   Jul02   0:00 dbus-daemon --system

500       1713  0.0  0.3  60084  3248 ?        S    Jul02   0:01 /usr/sbin/sw-cp-serverd -f /etc/sw-cp-server/config

root      1725  0.0  0.1  60592  1224 ?        Ss   Jul02   0:10 /usr/sbin/sshd

root      1736  0.0  0.0  21628   892 ?        Ss   Jul02   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid

root      1751  0.0  0.0  40852   916 ?        S    Jul02   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd -maxprocs=40 -maxperip=4 -pid=/var/run/imapd.pid -nodnslookup -no

root      1753  0.0  0.1  33548  1424 ?        S    Jul02   0:00 /usr/sbin/courierlogger imapd

root      1761  0.0  0.0  40852   920 ?        S    Jul02   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd-ssl -maxprocs=40 -maxperip=4 -pid=/var/run/imapd-ssl.pid -nodnslo

root      1763  0.0  0.1  33548  1424 ?        S    Jul02   0:00 /usr/sbin/courierlogger imapd-ssl

root      1769  0.0  0.0  40852   916 ?        S    Jul02   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d -maxprocs=40 -maxperip=4 -pid=/var/run/pop3d.pid -nodnslookup -no

root      1771  0.0  0.1  33548  1424 ?        S    Jul02   0:00 /usr/sbin/courierlogger pop3d

root      1778  0.0  0.0  40852   916 ?        S    Jul02   0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d-ssl -maxprocs=40 -maxperip=4 -pid=/var/run/pop3d-ssl.pid -nodnslo

root      1780  0.0  0.1  33548  1420 ?        S    Jul02   0:00 /usr/sbin/courierlogger pop3d-ssl

qmails    1792  0.0  0.0   3836   536 ?        S    Jul02   0:00 qmail-send

qmaill    1794  0.0  0.0   3784   536 ?        S    Jul02   0:00 splogger qmail

root      1795  0.0  0.0   3824   432 ?        S    Jul02   0:00 qmail-lspawn | /usr/bin/deliverquota ./Maildir

qmailr    1796  0.0  0.0   3824   452 ?        S    Jul02   0:00 qmail-rspawn

qmailq    1797  0.0  0.0   3780   408 ?        S    Jul02   0:00 qmail-clean

named     1847  0.0  0.3  90052  3444 ?        Ssl  Jul02   0:01 /usr/sbin/named -u named -c /etc/named.conf -u named -t /var/named/run-root

root      1883  0.0  0.1  65880  1348 ?        S    Jul02   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid

mysql     1940  0.0  3.5 241716 34848 ?        Sl   Jul02   2:16 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock

postgres  2003  0.0  0.4 120464  4076 ?        S    Jul02   0:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data

postgres  2018  0.0  0.1 109640  1036 ?        S    Jul02   0:02 postgres: logger process

postgres  2020  0.0  0.1 120464  1244 ?        S    Jul02   0:10 postgres: writer process

postgres  2021  0.0  0.0 110644   952 ?        S    Jul02   0:00 postgres: stats buffer process

postgres  2022  0.0  0.1 109776  1148 ?        S    Jul02   0:00 postgres: stats collector process

root      2024  0.0  4.6 159616 46292 ?        Ss   Jul02   0:40 /usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 5 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.

popuser   2025  0.0  4.5 159616 44840 ?        S    Jul02   0:00 spamd child

popuser   2026  0.0  4.5 159616 44760 ?        S    Jul02   0:00 spamd child

root      2190  0.0  0.1  74780  1132 ?        Ss   Jul02   0:00 crond

avahi     2201  0.0  0.1  23236  1432 ?        Ss   Jul02   0:03 avahi-daemon: running [s15345671.local]

avahi     2202  0.0  0.0  23112   472 ?        Ss   Jul02   0:00 avahi-daemon: chroot helper

68        2212  0.0  0.2  29756  2824 ?        Ss   Jul02   0:00 hald

root      2213  0.0  0.1  21656  1168 ?        S    Jul02   0:00 hald-runner

root      2222  0.0  0.0   3776   508 tty1     Ss+  Jul02   0:00 /sbin/mingetty tty1

root      2223  0.0  0.0   3776   512 tty2     Ss+  Jul02   0:00 /sbin/mingetty tty2

root      2224  0.0  0.0   3776   512 tty3     Ss+  Jul02   0:00 /sbin/mingetty tty3

root      2225  0.0  0.0   3776   512 tty4     Ss+  Jul02   0:00 /sbin/mingetty tty4

root      2226  0.0  0.0   3776   512 tty5     Ss+  Jul02   0:00 /sbin/mingetty tty5

root      2227  0.0  0.0   3776   512 tty6     Ss+  Jul02   0:00 /sbin/mingetty tty6

root      2228  0.0  0.0   3788   572 ttyS0    Ss+  Jul02   0:00 /sbin/agetty -L ttyS0 57600 vt100

root      2450  0.0  1.3 351112 13528 ?        Ss   Jul02   0:03 /usr/sbin/httpd -k start

apache    2451  0.0  0.4 274188  4348 ?        S    Jul02   0:02 /usr/sbin/httpd -k start

apache    2452  0.0  3.7 376792 37080 ?        S    Jul02   1:39 /usr/sbin/httpd -k start

apache    2453  0.0  2.4 368436 24164 ?        S    Jul02   0:02 /usr/sbin/httpd -k start

apache    2454  0.0  3.3 373528 32772 ?        S    Jul02   0:03 /usr/sbin/httpd -k start

apache    2455  0.0  2.4 368528 23808 ?        S    Jul02   2:02 /usr/sbin/httpd -k start

apache    2456  0.0  2.3 368060 23404 ?        S    Jul02   0:02 /usr/sbin/httpd -k start

apache    2457  0.0  2.4 368092 23916 ?        S    Jul02   0:01 /usr/sbin/httpd -k start

apache    2458  0.0  2.4 368404 23928 ?        S    Jul02   0:02 /usr/sbin/httpd -k start

apache    2459  0.0  2.3 368076 23380 ?        S    Jul02   0:01 /usr/sbin/httpd -k start

root     22561  0.0  0.3  98688  3700 ?        Ss   14:35   0:00 sshd: root@pts/0

root     22563  0.0  0.1  66016  1600 pts/0    Ss   14:36   0:00 -bash

10001    22971  0.0  0.3  78380  3712 ?        Ss   15:30   0:00 proftpd: lwf_sc_net - 90.152.37.6: IDLE

root     22972  0.0  0.0  65576   980 pts/0    R+   15:32   0:00 ps auuwx

apache   23664  0.0  2.4 368260 24200 ?        S    Jul03   0:02 /usr/sbin/httpd -k start

apache   23728  0.0  2.4 368048 24008 ?        S    Jul03   0:01 /usr/sbin/httpd -k start

apache   23784  0.0  2.3 368036 23780 ?        S    Jul03   0:01 /usr/sbin/httpd -k start

[root@s15345671 ~]#

Open in new window

0
 

Author Comment

by:lwfuk
Comment Utility
Dear DontDig

I'm not using KDE or GNOME. Just the shell.

Not to my knowledge anyway.

0
 

Author Comment

by:lwfuk
Comment Utility
Dear Fosiul01

Here is the

# ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr
# ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr

4.6 1 /usr/bin/spamd

4.5 2 spamd

3.7 1 /usr/sbin/httpd

3.5 1 /usr/libexec/mysqld

3.3 1 /usr/sbin/httpd

2.4 6 /usr/sbin/httpd

2.3 3 /usr/sbin/httpd

1.3 1 /usr/sbin/httpd

0.4 1 /usr/sbin/httpd

0.4 1 /usr/bin/postmaster

0.3 1 /usr/sbin/sw-cp-serverd

0.3 1 /usr/sbin/named

0.3 1 sshd:

0.2 1 hald

0.1 4 /usr/sbin/courierlogger

0.1 3 postgres:

0.1 1 /usr/sbin/sshd

0.1 1 hald-runner

0.1 1 crond

0.1 1 /bin/sh

0.1 1 -bash

0.1 1 avahi-daemon:

%MEM 1 COMMAND

0.0 6 /sbin/mingetty

0.0 4 /usr/lib/courier-imap/couriertcpd

0.0 2 [xfssyncd]

0.0 2 [xfsbufd]

0.0 2 [xfsaild]

0.0 2 sort

0.0 2 [pdflush]

0.0 2 awk

0.0 1 xinetd

0.0 1 [xfs_mru_cache]

0.0 1 [xfslogd/1]

0.0 1 [xfslogd/0]

0.0 1 [xfsdatad/1]

0.0 1 [xfsdatad/0]

0.0 1 uniq

0.0 1 syslogd

0.0 1 splogger

0.0 1 [scsi_eh_1]

0.0 1 [scsi_eh_0]

0.0 1 /sbin/dhclient

0.0 1 /sbin/agetty

0.0 1 [rpciod/1]

0.0 1 [rpciod/0]

0.0 1 qmail-send

0.0 1 qmail-rspawn

0.0 1 qmail-lspawn

0.0 1 qmail-clean

0.0 1 ps

0.0 1 postgres:

0.0 1 [nfsiod]

0.0 1 [migration/1]

0.0 1 [migration/0]

0.0 1 [md6_raid1]

0.0 1 [md5_raid1]

0.0 1 [md1_raid1]

0.0 1 [kthreadd]

0.0 1 [kswapd0]

0.0 1 [ksuspend_usbd]

0.0 1 [kstriped]

0.0 1 [ksoftirqd/1]

0.0 1 [ksoftirqd/0]

0.0 1 [ksnapd]

0.0 1 [kseriod]

0.0 1 [kondemand/1]

0.0 1 [kondemand/0]

0.0 1 klogd

0.0 1 [kjournald]

0.0 1 [khubd]

0.0 1 [khelper]

0.0 1 [kblockd/1]

0.0 1 [kblockd/0]

0.0 1 [kauditd]

0.0 1 [kacpi_notify]

0.0 1 [kacpid]

0.0 1 init

0.0 1 [exec-osm/1]

0.0 1 [exec-osm/0]

0.0 1 [events/1]

0.0 1 [events/0]

0.0 1 dbus-daemon

0.0 1 [cifsoplockd]

0.0 1 [cifsdnotifyd]

0.0 1 avahi-daemon:

0.0 1 [ata_aux]

0.0 1 [ata/1]

0.0 1 [ata/0]

0.0 1 [aio/1]

0.0 1 [aio/0]

Open in new window

0
 

Author Comment

by:lwfuk
Comment Utility
Dear Fosiul01

Here is the sorted top command.

Up until a few days ago my server never used more than 300,000k. This was the case for the last 2 months but now for some reason it's started using nearly all of it.

Kind Regards,

Adrian
top - 15:41:46 up 3 days, 20:01,  1 user,  load average: 0.00, 0.00, 0.00

Tasks: 112 total,   1 running, 111 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.0%us,  0.0%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.2%hi,  0.0%si,  0.0%st

Mem:    991980k total,   897868k used,    94112k free,    11624k buffers

Swap:  3919840k total,       52k used,  3919788k free,   545396k cached
 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

 2024 root      20   0  155m  45m 2416 S    0  4.7   0:40.14 spamd

 2025 popuser   20   0  155m  43m  964 S    0  4.5   0:00.18 spamd

 2026 popuser   20   0  155m  43m  884 S    0  4.5   0:00.26 spamd

 2452 apache    20   0  367m  36m 4860 S    0  3.7   1:39.94 httpd

 1940 mysql     20   0  236m  34m 5740 S    0  3.5   2:16.81 mysqld

 2454 apache    20   0  364m  32m 5236 S    0  3.3   0:03.30 httpd

23664 apache    20   0  359m  23m 4844 S    0  2.4   0:02.22 httpd

 2453 apache    20   0  359m  23m 4836 S    0  2.4   0:02.33 httpd

23728 apache    20   0  359m  23m 4644 S    0  2.4   0:01.90 httpd

 2458 apache    20   0  359m  23m 4848 S    0  2.4   0:02.73 httpd

 2457 apache    20   0  359m  23m 4656 S    0  2.4   0:01.63 httpd

 2455 apache    20   0  359m  23m 4796 S    0  2.4   2:02.09 httpd

23784 apache    20   0  359m  23m 4564 S    0  2.4   0:01.21 httpd

 2456 apache    20   0  359m  22m 4680 S    0  2.4   0:02.06 httpd

 2459 apache    20   0  359m  22m 4640 S    0  2.4   0:01.34 httpd

 2450 root      20   0  342m  13m 7336 S    0  1.4   0:03.33 httpd

 2451 apache    20   0  267m 4348  448 S    0  0.4   0:02.43 httpd

 2003 postgres  20   0  117m 4076 3416 S    0  0.4   0:00.50 postmaster

22561 root      20   0 98688 3712 2836 S    0  0.4   0:00.14 sshd

 1847 named     20   0 90052 3444 1844 S    0  0.3   0:01.24 named

 1713 sw-cp-se  20   0 60084 3248 1356 S    0  0.3   0:01.30 sw-cp-serverd

 2212 haldaemo  20   0 29756 2824 1508 S    0  0.3   0:00.01 hald

22563 root      20   0 66016 1604 1248 S    0  0.2   0:00.03 bash

 2201 avahi     20   0 23236 1432 1176 S    0  0.1   0:03.23 avahi-daemon

 1753 root      20   0 33548 1424 1088 S    0  0.1   0:00.00 courierlogger

 1763 root      20   0 33548 1424 1088 S    0  0.1   0:00.00 courierlogger

 1771 root      20   0 33548 1424 1088 S    0  0.1   0:00.00 courierlogger

 1780 root      20   0 33548 1420 1088 S    0  0.1   0:00.00 courierlogger

 1883 root      20   0 65880 1348 1124 S    0  0.1   0:00.01 mysqld_safe

22990 root      20   0 12724 1268  928 R    0  0.1   0:00.04 top

 2020 postgres  20   0  117m 1244  580 S    0  0.1   0:10.18 postmaster

 1725 root      20   0 60592 1224  676 S    0  0.1   0:10.58 sshd

 2213 root      20   0 21656 1168  980 S    0  0.1   0:00.00 hald-runner

 2022 postgres  20   0  107m 1148  356 S    0  0.1   0:00.00 postmaster

 2190 root      20   0 74780 1132  560 S    0  0.1   0:00.68 crond

 2018 postgres  20   0  107m 1036  372 S    0  0.1   0:02.68 postmaster

 2021 postgres  20   0  108m  952  288 S    0  0.1   0:00.26 postmaster

 1761 root      20   0 40852  920  540 S    0  0.1   0:00.00 couriertcpd

 1606 root      20   0  6728  916  400 S    0  0.1   0:01.65 dhclient

 1751 root      20   0 40852  916  540 S    0  0.1   0:00.00 couriertcpd

 1769 root      20   0 40852  916  540 S    0  0.1   0:00.00 couriertcpd

 1778 root      20   0 40852  916  540 S    0  0.1   0:00.00 couriertcpd

 1736 root      20   0 21628  892  680 S    0  0.1   0:00.09 xinetd

 1674 dbus      20   0 21248  868  656 S    0  0.1   0:00.00 dbus-daemon

    1 root      20   0 10336  760  632 S    0  0.1   0:07.18 init

 1647 root      20   0  5896  600  476 S    0  0.1   0:12.32 syslogd

 2228 root      20   0  3788  572  480 S    0  0.1   0:00.00 agetty

 1792 qmails    20   0  3836  536  428 S    0  0.1   0:00.18 qmail-send

 1794 qmaill    20   0  3784  536  444 S    0  0.1   0:00.00 splogger

 2223 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2224 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2225 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2226 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2227 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2222 root      20   0  3776  508  424 S    0  0.1   0:00.00 mingetty

 2202 avahi     20   0 23112  472  284 S    0  0.0   0:00.00 avahi-daemon

 1796 qmailr    20   0  3824  452  332 S    0  0.0   0:00.00 qmail-rspawn

 1650 root      20   0  3792  436  344 S    0  0.0   0:00.01 klogd

 1795 root      20   0  3824  432  312 S    0  0.0   0:00.00 qmail-lspawn

 1797 qmailq    20   0  3780  408  324 S    0  0.0   0:00.00 qmail-clean

    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd

    3 root      RT  -5     0    0    0 S    0  0.0   0:00.13 migration/0

    4 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0

    5 root      RT  -5     0    0    0 S    0  0.0   0:00.01 migration/1

Open in new window

0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
is this your vps server or a server in your network ??

have you tryed to restart the server ?? after restarting take a note of memory uses, then see how its increase and where its giving the monery by using  ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr  ??

0
 

Author Comment

by:lwfuk
Comment Utility
Hi Fosiul01

It's a fully dedicated server running centos 5.2 + plesk.

I'll reboot now and let you know what happens.

Many Thanks,

Adrian
0
 

Author Comment

by:lwfuk
Comment Utility
Hi Fosiul01

After the reboot the memory usage has dropped right down.

Here is the sorted top.
top - 16:41:50 up 6 min,  1 user,  load average: 0.17, 0.18, 0.09

Tasks: 110 total,   1 running, 109 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:    991980k total,   220300k used,   771680k free,     1304k buffers

Swap:  3919840k total,        0k used,  3919840k free,    77376k cached
 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

 2024 root      20   0  155m  45m 2416 S    0  4.7   0:01.03 spamd

 2025 popuser   20   0  155m  43m  964 S    0  4.5   0:00.00 spamd

 2026 popuser   20   0  155m  43m  884 S    0  4.5   0:00.00 spamd

 1940 mysql     20   0  168m  25m 5200 S    0  2.6   0:00.17 mysqld

 2090 root      20   0  288m  13m 7276 S    0  1.4   0:00.13 httpd

 2144 apache    20   0  345m  12m 3812 S    0  1.3   0:00.07 httpd

 2145 apache    20   0  345m  12m 3700 S    0  1.3   0:00.07 httpd

 2140 apache    20   0  344m  11m 3608 S    0  1.2   0:00.04 httpd

 2141 apache    20   0  289m 8388 2032 S    0  0.8   0:00.00 httpd

 2142 apache    20   0  289m 8388 2032 S    0  0.8   0:00.00 httpd

 2143 apache    20   0  289m 8388 2032 S    0  0.8   0:00.00 httpd

 2146 apache    20   0  289m 8236 1908 S    0  0.8   0:00.00 httpd

 2147 apache    20   0  289m 8236 1908 S    0  0.8   0:00.00 httpd

 2095 apache    20   0  213m 4348  448 S    0  0.4   0:00.00 httpd

 2003 postgres  20   0  117m 4076 3416 S    0  0.4   0:00.41 postmaster

 2271 root      20   0 98688 3708 2832 S    0  0.4   0:00.02 sshd

 2265 lwf_sc_n  20   0 78460 3672 2564 S    0  0.4   0:00.02 in.proftpd

 1847 named     20   0 90052 3436 1840 S    0  0.3   0:00.00 named

 2212 haldaemo  20   0 29756 2820 1508 S    0  0.3   0:00.01 hald

 2273 root      20   0 66016 1588 1236 S    0  0.2   0:00.02 bash

 2201 avahi     20   0 23236 1432 1172 S    0  0.1   0:00.02 avahi-daemon

 1763 root      20   0 33548 1424 1088 S    0  0.1   0:00.00 courierlogger

 1771 root      20   0 33548 1424 1088 S    0  0.1   0:00.00 courierlogger

 1753 root      20   0 33548 1420 1088 S    0  0.1   0:00.00 courierlogger

 1780 root      20   0 33548 1420 1088 S    0  0.1   0:00.00 courierlogger

 1883 root      20   0 65880 1348 1124 S    0  0.1   0:00.01 mysqld_safe

 2292 root      20   0 12728 1268  928 R    0  0.1   0:00.06 top

 2020 postgres  20   0  117m 1244  580 S    0  0.1   0:00.00 postmaster

 1725 root      20   0 60592 1228  676 S    0  0.1   0:00.00 sshd

 2213 root      20   0 21656 1168  980 S    0  0.1   0:00.00 hald-runner

 1713 sw-cp-se  20   0 58760 1152  532 S    0  0.1   0:00.00 sw-cp-serverd

 2022 postgres  20   0  107m 1148  356 S    0  0.1   0:00.00 postmaster

 2190 root      20   0 74780 1136  560 S    0  0.1   0:00.00 crond

 2018 postgres  20   0  107m  964  300 S    0  0.1   0:00.00 postmaster

 2021 postgres  20   0  108m  952  288 S    0  0.1   0:00.00 postmaster

 1761 root      20   0 40852  920  540 S    0  0.1   0:00.00 couriertcpd

 1751 root      20   0 40852  912  540 S    0  0.1   0:00.00 couriertcpd

 1769 root      20   0 40852  912  540 S    0  0.1   0:00.00 couriertcpd

 1778 root      20   0 40852  912  540 S    0  0.1   0:00.00 couriertcpd

 1736 root      20   0 21628  892  676 S    0  0.1   0:00.00 xinetd

 1674 dbus      20   0 21248  872  656 S    0  0.1   0:00.00 dbus-daemon

    1 root      20   0 10336  760  632 S    0  0.1   0:04.88 init

 1606 root      20   0  6728  740  228 S    0  0.1   0:00.00 dhclient

 1647 root      20   0  5896  596  476 S    0  0.1   0:00.04 syslogd

 2228 root      20   0  3788  568  480 S    0  0.1   0:00.00 agetty

 1794 qmaill    20   0  3784  532  444 S    0  0.1   0:00.00 splogger

 2222 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2224 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2226 root      20   0  3776  512  424 S    0  0.1   0:00.00 mingetty

 2223 root      20   0  3776  508  424 S    0  0.1   0:00.00 mingetty

 2225 root      20   0  3776  508  424 S    0  0.1   0:00.00 mingetty

 2227 root      20   0  3776  508  424 S    0  0.1   0:00.00 mingetty

 2202 avahi     20   0 23112  468  284 S    0  0.0   0:00.00 avahi-daemon

 1792 qmails    20   0  3836  444  348 S    0  0.0   0:00.00 qmail-send

 1650 root      20   0  3792  432  344 S    0  0.0   0:00.01 klogd

 1796 qmailr    20   0  3824  432  312 S    0  0.0   0:00.00 qmail-rspawn

 1795 root      20   0  3824  428  312 S    0  0.0   0:00.00 qmail-lspawn

 1797 qmailq    20   0  3780  400  320 S    0  0.0   0:00.00 qmail-clean

    2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd

    3 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/0

    4 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/0

    5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 migration/1

    6 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksoftirqd/1

    7 root      15  -5     0    0    0 S    0  0.0   0:00.00 events/0

Open in new window

0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
ok can you install htop

yum install htop

then run htop

see what its showing
0
 

Author Comment

by:lwfuk
Comment Utility
Hi Fosiul01

Here is the

# ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr

Did you want me to include the "??" - It threw an error.

What is the 2nd column? I'm guessing that the first is the memory and the 3rd is the process.

Cheers,

Adrian
# ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr

4.6 1 /usr/bin/spamd

4.5 2 spamd

2.5 1 /usr/libexec/mysqld

1.3 1 /usr/sbin/httpd

1.2 2 /usr/sbin/httpd

1.1 1 /usr/sbin/httpd

0.8 5 /usr/sbin/httpd

0.4 1 /usr/sbin/httpd

0.4 1 /usr/bin/postmaster

0.3 1 /usr/sbin/named

0.3 1 sshd:

0.3 1 proftpd:

0.2 1 hald

0.1 4 /usr/sbin/courierlogger

0.1 2 postgres:

0.1 1 /usr/sbin/sw-cp-serverd

0.1 1 /usr/sbin/sshd

0.1 1 hald-runner

0.1 1 crond

0.1 1 /bin/sh

0.1 1 -bash

0.1 1 avahi-daemon:

%MEM 1 COMMAND

0.0 6 /sbin/mingetty

0.0 4 /usr/lib/courier-imap/couriertcpd

0.0 2 [xfssyncd]

0.0 2 [xfsbufd]

0.0 2 [xfsaild]

0.0 2 sort

0.0 2 postgres:

0.0 2 [pdflush]

0.0 2 awk

0.0 1 xinetd

0.0 1 [xfs_mru_cache]

0.0 1 [xfslogd/1]

0.0 1 [xfslogd/0]

0.0 1 [xfsdatad/1]

0.0 1 [xfsdatad/0]

0.0 1 uniq

0.0 1 syslogd

0.0 1 splogger

0.0 1 [scsi_eh_1]

0.0 1 [scsi_eh_0]

0.0 1 /sbin/dhclient

0.0 1 /sbin/agetty

0.0 1 [rpciod/1]

0.0 1 [rpciod/0]

0.0 1 qmail-send

0.0 1 qmail-rspawn

0.0 1 qmail-lspawn

0.0 1 qmail-clean

0.0 1 ps

0.0 1 [nfsiod]

0.0 1 [migration/1]

0.0 1 [migration/0]

0.0 1 [md6_raid1]

0.0 1 [md5_raid1]

0.0 1 [md1_raid1]

0.0 1 [kthreadd]

0.0 1 [kswapd0]

0.0 1 [ksuspend_usbd]

0.0 1 [kstriped]

0.0 1 [ksoftirqd/1]

0.0 1 [ksoftirqd/0]

0.0 1 [ksnapd]

0.0 1 [kseriod]

0.0 1 [kondemand/1]

0.0 1 [kondemand/0]

0.0 1 klogd

0.0 1 [kjournald]

0.0 1 [khubd]

0.0 1 [khelper]

0.0 1 [kblockd/1]

0.0 1 [kblockd/0]

0.0 1 [kauditd]

0.0 1 [kacpi_notify]

0.0 1 [kacpid]

0.0 1 init

0.0 1 [exec-osm/1]

0.0 1 [exec-osm/0]

0.0 1 [events/1]

0.0 1 [events/0]

0.0 1 dbus-daemon

0.0 1 [cifsoplockd]

0.0 1 [cifsdnotifyd]

0.0 1 avahi-daemon:

0.0 1 [ata_aux]

0.0 1 [ata/1]

0.0 1 [ata/0]

0.0 1 [aio/1]

0.0 1 [aio/0]

[root@s15345671 ~]#

Open in new window

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
What is the 2nd column? I'm guessing that the first is the memory and the 3rd is the process. ::

if you look this one( line 8)

0.8 5 /usr/sbin/httpd


its saying

5 httpd is running each consuming 0.8 memory each so total :  5*0.8 = 4Mb
0
 

Author Comment

by:lwfuk
Comment Utility
I've done it but I can't cut and paste the text.

Do you know how?
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
which one ?? htop ?? , just take a screen shot
0
 

Author Comment

by:lwfuk
Comment Utility
It's a bit of a monster.
Untitled-1.gif
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
do you have 1 GB or 9Gb memory ??
0
 
LVL 29

Assisted Solution

by:Michael W
Michael W earned 200 total points
Comment Utility
Just from first observation, I can see two possible issues...

Your SpamAssassin processes (spamd) are running at 4.6% memory allocation.
Your MySQL Server instance (mysqld) is running at 2.5% to 3.5% memory allocation.

Named (DNS) and Postgres database is also running.

*Issues*

SpamAssassin is both CPU and memory intensive. If you have an external facing mail server and the server is currently handling a number of inbound e-mails, each and every e-mail will be passed through the qmail/spamd processes before getting filtered off to the user's mailboxes.

MySQL is a memory-intensive database application environment. The more memory you have allocated to the server, the more memory MySQL will try to consume. If you do not have your MySQL configuration (my.cnf) configured correctly, thus can cause serious cpu and memory issues upon the server as well.

PostgresSQL is also another memory-intensive database application environment.

Named (BIND/DNS) is primarily CPU intensive, but has been known to have memory leaks as well.


*Questions*

For the SpamAssassin:
- Is this server acting as a POP3/IMAP server handling inbound and outbound e-mail needs?

For the MySQL Server instance:
- Are you running PHP-based sites that require the MySQL database (i.e. Joomla, Drupal, Wordpress, etc)?
- Are you databases running strictly MyISAM databases or InnoDB as well?
- Would it be possible to get a copy of your /etc/my.cnf posted here so that it could be memory tuned?

For the PostgresSQL instance:
- Are you running the PostgresSQL database instance on purpose?

For the Named/BIND:
- Are you running the Named (BIND/DNS Server) instance on purpose?

0
 

Author Comment

by:lwfuk
Comment Utility
Dear fosiul01:

I have 1 GB memory.
0
 

Author Comment

by:lwfuk
Comment Utility
Dear mwecomputers:

Infact I don't actually use the server for mail at all and so that's one obvious saving. Nor do I use PostgresSQL and so that's another. I have an application that uses MySQL and so I'm happy with the resources it consumes. I don't know what Named (BIND/DNS) is actually. As far as I know all of my dns stuff is done externally to my server. Is it something that Plesk would use?

Many Thanks,

Adrian
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
you, i am not seeing anythign wrong.. its just showing whats its getting

but its spamd and httpd
spamd and httpd is taking

if you look at top command

2024 root      20   0  155m  45m 2416 S    0  4.7   0:01.03 spamd
 2025 popuser   20   0  155m  43m  964 S    0  4.5   0:00.00 spamd
 2026 popuser   20   0  155m  43m  884 S    0  4.5   0:00.00 spamd


now if you do

pmap 2024
pmap 2025
pmap 2026

it wil show you Exactly how much memory each process is getting
now if you do pmap for each httpd, it will show you how much memory each process is getting ..
0
 
LVL 29

Accepted Solution

by:
fosiul01 earned 300 total points
Comment Utility
if you dont use smpd or any mail server then why dont you stop the service for spamd
0
 

Author Comment

by:lwfuk
Comment Utility
Gentlemen

I won't take any more of your time in this question. I am very grateful to you for your expert help. I was worried that there was some kind of dodgy software running.  I'll fiddle about with plesk and see if I can disable the services I'm not using. I think I might have switched them on by accident. If I can't switch the services off in plesk then I'll post another question asking for help on how to kill them.

Many Thanks,

Adrian Smith
0
 
LVL 29

Expert Comment

by:Michael W
Comment Utility
Plesk enables alot of things on by default. It should be safe to shutdown/disable those applications if you are not using them.

As an added precaution via shell, I recommend doing a 'chkconfig <servicename> off' to make sure those applications don't try to restart after a server reboot, etc.
0
 

Author Comment

by:lwfuk
Comment Utility
In case anybody ever comes across this post and wants to know how I solved the problem.

1. Login to plesk
2. Find the services tab
3. Switch off the unused services.
Untitled-2.png
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now