Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

http://i.imgur.com/sySQfsH.png

Please note the screenshot. I have an Ubuntu 12.10 box running Asterisk. I ssh'ed into the server the other day to find asterisk running at 100% CPU on one core, and i watched it for several days now, and it is always at 100% cpu on one core. I did some extensive google searching to find other people with the same problem and not very many similar situations like mine. Ideally i would like it to use multiple cores or perhaps just not 100% cpu as i assume this is the reason why i am having quality issues with the lines.

I do not know how to even start to troubleshooting this, does anyone have any ideas?

edit: (Additional info from PBX Admin)

System sees 20-40 active channels on average. All inbound SIP, no transcoding (except mix_monitor on all calls for recordings, which transcodes to gsm), g711ulaw 8kHz.

result of "core show threads" here: http://pastebin.com/n26V5LPE

htop shows asterisk thread (PID 1745) at 106% CPU (main thread it seems).

Quad-core with hyperthreading. Uptime 45 days.

Same behavior with verbosity/debug at levels 0 and 6.

Phone system downtime scheduled soon for lots of little bug fixes and tuneups. Any help is greatly appreciated!

share|improve this question
    
I have several questions: 1) What version of asterisk? 2) What is mix-mon doing exactly? (It is notorious for using a lot of CPU) 3) are you using hand-edited dialplan? or a prebuilt distro of some sort? 4) You mentioned "quality issues" ... what sort of quality issues? –  TheCompWiz Jan 30 '13 at 21:10
    
1) Asterisk 10.9 === 2) [DID_trunk_1] exten = _X.,1,Set(CALLFILENAME=did/${STRFTIME(${EPOCH},,%Y)}/${STRFTIME(${EPOCH},,%m)}/$‌​{STRFTIME(${EPOCH},,%d)}/${STRFTIME(${EPOCH},,%H%M%S)}-${CALLERID(num)}-${EXTEN}) exten = _X.,n,MixMonitor(${CALLFILENAME}.gsm) exten = _X.,n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes) exten = _X.,n,Set(TIMEOUT(absolute)=21600) ;6 hours exten = _X.,n,Goto(DID_trunk_continue,${EXTEN},1)... === 3) Yes, hand-edited, extensively. === 4) PBX Admin has not heard consistent quality complaints, and could not isolate them to softphone, PBX, or caller. –  Ace Jan 31 '13 at 17:35
    
@TheCompWiz sorry for the above comment, im not satisfied with the formatting, so heres a paste in response to your questions: [paste.ubuntu.com/1593633/] –  Ace Jan 31 '13 at 17:38
    
Have you tried disabling the transcoding? (mixmon to a .g711 instead) What kind of channels are you using? IAX? Dahdi? SIP? ??? I've heard of problems with chan_iax sticking at 100% CPU... if you're not using it... disable it. –  TheCompWiz Jan 31 '13 at 19:18
    
yeah, last night while we could afford some downtime, we rebooted the server and disabled all modules and no active channels, still 100% cpu we are considering reinstalling OS and asterisk as a troubleshooting step. –  Ace Jan 31 '13 at 20:42

1 Answer 1

up vote 0 down vote accepted

it looks like our PBX admin was using a strange init script to start the service, therefor causing the CLI to loop. we were unable to see the loop over ssh, and were only able to see it once plugging in a monitor.

we grabbed the original init script from the deb in ubuntus official repository and that fixed the high CPU problem, but also caused other permissions issues that we addressed as well... needless to say, i like official repository packages made for the flavor of linux we use rather than building from source!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.