Hoping someone can help me understand what is happening here; we start asterisk as a service at boot (actually, with heartbeat) on CentOS using the asterisk init script installed with "make config" upon reboot of the server (when the asterisk service is first started by heartbeat) we get color in the console when we connect to it using asterisk -r after the execution of '#service asterisk restart' we no longer have color in the console this appear to be the case in all versions tested (1.2, 1.4, and 1,6) additionally, when executing the restart of the service we get a message that asterisk exited on signal 9, but I have not been able to find a definition for signal 9. I assume this is normal because we force an unconditional restart. we do the restart periodically due to some processes that don't always clean up after themselves, and the fact that a reload does not clean them up either (zombie channels, zombie manager connections). these are very heavily loaded servers, and the idea that a full restart should never be needed has been proven inaccurate over several years of experience :) I do not think this is heartbeat related, but just in case, here are the heartbeat details; these are heartbeat version 1 clusters the asterisk init script that is used is derived from "make config" we chkconfig --add asterisk, then chkconfig asterisk off (heartbeat starts it) we then define the asterisk service as a heartbeat managed resource about once a month we issue a "service asterisk restart" via a cron job, and this is where we lose the color. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090918/1526017d/attachment.htm
Just a wild guess, but your "service" probably runs two "flavors" of asterisk. Flavor 1 is /usr/sbin/asterisk (executable) which provides a console as you expect. Flavor 2 is /usr/sbin/safe_asterisk (shell-bash) which turns off the console color. _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Damon Estep Sent: Friday, September 18, 2009 9:28 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] console color Hoping someone can help me understand what is happening here; we start asterisk as a service at boot (actually, with heartbeat) on CentOS using the asterisk init script installed with "make config" upon reboot of the server (when the asterisk service is first started by heartbeat) we get color in the console when we connect to it using asterisk -r after the execution of '#service asterisk restart' we no longer have color in the console this appear to be the case in all versions tested (1.2, 1.4, and 1,6) additionally, when executing the restart of the service we get a message that asterisk exited on signal 9, but I have not been able to find a definition for signal 9. I assume this is normal because we force an unconditional restart. we do the restart periodically due to some processes that don't always clean up after themselves, and the fact that a reload does not clean them up either (zombie channels, zombie manager connections). these are very heavily loaded servers, and the idea that a full restart should never be needed has been proven inaccurate over several years of experience :) I do not think this is heartbeat related, but just in case, here are the heartbeat details; these are heartbeat version 1 clusters the asterisk init script that is used is derived from "make config" we chkconfig --add asterisk, then chkconfig asterisk off (heartbeat starts it) we then define the asterisk service as a heartbeat managed resource about once a month we issue a "service asterisk restart" via a cron job, and this is where we lose the color. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090918/b9773a23/attachment.htm
On Friday 18 September 2009 09:28:24 Damon Estep wrote:> about once a month we issue a "service asterisk restart" via a cron job, > and this is where we lose the color.Most likely, your TERM environmental variable is not set when the cron job runs. This environmental variable should be set to the name of a terminal which supports color ("linux" is a good choice, except on non-Linux systems, where "xterm-color" might be better). -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
thanks! I will research that. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tilghman Lesher Sent: Friday, September 18, 2009 9:45 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] console color On Friday 18 September 2009 09:28:24 Damon Estep wrote:> about once a month we issue a "service asterisk restart" via a cronjob,> and this is where we lose the color.Most likely, your TERM environmental variable is not set when the cron job runs. This environmental variable should be set to the name of a terminal which supports color ("linux" is a good choice, except on non-Linux systems, where "xterm-color" might be better). -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
On Fri, 18 Sep 2009, Damon Estep wrote:> after the execution of '#service asterisk restart' we no longer have > color in the consoleI consider that a "good thing." Color confuses me -- I'm a binary kind of guy :) Seriously though, all those escape sequences are hell if you capture the console output using something like "script."> additionally, when executing the restart of the service we get a message > that asterisk exited on signal 9, but I have not been able to find a > definition for signal 9.Try "kill -l" and "man kill" Signal 9 (SIGKILL) is used to kill a process that doesn't take a hint -- signal 15 (SIGTERM). -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000