Archive for July 18th, 2016

Asterisk 11: some required modules

Monday, July 18th, 2016

Asterisk 11, modules, which have to be loaded for other basic modules to work properly.

preload => res_http_websocket.so	; for chan_sip.so load
preload => res_speech.so		; for res_agi.so load
preload => res_agi.so			; for app_stack.so load
preload => res_monitor.so		; for app_queue.so correct load
preload => res_ael_share.so		; for pbx_ael.so correct load // also works without this,
                                        ; but WARNING while loading

Linux: limit CPU usage by running process

Monday, July 18th, 2016

Use cpulimit for this.

We have a 8-core CPU (it means the total CPU usage can be 800%, and 100% for 1 core respectively).
Our process is ‘raid-check’.

/usr/bin/cpulimit --exe /usr/sbin/raid-check --limit 600

I added this line to crontab config. The reason is that my Asterisk stops accepting calls when the CPU load is too high. Of course you can also use asterisk.conf settings to achieve the desired results.


[root@voip-ge ~]# cat /etc/cron.d/raid-check
# Run system wide raid-check once a week on Sunday at 1am by default
0 1 * * Mon root /usr/sbin/raid-check

# limit the CPU usage by executable name
1 1 * * Mon root /usr/bin/cpulimit --exe /usr/sbin/raid-check --limit 600