Re: [asterisk-users] How to get asterisk to take a dump?

2007-10-05 Thread Tzafrir Cohen
On Wed, Oct 03, 2007 at 10:48:37AM -0700, Steve Edwards wrote:
 I have an asterisk process that is consuming over 100mb (according to 
 top). Show channels says 167 active channels and 53 active calls.

So you have 167 channels. There's a thread for each, with stack and all.

 
 It's an old install -- 1.2.7.1, but it has custom code that needs to be 
 updated before moving to a more recent release.
 
 I'm assuming that 100mb is indicative of a memory leak (probably in my 
 code).

I'm not sure. It doesn't even mean the kernel has allocated those 
100MB to Asterisk. Recall that a memory block is only allocated on 
first use. And Asterisk tends to allocate lots of memory. Not all of it
is actually used.

 
 How can I get a dump (preferably without disrupting production) so I can 
 poke around in it (using gdb) and what's a good strategy for finding 
 memory leaks?

The best way is to rebuild Asterisk with memory allocation debugging.

-- 
   Tzafrir Cohen   
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]   
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] How to get asterisk to take a dump?

2007-10-03 Thread Steve Edwards
I have an asterisk process that is consuming over 100mb (according to 
top). Show channels says 167 active channels and 53 active calls.

It's an old install -- 1.2.7.1, but it has custom code that needs to be 
updated before moving to a more recent release.

I'm assuming that 100mb is indicative of a memory leak (probably in my 
code).

How can I get a dump (preferably without disrupting production) so I can 
poke around in it (using gdb) and what's a good strategy for finding 
memory leaks?

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to get asterisk to take a dump?

2007-10-03 Thread Atis Lezdins
On Wednesday 03 October 2007 20:48:37 Steve Edwards wrote:
 install -- 1.2.7.1, but it has custom code that needs to be
 updated before moving to a more recent release.

 I'm assuming that 100mb is indicative of a memory leak (probably in my
 code).

 How can I get a dump (preferably without disrupting production) so I can
 poke around in it (using gdb) and what's a good strategy for finding
 memory leaks?

 Thanks in advance,

I think, there's no way you can get a coredump without interrupting process.

However you can do killall -5 asterisk. That would send a Trace/Breakpoint 
signal to asterisk and it would crash immediately to core - so you can play 
with it in gdb.

Regards,
Atis

-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users