[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Who is eating my memory?



Howdy!

I guess this is sort of newbie question. Sorry for that. ;)

I'm running several identical OpenBSD boxes, and one of them has a
problem with "disappearing" memory. The box has 256 megabytes of RAM,
and it's acting as a simple firewall running Squid and Snort, and also
providing WINS service for the LAN.

I hope I'm not making a complete fool of myself, but it seems to me that
all available memory is eaten by some process, and I can't find that
process from top or ps output.

Here's what I get after the box has been up for couple of hours:

# top -S

load averages:  0.22,  0.54,  1.16                                                                                       13:12:50
38 processes:  1 running, 37 idle
CPU states:     % user,     % nice,     % system,     % interrupt,     % idle
Memory: Real: 12M/246M act/tot  Free: 964K  Swap: 40M/502M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATE WAIT     TIME    CPU COMMAND
 8954 root       2    0   18M 2704K sleep poll     0:14  0.00% squid
    2 root     -18    0    0K   15M idle  pgdaem   0:06  0.00% pagedaemon
 7625 named      2    0 1468K 1128K sleep select   0:03  0.00% named
17994 root       2    0  400K  500K sleep select   0:01  0.00% sshd
12092 root       2    0 1628K   84K sleep select   0:01  0.00% httpd
31071 mysql      2    0   11M  128K sleep poll     0:01  0.00% mysqld
19242 www       -4    0 6408K    4K idle  semwai   0:01  0.00% httpd
29413 root       4    0  328K   76K sleep bpf      0:00  0.00% pflogd
    5 root      18    0    0K   15M sleep syncer   0:00  0.00% update
27627 root       4    0 8580K 4908K sleep bpf      0:00  0.00% snort
    6 root     -18    0    0K   15M idle  aiodon   0:00  0.00% aiodoned
14245 www       -4    0 6300K    4K idle  semwai   0:00  0.00% httpd
 2205 www       -4    0 6052K    4K idle  semwai   0:00  0.00% httpd
12051 root       2    0   92K  144K sleep select   0:00  0.00% syslogd
    3 root     -18    0    0K   15M sleep reaper   0:00  0.00% reaper
23684 root       2    0  356K    4K idle  select   0:00  0.00% sshd
22435 root       2    0  232K  136K idle  select   0:00  0.00% cron
 6930 root      10    0  908K  428K sleep wait     0:00  0.00% bash
19325 root       2    0  228K   84K idle  poll     0:00  0.00% dhcpd
    0 root     -18    0    0K   15M sleep schedu   0:00  0.00% swapper
25183 www       -4    0 1744K    4K idle  semwai   0:00  0.00% httpd
    1 root      10    0  336K   72K idle  wait     0:00  0.00% init
32690 root      10    0  852K 1408K sleep nanosl   0:00  0.00% perl
20957 squid     -6    0   24K    4K idle  piperd   0:00  0.00% unlinkd
28392 root      18    0  388K    4K idle  pause    0:00  0.00% sh
    7 root      14    0    0K   15M idle  crypto   0:00  0.00% crypto
    4 root     -13    0    0K   15M idle  cleane   0:00  0.00% cleaner
16003 www       -4    0 1628K    4K idle  semwai   0:00  0.00% httpd
 1583 www        2    0 1628K    4K idle  select   0:00  0.00% httpd
10267 root       3    0   48K    4K idle  ttyin    0:00  0.00% getty
28698 root       3    0   48K    4K idle  ttyin    0:00  0.00% getty
   66 root       3    0   48K    4K idle  ttyin    0:00  0.00% getty
 3776 root       3    0   44K    4K idle  ttyin    0:00  0.00% getty
30796 root       3    0   48K    4K idle  ttyin    0:00  0.00% getty
13228 root       2    0 1888K    4K idle  select   0:00  0.00% smbd
13845 www       -4    0 1628K    4K idle  semwai   0:00  0.00% httpd
27914 root      10    0 1700K    4K idle  wait     0:00  0.00% squid
22901 root      28    0  144K  652K run   -        0:00  0.00% top

# ps -aux
USER       PID %CPU %MEM   VSZ   RSS TT   STAT STARTED       TIME COMMAND
root       712  0.0  0.0   908     4 p0  R+     1:08PM    0:00.00 -bash (bash)
root     12051  0.0  0.0    92   176 ??  Ss     8:03AM    0:00.24 syslogd -a /var/named/dev/log
root     29413  0.0  0.0   328    76 ??  Ss     8:03AM    0:01.00 pflogd
named     7625  0.0  0.0  1468  1520 ??  Ss     8:03AM    0:03.38 named -t /var/named -u named
root     19325  0.0  0.0   228     4 ??  Is     8:04AM    0:00.06 /usr/sbin/dhcpd -q fxp1
root     12092  0.0  0.0  1628    84 ??  Ss     8:04AM    0:01.48 httpd: parent (httpd)
root     23684  0.0  0.0   356     4 ??  Is     8:04AM    0:00.22 /usr/sbin/sshd
root     27914  0.0  0.0  1700     4 ??  Is     8:04AM    0:00.00 /usr/local/sbin/squid
squid     8954  0.0  0.0 18144  3628 ??  S      8:04AM    0:14.10 (squid) (squid)
squid    20957  0.0  0.0    24   128 ??  Is     8:04AM    0:00.01 (unlinkd) (unlinkd)
root     13228  0.0  0.0  1888     4 ??  Is     8:04AM    0:00.00 /usr/local/libexec/smbd -D -s /etc/samba/smb.conf
root     28392  0.0  0.0   388     4 C0- I      8:04AM    0:00.01 /bin/sh /usr/local/bin/safe_mysqld
mysql    31071  0.0  0.0 11584   788 C0- S      8:04AM    0:01.31 /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/m
root     22435  0.0  0.0   232   148 ??  Is     8:04AM    0:00.20 cron
root     10267  0.0  0.0    48     4 C0  Is+    8:04AM    0:00.00 /usr/libexec/getty Pc ttyC0
root      3776  0.0  0.0    44     4 C1  Is+    8:04AM    0:00.00 /usr/libexec/getty Pc ttyC1
root     30796  0.0  0.0    48     4 C2  Is+    8:04AM    0:00.00 /usr/libexec/getty Pc ttyC2
root        66  0.0  0.0    48     4 C3  Is+    8:04AM    0:00.00 /usr/libexec/getty Pc ttyC3
root     28698  0.0  0.0    48     4 C5  Is+    8:04AM    0:00.00 /usr/libexec/getty Pc ttyC5
www      13845  0.0  0.0  1628     4 ??  I      9:00AM    0:00.00 httpd: child (httpd)
www      19242  0.0  0.0  6408     4 ??  I      9:00AM    0:01.06 httpd: child (httpd)
www      16003  0.0  0.0  1628     4 ??  I      9:00AM    0:00.00 httpd: child (httpd)
www       2205  0.0  0.0  6052     4 ??  I      9:00AM    0:00.24 httpd: child (httpd)
www      25183  0.0  0.0  1744     4 ??  I      9:00AM    0:00.04 httpd: child (httpd)
root     17994  0.0  0.0   400   504 ??  Ss    10:34AM    0:01.45 sshd: root_(_at_)_ttyp0 (sshd)
root      6930  0.0  0.0   908   432 p0  Ss    10:34AM    0:00.14 -bash (bash)
www       1583  0.0  0.0  1628     4 ??  I     12:40PM    0:00.00 httpd: child (httpd)
www      14245  0.0  0.0  6300     4 ??  I     12:41PM    0:00.32 httpd: child (httpd)
root     30878  0.0  0.0   272   168 p0  R+     1:08PM    0:00.00 ps -aux
root         1  0.0  0.0   336    72 ??  Is     8:02AM    0:00.02 /sbin/init

I just can't figure it out: top shows that I have only 964 K of memory
left and 40 megs of swap space is used -- bu no-one seems to be using
it...

Any ideas? Thank in advance, once again. =)

- Jyri



Visit your host, monkey.org