[asterisk-dev] Identifying Asterisk threads
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Tue Mar 16 06:00:09 CDT 2010
On Tue, Mar 16, 2010 at 10:58:51AM +0100, Pavel Troller wrote:
> Hi!
> I have a problem with one of Asterisk installations. It serves
> as a conference bridge and most of the time there is no traffic. When a new
> call arrives after a longer time of idleness, one of Asterisk threads awakes
> up and runs at 100% CPU utilization for a time, which is proportional to the
> time the system was idle before. For example, when there were two hours of
> idle, the thread runs about 3 seconds. When there was one week of idle, the
> thread runs several minutes. During this time, the Asterisk performance is
> degraded, including choppy playback of announcements and improper inband DTMF
> detection. It is on a 8-core machine, where using one core fully should not
> influence the total system performance. When the thread finishes its work,
> it's going to (almost) sleep again and Asterisk performance returns to normal.
> I can display the asterisk threads:
> bigmeat1*CLI> core show threads
> 0x41b5e950 netconsole started at [ 1103] asterisk.c listener()
> 0x40e33950 monitor_sig_flags started at [ 3527] asterisk.c main()
> 0x4031e950 tps_processing_function started at [ 451] taskprocessor.c ast_taskprocessor_get()
> 0x41cd1950 scan_thread started at [ 516] pbx_spool.c load_module()
> 0x4205d950 do_monitor started at [20996] chan_sip.c restart_monitor()
> 0x40ad7950 desc->accept_fn started at [ 462] tcptls.c ast_tcptls_server_start()
> 0x4042a950 lock_broker started at [ 463] func_lock.c load_module()
> 0x41c55950 do_monitor started at [ 3513] chan_mgcp.c restart_monitor()
> 0x411bd950 do_timing started at [ 482] res_timing_pthread.c init_timing_thread()
> 0x40fb4950 do_parking_thread started at [ 4589] features.c ast_features_init()
> 0x413e7950 tps_processing_function started at [ 451] taskprocessor.c ast_taskprocessor_get()
> 0x41906950 do_devstate_changes started at [ 751] devicestate.c ast_device_state_engine_init()
> 0x41f76950 logger_thread started at [ 1009] logger.c init_logger()
> 0x40932950 listener started at [ 1162] asterisk.c ast_makesocket()
> 0x4188a950 tps_processing_function started at [ 451] taskprocessor.c ast_taskprocessor_get()
> 0x41ae2950 canary_thread started at [ 3369] asterisk.c main()
> 16 threads listed.
> I can display system threads:
> root at bigmeat1:~# ps axumw |less
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> ...
> root 3472 0.0 0.3 498956 15496 pts/1 - 08:23 0:04 /opt/asterisk/sbin/asterisk -p -f -I -vvvg -c
Try: ps axms
to see the different Asterisk threads.
Alternatively, in 'top', press 'H' (shift-H) to display threads
separately. The thread with 100% CPU time will soon be on top.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev
mailing list