Shaun Wingrin
asked on
CentOS 5.3 running Asterisk low on Ram - How to free up
Say,
Asterisk is restarting with message that out of memmory.
What services and modules can I remove to reduce mem usage. The machine has 750MB of Ram.
A basic asterisk server is needed to simly transfer calls.
How can I see how much mem each service uses?
How can I see whcih modules are actually loaded in Asterisk?
Tx
Asterisk is restarting with message that out of memmory.
What services and modules can I remove to reduce mem usage. The machine has 750MB of Ram.
A basic asterisk server is needed to simly transfer calls.
How can I see how much mem each service uses?
How can I see whcih modules are actually loaded in Asterisk?
Tx
ASKER
[root@Harrow ~]# uptime
15:33:48 up 12 min, 1 user, load average: 3.05, 5.37, 2.96
__________________________
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 385444 380276 5168 0 536 20604
-/+ buffers/cache: 359136 26308
Swap: 786424 533380 253044
__________________________
[root@Harrow ~]# ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:01 init [3]
2 ? S< 0:00 [migration/0]
3 ? SN 0:00 [ksoftirqd/0]
4 ? S< 0:00 [watchdog/0]
5 ? S< 0:00 [events/0]
6 ? S< 0:00 [khelper]
7 ? S< 0:00 [kthread]
10 ? S< 0:00 [kblockd/0]
11 ? S< 0:00 [kacpid]
75 ? S< 0:00 [cqueue/0]
78 ? S< 0:00 [khubd]
80 ? S< 0:00 [kseriod]
142 ? S 0:00 [pdflush]
143 ? S 0:00 [pdflush]
144 ? S< 0:02 [kswapd0]
145 ? S< 0:00 [aio/0]
301 ? S< 0:00 [kpsmoused]
326 ? S< 0:00 [ksnapd]
329 ? S< 0:00 [kjournald]
356 ? S< 0:00 [kauditd]
390 ? S<s 0:00 /sbin/udevd -d
733 ? S< 0:00 [kgameportd]
1177 ? S< 0:00 [kmpathd/0]
1199 ? S< 0:00 [kjournald]
1752 ? S<sl 0:00 auditd
1754 ? S<sl 0:00 /sbin/audispd
1786 ? Ss 0:00 syslogd -m 0
1789 ? Ss 0:00 klogd -x
1823 ? Ss 0:00 portmap
1848 ? Ss 0:00 rpc.statd
1881 ? Ss 0:00 rpc.idmapd
1908 ? Ss 0:00 dbus-daemon --system
2063 ? Ss 0:00 /usr/sbin/acpid
2115 ? Ss 0:00 /usr/sbin/sshd
2131 ? Ss 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
2149 ? SLs 0:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
2166 ? Ss 0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
2201 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/my
2258 ? Sl 0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld
2406 ? Ss 0:00 /usr/lib/cyrus-imapd/cyrus
2429 ? S 0:00 idled
2432 ? S 0:00 imapd
2433 ? S 0:00 imapd -s
2434 ? S 0:00 pop3d
2435 ? S 0:00 pop3d -s
2436 ? S 0:00 lmtpd
2437 ? S 0:00 imapd
2440 ? S 0:00 imapd -s
2441 ? S 0:00 pop3d
2442 ? S 0:00 pop3d -s
2445 ? S 0:00 imapd
2446 ? S 0:00 pop3d
2447 ? S 0:00 imapd
2448 ? S 0:00 pop3d
2482 ? Ss 0:00 /usr/libexec/postfix/maste
2485 ? S 0:00 pickup -l -t fifo -u
2486 ? S 0:00 qmgr -l -t fifo -u
2500 ? S 0:00 imapd
2501 ? S 0:00 imapd
2502 ? S 0:00 imapd
2503 ? S 0:00 pop3d
2504 ? S 0:00 imapd
2505 ? S 0:00 imapd
2506 ? S 0:00 imapd
2507 ? S 0:00 pop3d
2508 ? Ss 0:00 /usr/sbin/httpd
2542 ? S 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
2551 ? Sl 3:15 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
2570 ? Ss 0:00 crond
2586 ? S 0:00 /usr/sbin/httpd
2587 ? S 0:00 /usr/sbin/httpd
2588 ? S 0:00 /usr/sbin/httpd
2589 ? S 0:00 /usr/sbin/httpd
2590 ? S 0:00 /usr/sbin/httpd
2591 ? S 0:00 /usr/sbin/httpd
2592 ? S 0:00 /usr/sbin/httpd
2593 ? S 0:00 /usr/sbin/httpd
2594 ? Ss 0:00 /usr/sbin/atd
2609 ? Ss 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
2611 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
2612 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
2613 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
2614 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
2628 ? Ss 0:01 hald
2629 ? S 0:00 hald-runner
2639 ? S 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
2640 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event0
2719 ? S 0:00 -bash -c cd /var/www/html/panel && /var/www/html/panel/safe_o
2720 ? S 0:00 sh /var/www/html/panel/safe_o
2722 ? S 0:01 /usr/bin/perl /var/www/html/panel/op_ser
3183 ? Ss 0:00 /usr/bin/perl /usr/libexec/webmin/minise
3186 tty1 Ss+ 0:00 /sbin/mingetty tty1
3187 tty2 Ss+ 0:00 /sbin/mingetty tty2
3188 tty3 Ss+ 0:00 /sbin/mingetty tty3
3189 tty4 Ss+ 0:00 /sbin/mingetty tty4
3190 tty5 Ss+ 0:00 /sbin/mingetty tty5
3191 tty6 Ss+ 0:00 /sbin/mingetty tty6
3266 ? Ss 0:00 sshd: root@pts/0
3269 pts/0 Ss 0:00 -bash
3304 pts/0 R+ 0:00 ps ax
_________________________
[root@Harrow ~]# cat /etc/inittab | grep initdefault
# 0 - halt (Do NOT set initdefault to this)
# 6 - reboot (Do NOT set initdefault to this)
id:3:initdefault:
[root@Harrow ~]#
__________________________
During this short time I get a screen dump :
Apr 22 15:31:44 Harrow kernel: asterisk invoked oom-killer: gfp_mask=0x201d2, order=0, oomkilladj=0
Apr 22 15:31:44 Harrow kernel: [<c0458895>] out_of_memory+0x72/0x1a5
Apr 22 15:31:44 Harrow kernel: [<c0459d6a>] __alloc_pages+0x216/0x297
Apr 22 15:31:44 Harrow kernel: [<c0455a0d>] page_cache_read+0x3f/0x98
Apr 22 15:31:44 Harrow kernel: [<c0457ec4>] filemap_nopage+0x1ce/0x312
Apr 22 15:31:44 Harrow kernel: [<c0460c8e>] __handle_mm_fault+0x178/0x
Apr 22 15:31:44 Harrow kernel: [<c0609997>] rwsem_down_read_failed+0x1
Apr 22 15:31:44 Harrow kernel: [<c041f9a7>] __activate_task+0x1c/0x29
Apr 22 15:31:44 Harrow kernel: [<c060acb3>] do_page_fault+0x20a/0x4b8
Apr 22 15:31:44 Harrow kernel: [<c060aaa9>] do_page_fault+0x0/0x4b8
Apr 22 15:31:44 Harrow kernel: [<c0405a71>] error_code+0x39/0x40
Apr 22 15:31:44 Harrow kernel: =======================
Apr 22 15:31:44 Harrow kernel: Mem-info:
Apr 22 15:31:46 Harrow kernel: DMA per-cpu:
Apr 22 15:31:47 Harrow kernel: cpu 0 hot: high 0, batch 1 used:0
Apr 22 15:31:47 Harrow kernel: cpu 0 cold: high 0, batch 1 used:0
Apr 22 15:31:47 Harrow kernel: DMA32 per-cpu: empty
Apr 22 15:31:47 Harrow kernel: Normal per-cpu:
Apr 22 15:31:47 Harrow kernel: cpu 0 hot: high 186, batch 31 used:44
Apr 22 15:31:47 Harrow kernel: cpu 0 cold: high 62, batch 15 used:14
Apr 22 15:31:47 Harrow kernel: HighMem per-cpu: empty
Apr 22 15:31:47 Harrow kernel: Free pages: 3916kB (0kB HighMem)
Apr 22 15:31:47 Harrow kernel: Active:34714 inactive:56615 dirty:0 writeback:0 unstable:0 free:979 slab:1877 mapped-file:946 mapped-anon:90108 pagetables:951
Apr 22 15:31:47 Harrow kernel: DMA free:1572kB min:104kB low:128kB high:156kB active:5372kB inactive:5196kB present:16384kB pages_scanned:48959 all_unreclaim$
Apr 22 15:31:47 Harrow kernel: lowmem_reserve[]: 0 0 367 367
Apr 22 15:31:47 Harrow kernel: DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Apr 22 15:31:47 Harrow kernel: lowmem_reserve[]: 0 0 367 367
Apr 22 15:31:47 Harrow kernel: Normal free:2344kB min:2400kB low:3000kB high:3600kB active:133484kB inactive:221264kB present:376768kB pages_scanned:612016 a$
Apr 22 15:31:47 Harrow kernel: lowmem_reserve[]: 0 0 0 0
Apr 22 15:31:47 Harrow kernel: HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Apr 22 15:31:47 Harrow kernel: lowmem_reserve[]: 0 0 0 0
Apr 22 15:31:47 Harrow kernel: DMA: 1*4kB 0*8kB 0*16kB 1*32kB 0*64kB 0*128kB 0*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 1572kB
Apr 22 15:31:47 Harrow kernel: DMA32: empty
Apr 22 15:31:47 Harrow kernel: Normal: 0*4kB 1*8kB 0*16kB 3*32kB 1*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 2344kB
Apr 22 15:31:47 Harrow kernel: HighMem: empty
Apr 22 15:31:47 Harrow kernel: 1450 pagecache pages
Apr 22 15:31:47 Harrow kernel: Swap cache: add 199073, delete 198848, find 225/508, race 0+0
Apr 22 15:31:47 Harrow kernel: Free swap = 0kB
Apr 22 15:31:47 Harrow kernel: Total swap = 786424kB
Apr 22 15:31:47 Harrow kernel: Free swap: 0kB
Apr 22 15:31:47 Harrow kernel: 98288 pages of RAM
Apr 22 15:31:47 Harrow kernel: 0 pages of HIGHMEM
Apr 22 15:31:47 Harrow kernel: 1943 reserved pages
Apr 22 15:31:47 Harrow kernel: 9992 pages shared
Apr 22 15:31:47 Harrow kernel: 225 pages swap cached
Apr 22 15:31:47 Harrow kernel: 0 pages dirty
Apr 22 15:31:47 Harrow kernel: 0 pages writeback
Apr 22 15:31:47 Harrow kernel: 946 pages mapped
Apr 22 15:31:47 Harrow kernel: 1877 pages slab
Apr 22 15:31:47 Harrow kernel: 951 pages pagetables
Apr 22 15:31:47 Harrow kernel: Out of memory: Killed process 2551 (asterisk).
The machine appears to have 384MB not 750MB (assuming you mean 768MB) of memory.
However you are using 530MB of swap and the memory you have is being used mostly by 360MB of cache/buffers. Thats a lot.
My older asterisk system is using no swap and 240MB in buffers so something is wrong on your system somewhere.
Try using 'ps axv' as it will show the % of ram each process is using.
Also try stopping asterisk and using 'free' again to see if it is asterisk using all the memory.
However you are using 530MB of swap and the memory you have is being used mostly by 360MB of cache/buffers. Thats a lot.
My older asterisk system is using no swap and 240MB in buffers so something is wrong on your system somewhere.
Try using 'ps axv' as it will show the % of ram each process is using.
Also try stopping asterisk and using 'free' again to see if it is asterisk using all the memory.
ASKER
I made a mistake on the Ram. I've upgraded it now to 512MB
WITH ASTERISK
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 112552 402940 0 1804 41460
-/+ buffers/cache: 69288 446204
Swap: 786424 52212 734212
__________________________ _______
WITHOUT ASTERISK
# free
total used free shared buffers cached
Mem: 515492 63744 451748 0 1080 40628
-/+ buffers/cache: 22036 493456
Swap: 786424 52052 734372
__________________________ _______
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
1 ? Ss 0:09 328 31 2040 164 0.0 init [3]
2 ? S< 0:00 0 0 0 0 0.0 [migration/0]
3 ? RN 0:00 0 0 0 0 0.0 [ksoftirqd/0]
4 ? S< 0:00 0 0 0 0 0.0 [watchdog/0]
5 ? S< 0:00 0 0 0 0 0.0 [events/0]
6 ? S< 0:00 0 0 0 0 0.0 [khelper]
7 ? S< 0:00 0 0 0 0 0.0 [kthread]
10 ? S< 0:01 0 0 0 0 0.0 [kblockd/0]
11 ? S< 0:00 0 0 0 0 0.0 [kacpid]
75 ? S< 0:00 0 0 0 0 0.0 [cqueue/0]
78 ? S< 0:00 0 0 0 0 0.0 [khubd]
80 ? S< 0:00 0 0 0 0 0.0 [kseriod]
144 ? S< 3:21 0 0 0 0 0.0 [kswapd0]
145 ? S< 0:00 0 0 0 0 0.0 [aio/0]
301 ? S< 0:00 0 0 0 0 0.0 [kpsmoused]
326 ? S< 0:00 0 0 0 0 0.0 [ksnapd]
329 ? S< 0:10 0 0 0 0 0.0 [kjournald]
356 ? S< 0:00 0 0 0 0 0.0 [kauditd]
390 ? S<s 0:00 109 67 2088 320 0.0 /sbin/udevd -d
934 ? S< 0:00 0 0 0 0 0.0 [kgameportd]
1178 ? S< 0:00 0 0 0 0 0.0 [kmpathd/0]
1200 ? S< 0:00 0 0 0 0 0.0 [kjournald]
1754 ? S<sl 0:01 195 102 12029 276 0.0 auditd
1756 ? S<sl 0:02 138 68 13003 244 0.0 /sbin/audispd
1787 ? Ss 0:05 225 31 1692 188 0.0 syslogd -m 0
1791 ? Ss 0:01 54 21 1654 36 0.0 klogd -x
1825 ? Ss 0:00 1 30 1781 4 0.0 portmap
1850 ? Ss 0:00 1 43 1916 8 0.0 rpc.statd
1883 ? Ss 0:05 310 27 5448 60 0.0 rpc.idmapd
1910 ? Ss 0:00 0 340 2411 0 0.0 dbus-daemon --system
2065 ? Ss 0:00 0 15 1656 0 0.0 /usr/sbin/acpid
2095 ? Ss 0:03 68 369 6710 548 0.1 /usr/sbin/sshd
2133 ? Ss 0:00 0 154 2573 4 0.0 xinetd -stayalive -pidf
2151 ? SLs 0:00 6 458 3917 4376 0.8 ntpd -u ntp:ntp -p /var
2168 ? Ss 0:00 0 123 4996 172 0.0 /usr/sbin/vsftpd /etc/v
2203 ? S 0:00 0 691 3836 624 0.1 /bin/sh /usr/bin/mysqld
2260 ? Sl 1:43 5400 6397 130330 2320 0.4 /usr/libexec/mysqld --b
2408 ? Ss 1:20 2997 69 17194 1224 0.2 /usr/lib/cyrus-imapd/cy
2435 ? S 0:38 971 874 29085 140 0.0 idled
2437 ? S 0:00 12 1179 30272 692 0.1 imapd
2438 ? S 0:00 12 1179 30272 692 0.1 imapd -s
2439 ? S 0:00 8 906 30245 692 0.1 pop3d
2440 ? S 0:00 7 906 30241 692 0.1 pop3d -s
2441 ? S 0:00 9 986 30257 692 0.1 lmtpd
2443 ? S 0:00 5 1179 30272 692 0.1 imapd
2444 ? S 0:00 6 1179 30268 692 0.1 imapd -s
2445 ? S 0:00 6 906 30245 692 0.1 pop3d
2446 ? S 0:00 4 906 30241 692 0.1 pop3d -s
2480 ? Ss 0:04 223 123 6656 940 0.1 /usr/libexec/postfix/ma
2483 ? S 0:02 189 184 6655 856 0.1 pickup -l -t fifo -u
2484 ? S 0:00 156 244 6659 764 0.1 qmgr -l -t fifo -u
2498 ? S 0:00 0 1179 30268 692 0.1 imapd
2499 ? S 0:00 0 1179 30268 692 0.1 imapd
2500 ? S 0:00 0 1179 30268 692 0.1 imapd
2501 ? S 0:00 0 1179 30268 692 0.1 imapd
2502 ? S 0:00 0 906 30241 692 0.1 pop3d
2503 ? S 0:00 0 906 30241 692 0.1 pop3d
2504 ? S 0:00 0 1179 30268 692 0.1 imapd
2505 ? S 0:00 0 1179 30268 692 0.1 imapd
2506 ? S 0:00 0 1179 30268 692 0.1 imapd
2507 ? S 0:00 0 1179 30268 692 0.1 imapd
2508 ? S 0:00 0 906 30241 692 0.1 pop3d
2509 ? S 0:00 0 906 30245 692 0.1 pop3d
2510 ? Ss 1:06 2796 297 25230 1260 0.2 /usr/sbin/httpd
2544 ? S 0:00 285 691 3844 736 0.1 /bin/sh /usr/sbin/safe_
2572 ? Ss 0:04 175 46 5225 592 0.1 crond
2579 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2580 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2581 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2582 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2583 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2591 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2592 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2593 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2596 ? Ss 0:01 78 17 2234 288 0.0 /usr/sbin/atd
2611 ? Ss 0:00 0 78 5445 368 0.0 /usr/sbin/saslauthd -m
2614 ? S 0:00 0 78 5445 104 0.0 /usr/sbin/saslauthd -m
2615 ? S 0:00 0 78 5445 92 0.0 /usr/sbin/saslauthd -m
2616 ? S 0:00 0 78 5445 92 0.0 /usr/sbin/saslauthd -m
2617 ? S 0:00 0 78 5445 92 0.0 /usr/sbin/saslauthd -m
2630 ? Ss 0:42 2382 257 5146 1264 0.2 hald
2631 ? S 0:00 0 10 3117 416 0.0 hald-runner
2639 ? S 0:00 8 9 1994 528 0.1 hald-addon-acpi: listen
2642 ? S 0:00 33 9 1990 560 0.1 hald-addon-keyboard: li
2720 ? S 0:00 0 691 3840 156 0.0 -bash -c cd /var/www/ht
2721 ? S 0:00 0 691 3792 552 0.1 sh /var/www/html/panel/
2723 ? S 1:20 6089 9 12238 2896 0.5 /usr/bin/perl /var/www/
3185 ? Ss 0:55 2566 9 14502 1104 0.2 /usr/bin/perl /usr/libe
3189 tty2 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty2
3190 tty3 Ss+ 0:00 0 8 1651 408 0.0 /sbin/mingetty tty3
3191 tty4 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty4
3192 tty5 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty5
3193 tty6 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty6
3542 ? S 0:00 0 0 0 0 0.0 [pdflush]
3888 ? S 0:00 0 0 0 0 0.0 [pdflush]
3906 ? Ss 0:00 18 369 6710 2144 0.4 sshd: [accepted]
3908 ? Ss 0:00 15 369 9562 2840 0.5 sshd: root@pts/0
3916 ? Sl 0:58 102 912 310611 292320 56.7 /usr/sbin/asterisk -f
3937 pts/0 Ss 0:00 1 691 3844 1488 0.2 -bash
3988 tty1 Ss+ 0:00 1 8 1655 476 0.0 /sbin/mingetty tty1
3998 pts/0 R+ 0:00 1 69 4134 860 0.1 ps axv
PLEASE HELP
WITH ASTERISK
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 112552 402940 0 1804 41460
-/+ buffers/cache: 69288 446204
Swap: 786424 52212 734212
__________________________
WITHOUT ASTERISK
# free
total used free shared buffers cached
Mem: 515492 63744 451748 0 1080 40628
-/+ buffers/cache: 22036 493456
Swap: 786424 52052 734372
__________________________
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
1 ? Ss 0:09 328 31 2040 164 0.0 init [3]
2 ? S< 0:00 0 0 0 0 0.0 [migration/0]
3 ? RN 0:00 0 0 0 0 0.0 [ksoftirqd/0]
4 ? S< 0:00 0 0 0 0 0.0 [watchdog/0]
5 ? S< 0:00 0 0 0 0 0.0 [events/0]
6 ? S< 0:00 0 0 0 0 0.0 [khelper]
7 ? S< 0:00 0 0 0 0 0.0 [kthread]
10 ? S< 0:01 0 0 0 0 0.0 [kblockd/0]
11 ? S< 0:00 0 0 0 0 0.0 [kacpid]
75 ? S< 0:00 0 0 0 0 0.0 [cqueue/0]
78 ? S< 0:00 0 0 0 0 0.0 [khubd]
80 ? S< 0:00 0 0 0 0 0.0 [kseriod]
144 ? S< 3:21 0 0 0 0 0.0 [kswapd0]
145 ? S< 0:00 0 0 0 0 0.0 [aio/0]
301 ? S< 0:00 0 0 0 0 0.0 [kpsmoused]
326 ? S< 0:00 0 0 0 0 0.0 [ksnapd]
329 ? S< 0:10 0 0 0 0 0.0 [kjournald]
356 ? S< 0:00 0 0 0 0 0.0 [kauditd]
390 ? S<s 0:00 109 67 2088 320 0.0 /sbin/udevd -d
934 ? S< 0:00 0 0 0 0 0.0 [kgameportd]
1178 ? S< 0:00 0 0 0 0 0.0 [kmpathd/0]
1200 ? S< 0:00 0 0 0 0 0.0 [kjournald]
1754 ? S<sl 0:01 195 102 12029 276 0.0 auditd
1756 ? S<sl 0:02 138 68 13003 244 0.0 /sbin/audispd
1787 ? Ss 0:05 225 31 1692 188 0.0 syslogd -m 0
1791 ? Ss 0:01 54 21 1654 36 0.0 klogd -x
1825 ? Ss 0:00 1 30 1781 4 0.0 portmap
1850 ? Ss 0:00 1 43 1916 8 0.0 rpc.statd
1883 ? Ss 0:05 310 27 5448 60 0.0 rpc.idmapd
1910 ? Ss 0:00 0 340 2411 0 0.0 dbus-daemon --system
2065 ? Ss 0:00 0 15 1656 0 0.0 /usr/sbin/acpid
2095 ? Ss 0:03 68 369 6710 548 0.1 /usr/sbin/sshd
2133 ? Ss 0:00 0 154 2573 4 0.0 xinetd -stayalive -pidf
2151 ? SLs 0:00 6 458 3917 4376 0.8 ntpd -u ntp:ntp -p /var
2168 ? Ss 0:00 0 123 4996 172 0.0 /usr/sbin/vsftpd /etc/v
2203 ? S 0:00 0 691 3836 624 0.1 /bin/sh /usr/bin/mysqld
2260 ? Sl 1:43 5400 6397 130330 2320 0.4 /usr/libexec/mysqld --b
2408 ? Ss 1:20 2997 69 17194 1224 0.2 /usr/lib/cyrus-imapd/cy
2435 ? S 0:38 971 874 29085 140 0.0 idled
2437 ? S 0:00 12 1179 30272 692 0.1 imapd
2438 ? S 0:00 12 1179 30272 692 0.1 imapd -s
2439 ? S 0:00 8 906 30245 692 0.1 pop3d
2440 ? S 0:00 7 906 30241 692 0.1 pop3d -s
2441 ? S 0:00 9 986 30257 692 0.1 lmtpd
2443 ? S 0:00 5 1179 30272 692 0.1 imapd
2444 ? S 0:00 6 1179 30268 692 0.1 imapd -s
2445 ? S 0:00 6 906 30245 692 0.1 pop3d
2446 ? S 0:00 4 906 30241 692 0.1 pop3d -s
2480 ? Ss 0:04 223 123 6656 940 0.1 /usr/libexec/postfix/ma
2483 ? S 0:02 189 184 6655 856 0.1 pickup -l -t fifo -u
2484 ? S 0:00 156 244 6659 764 0.1 qmgr -l -t fifo -u
2498 ? S 0:00 0 1179 30268 692 0.1 imapd
2499 ? S 0:00 0 1179 30268 692 0.1 imapd
2500 ? S 0:00 0 1179 30268 692 0.1 imapd
2501 ? S 0:00 0 1179 30268 692 0.1 imapd
2502 ? S 0:00 0 906 30241 692 0.1 pop3d
2503 ? S 0:00 0 906 30241 692 0.1 pop3d
2504 ? S 0:00 0 1179 30268 692 0.1 imapd
2505 ? S 0:00 0 1179 30268 692 0.1 imapd
2506 ? S 0:00 0 1179 30268 692 0.1 imapd
2507 ? S 0:00 0 1179 30268 692 0.1 imapd
2508 ? S 0:00 0 906 30241 692 0.1 pop3d
2509 ? S 0:00 0 906 30245 692 0.1 pop3d
2510 ? Ss 1:06 2796 297 25230 1260 0.2 /usr/sbin/httpd
2544 ? S 0:00 285 691 3844 736 0.1 /bin/sh /usr/sbin/safe_
2572 ? Ss 0:04 175 46 5225 592 0.1 crond
2579 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2580 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2581 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2582 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2583 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2591 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2592 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2593 ? S 0:00 0 297 25366 316 0.0 /usr/sbin/httpd
2596 ? Ss 0:01 78 17 2234 288 0.0 /usr/sbin/atd
2611 ? Ss 0:00 0 78 5445 368 0.0 /usr/sbin/saslauthd -m
2614 ? S 0:00 0 78 5445 104 0.0 /usr/sbin/saslauthd -m
2615 ? S 0:00 0 78 5445 92 0.0 /usr/sbin/saslauthd -m
2616 ? S 0:00 0 78 5445 92 0.0 /usr/sbin/saslauthd -m
2617 ? S 0:00 0 78 5445 92 0.0 /usr/sbin/saslauthd -m
2630 ? Ss 0:42 2382 257 5146 1264 0.2 hald
2631 ? S 0:00 0 10 3117 416 0.0 hald-runner
2639 ? S 0:00 8 9 1994 528 0.1 hald-addon-acpi: listen
2642 ? S 0:00 33 9 1990 560 0.1 hald-addon-keyboard: li
2720 ? S 0:00 0 691 3840 156 0.0 -bash -c cd /var/www/ht
2721 ? S 0:00 0 691 3792 552 0.1 sh /var/www/html/panel/
2723 ? S 1:20 6089 9 12238 2896 0.5 /usr/bin/perl /var/www/
3185 ? Ss 0:55 2566 9 14502 1104 0.2 /usr/bin/perl /usr/libe
3189 tty2 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty2
3190 tty3 Ss+ 0:00 0 8 1651 408 0.0 /sbin/mingetty tty3
3191 tty4 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty4
3192 tty5 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty5
3193 tty6 Ss+ 0:00 0 8 1655 408 0.0 /sbin/mingetty tty6
3542 ? S 0:00 0 0 0 0 0.0 [pdflush]
3888 ? S 0:00 0 0 0 0 0.0 [pdflush]
3906 ? Ss 0:00 18 369 6710 2144 0.4 sshd: [accepted]
3908 ? Ss 0:00 15 369 9562 2840 0.5 sshd: root@pts/0
3916 ? Sl 0:58 102 912 310611 292320 56.7 /usr/sbin/asterisk -f
3937 pts/0 Ss 0:00 1 691 3844 1488 0.2 -bash
3988 tty1 Ss+ 0:00 1 8 1655 476 0.0 /sbin/mingetty tty1
3998 pts/0 R+ 0:00 1 69 4134 860 0.1 ps axv
PLEASE HELP
WITH ASTERISK
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 112552 402940 0 1804 41460
-/+ buffers/cache: 69288 446204
Swap: 786424 52212 734212
At that point in time you had 400MB of free memory so it should have been fine. You are using about 160MB of memory but in your previous post the machine was using over 800MB and then completely used up all the available swap space and then had problems.
Perhaps it gradually uses up memory over the course of a few minutes?
I would keep an eye on the swap usage using the 'free' command and when it gets high (over 500MB used) then use the 'ps axv' to see what is using all of it.
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 112552 402940 0 1804 41460
-/+ buffers/cache: 69288 446204
Swap: 786424 52212 734212
At that point in time you had 400MB of free memory so it should have been fine. You are using about 160MB of memory but in your previous post the machine was using over 800MB and then completely used up all the available swap space and then had problems.
Perhaps it gradually uses up memory over the course of a few minutes?
I would keep an eye on the swap usage using the 'free' command and when it gets high (over 500MB used) then use the 'ps axv' to see what is using all of it.
ASKER
Yes, its definately using up memory over time -as I rebooted to add the memory.
This is after time:
NO ASTERISK:
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 105228 410264 0 4896 76508
-/+ buffers/cache: 23824 491668
Swap: 786424 51640 734784
__________________________ _
ASTERISK LOADED
4121 pts/0 Sl 1:08 15 912 355919 338680 65.7 /usr/sbin/asterisk -f -vvvg -c
AND
4121 pts/0 Sl 1:44 15 912 532715 468652 90.9 /usr/sbin/asterisk -f -vvvg -c
__________[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 509608 5884 0 248 20676
-/+ buffers/cache: 488684 26808
Swap: 786424 235692 550732
___________________
WÙHAT CAN I DO?
Asterisk 1.4.24
This is after time:
NO ASTERISK:
[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 105228 410264 0 4896 76508
-/+ buffers/cache: 23824 491668
Swap: 786424 51640 734784
__________________________
ASTERISK LOADED
4121 pts/0 Sl 1:08 15 912 355919 338680 65.7 /usr/sbin/asterisk -f -vvvg -c
AND
4121 pts/0 Sl 1:44 15 912 532715 468652 90.9 /usr/sbin/asterisk -f -vvvg -c
__________[root@Harrow ~]# free
total used free shared buffers cached
Mem: 515492 509608 5884 0 248 20676
-/+ buffers/cache: 488684 26808
Swap: 786424 235692 550732
___________________
WÙHAT CAN I DO?
Asterisk 1.4.24
First I would upgrade asterisk to 1.4.26 as there have been 4 months and 4 releases between the version you are running and the latest.
You could also stop running op_server to see if that is the cause.
If none of those help then it may be a configuration item which is causing a problem.
You could also stop running op_server to see if that is the cause.
If none of those help then it may be a configuration item which is causing a problem.
ASKER
"You could also stop running op_server to see if that is the cause."
How please?
How please?
That depends on how it was installed. List the startup files in /etc/init.d/. One of those should have an ovious name and can be used to start and stop it.
ASKER
Are all files below run on startup?
I can't see the obvious one.
Do I need all of these below for a basic system? What can I stop and how do I stop them?
[root@Harrow init.d]# ls
acpid dhcrelay krb524 multipathd pppoe sshd
asterisk functions kudzu mysqld psacct syslog
atd gpm LCDd netconsole rdisc vsftpd
auditd haldaemon lcdelastix netfs restorecond wanrouter
capi halt lm_sensors netplugd rpcgssd webmin
crond httpd lvm2-monitor network rpcidmapd wpa_supplicant
cyrus-imapd hylafax mailman nfs rpcsvcgssd xinetd
dahdi iaxmodem mcstrans nfslock saslauthd
dc_client ip6tables mdmonitor ntpd single
dc_server iptables mdmpd openfire snmpd
dhcdbd isdn messagebus portmap snmptrapd
dhcpd killall mISDN postfix spamassassin
[root@Harrow init.d]#
I can't see the obvious one.
Do I need all of these below for a basic system? What can I stop and how do I stop them?
[root@Harrow init.d]# ls
acpid dhcrelay krb524 multipathd pppoe sshd
asterisk functions kudzu mysqld psacct syslog
atd gpm LCDd netconsole rdisc vsftpd
auditd haldaemon lcdelastix netfs restorecond wanrouter
capi halt lm_sensors netplugd rpcgssd webmin
crond httpd lvm2-monitor network rpcidmapd wpa_supplicant
cyrus-imapd hylafax mailman nfs rpcsvcgssd xinetd
dahdi iaxmodem mcstrans nfslock saslauthd
dc_client ip6tables mdmonitor ntpd single
dc_server iptables mdmpd openfire snmpd
dhcdbd isdn messagebus portmap snmptrapd
dhcpd killall mISDN postfix spamassassin
[root@Harrow init.d]#
ASKER
[root@Harrow init.d]# service --status-all
acpid (pid 2066) is running...
asterisk (pid 6073) is running...
atd (pid 6136) is running...
auditd (pid 1755) is running...
capi not installed - No such file or directory (2)
crond (pid 6112) is running...
cyrus-master (pid 5614) is running...
### Span 1: DAHDI_DUMMY/1 "DAHDI_DUMMY/1 (source: RTC) 1" (MASTER)
dc_client is stopped
dc_server is stopped
dhcpd is stopped
dhcrelay is stopped
gpm is stopped
hald (pid 6233) is running...
httpd (pid 6133 6132 6121 6120 6119 6118 6117 6116 5987) is running...
HylaFAX client-server protocol server: hfaxd is stopped
HylaFAX queue manager process: faxq is stopped
iaxmodem is stopped
Firewall is stopped.
Firewall is stopped.
krb524d is stopped
LCDd is stopped
lcdelastixd is stopped
mailman is stopped
mcstransd is stopped
mdadm is stopped
mdmpd is stopped
dbus-daemon (pid 1911) is running...
Usage: /usr/sbin/mISDN start|stop|restart|config| scan|help
multipathd is stopped
mysqld (pid 21156) is running...
netconsole module not loaded
netplugd is stopped
Configured devices:
lo eth0 eth1 ppp0
Currently active devices:
lo eth1 eth0
rpc.mountd is stopped
nfsd is stopped
rpc.statd (pid 1851) is running...
ntpd (pid 2152) is running...
openfire is not running
portmap (pid 1826) is running...
master (pid 5843) is running...
pppoe-status: Link is down (can't read pppoe PID file /var/run/pppoe.conf-pppoe. pid.pppoe)
Process accounting is disabled.
rdisc is stopped
rpc.idmapd (pid 1884) is running...
saslauthd (pid 6193 6192 6191 6190 6172) is running...
snmpd is stopped
snmptrapd is stopped
spamd is stopped
sshd (pid 17469 2118) is running...
syslogd (pid 1789) is running...
klogd (pid 1792) is running...
vsftpd (pid 2169) is running...
Router is stopped !
webmin (pid 12558) is running
wpa_supplicant is stopped
xinetd (pid 2134) is running...
acpid (pid 2066) is running...
asterisk (pid 6073) is running...
atd (pid 6136) is running...
auditd (pid 1755) is running...
capi not installed - No such file or directory (2)
crond (pid 6112) is running...
cyrus-master (pid 5614) is running...
### Span 1: DAHDI_DUMMY/1 "DAHDI_DUMMY/1 (source: RTC) 1" (MASTER)
dc_client is stopped
dc_server is stopped
dhcpd is stopped
dhcrelay is stopped
gpm is stopped
hald (pid 6233) is running...
httpd (pid 6133 6132 6121 6120 6119 6118 6117 6116 5987) is running...
HylaFAX client-server protocol server: hfaxd is stopped
HylaFAX queue manager process: faxq is stopped
iaxmodem is stopped
Firewall is stopped.
Firewall is stopped.
krb524d is stopped
LCDd is stopped
lcdelastixd is stopped
mailman is stopped
mcstransd is stopped
mdadm is stopped
mdmpd is stopped
dbus-daemon (pid 1911) is running...
Usage: /usr/sbin/mISDN start|stop|restart|config|
multipathd is stopped
mysqld (pid 21156) is running...
netconsole module not loaded
netplugd is stopped
Configured devices:
lo eth0 eth1 ppp0
Currently active devices:
lo eth1 eth0
rpc.mountd is stopped
nfsd is stopped
rpc.statd (pid 1851) is running...
ntpd (pid 2152) is running...
openfire is not running
portmap (pid 1826) is running...
master (pid 5843) is running...
pppoe-status: Link is down (can't read pppoe PID file /var/run/pppoe.conf-pppoe.
Process accounting is disabled.
rdisc is stopped
rpc.idmapd (pid 1884) is running...
saslauthd (pid 6193 6192 6191 6190 6172) is running...
snmpd is stopped
snmptrapd is stopped
spamd is stopped
sshd (pid 17469 2118) is running...
syslogd (pid 1789) is running...
klogd (pid 1792) is running...
vsftpd (pid 2169) is running...
Router is stopped !
webmin (pid 12558) is running
wpa_supplicant is stopped
xinetd (pid 2134) is running...
ASKER
BTW, I used the Elastix compialtion to install the system. Can you recomend an installation that gives a good basic setup of asterisk on a clean PC? I need A2 Billing installed along with it and My SQL.
The op_panel must be included as part of the elastix configuration tools.
What you have running looks fine.
You could have a look at Trixbox (http://www.trixbox.org/) which is a complete installation so you dont have to install centos first etc...
The advantage is that it generally works straight away but the disadvantage is that if you want to install any different software aswell then this can be more difficult because you are not starting from a known distribution which you can easily get software packages for.
What you have running looks fine.
You could have a look at Trixbox (http://www.trixbox.org/) which is a complete installation so you dont have to install centos first etc...
The advantage is that it generally works straight away but the disadvantage is that if you want to install any different software aswell then this can be more difficult because you are not starting from a known distribution which you can easily get software packages for.
ASKER
Tx. I have a Trixbox 2.4 version. How can I upgrade it to the latest 2.6 stable version?
Sorry I dont know. I dont use trixbox myself.
ASKER
No problem.What do you use if I may ask?
I'm trying to setup an Asterisk server to work as a switch and handle about 300 simultaneous calls.
I'm trying to setup an Asterisk server to work as a switch and handle about 300 simultaneous calls.
I have been using Linux for a long time so I tend to install asterisk from source code and configure it directly from the config files.
Its the most complex way to do it but it gives a very streamlined install and means that I can configure it to do exactly what I want and I am not limited to what can be done within a web based configuration tool.
Its the most complex way to do it but it gives a very streamlined install and means that I can configure it to do exactly what I want and I am not limited to what can be done within a web based configuration tool.
ASKER
Tx. Do you recomend the 1.6 version for a production site yet?
Have a look at http://www.asterisk.org/node/48602
I would say 1.6.0 is stable enough having been available for around 9 months.
1.6.1 may still be a little new for full commercial use.
I would say 1.6.0 is stable enough having been available for around 9 months.
1.6.1 may still be a little new for full commercial use.
ASKER
Thanks.
I would prefer to stay with exisiting Asterisk install and its clearly and issue of * using up Ram over time.
I wish to install the newer 1.4 version - how do I do it - whithout destroying config files? Do I remove the older version 1st?
If this doesn't help then how do I find the config issue?
Btw ps avx is G8. How can I sort by Mem usage?
I would prefer to stay with exisiting Asterisk install and its clearly and issue of * using up Ram over time.
I wish to install the newer 1.4 version - how do I do it - whithout destroying config files? Do I remove the older version 1st?
If this doesn't help then how do I find the config issue?
Btw ps avx is G8. How can I sort by Mem usage?
It should just be a case of installing the new version of asterisk. When you install it, it will just install the binaries. When doing the 1st install there is a separate command to install example configuration.
Cant remember how to sort by mem usage off hand. I am out of the office at the moment so no access to a linux machine to check. You can do 'man ps' to bring up the manual page for using the command.
Cant remember how to sort by mem usage off hand. I am out of the office at the moment so no access to a linux machine to check. You can do 'man ps' to bring up the manual page for using the command.
ASKER
Tx. Please have a look when you can as I tried using the man pages - but couldn't understand how to sort by %mem column. it was something like -o= but -o=%mem didn't help.
This is the best I could come up with. The 'k' specifies the sorting order but you have far fewer options which you can sort on so you have to sort by the virtual memory size which is not quite the same thing.
ps axvk vsz
ps axvk vsz
ASKER
Tx very much this helps a lot .I'm planning to start from scratch with Trix Box as I've hit a snag with drive space when compiling asterisk - with a NO DRIVE SPACE ERROR.
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-Log Vol00
8824112 8809452 0 100% /
/dev/hdc1 101086 18827 77040 20% /boot
tmpfs 257744 0 257744 0% /dev/shm
Would like ot know what is going on though as not wure what is SWAP and what is the rest....
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-Log
8824112 8809452 0 100% /
/dev/hdc1 101086 18827 77040 20% /boot
tmpfs 257744 0 257744 0% /dev/shm
Would like ot know what is going on though as not wure what is SWAP and what is the rest....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tx very much.
ASKER
What directories can I delete if I just need a basic Asterisk system so that I can get by on 9Gig?
You cant really delete directories due to the way Linux works in that programs store executables and data files in lots of places. You can remove packages.
"rpm -qa | sort" will give you a list of packages. There will be lots of them but you need to know what they are to know if you need them or not.
"rpm -qa | sort" will give you a list of packages. There will be lots of them but you need to know what they are to know if you need them or not.
ASKER
Tx. I've tried rpm -e <package> but gives error " failed dependencies" ?
It should list the dependencies. Basically the dependencies rely on the program you are deinstalling. If you dont need the dependencies then specify them on the same command line.
ASKER
I've now loaded TrixBox but on 1st boot it hangs with message op_server.pl: no process killed. Any ideas please?
Sorry no ideas. Trixbox have their own forums so that is probably the best place to ask.
ASKER
Tx
Run the following commands and post the output:-
uptime
free
ps ax
cat /etc/inittab | grep initdefault