Asterisk and X [was: Re: [Asterisk-Users] zaptel PRI drivers]

Tzafrir Cohen tzafrir at cohens.org.il
Mon Mar 21 03:54:40 MST 2005


On Sun, Mar 20, 2005 at 11:12:22PM -0700, Tom wrote:
> 
> I have a quick question.
> I know that running X on an asterisk server is not officially "supported",

Generally it shouldn't cause "errors", but will probably degregate
performance, as an X server is probably as close as Asterisk is to the 
hardware and optimized just as well for minimal latency.

> however, I've never had any trouble with it until now (8 months, using wctdm
> cards with fxo and fxs ports, IAX trunks, SIP phones, everything except a PRI
> card).  Now I just installed my first asterisk box that terminates a PRI, and
> bam, HDLC errors up the wazoo if X is running, if its not, everything is fine,
> I assume this is because the timing parameters for the PRI are so much more
> strick.

Why do you need the X server running at all?

Is Asterisk running as root? With real-time priority? (-p)

What distro do you use, BTW?

> 
> I don't mind if X is a little less responsive (even alot less 
> responsive), but I would really like to be able to run X on a server 
> with a PRI.  Is there any way to reduce X11's priority so that it 
> doesn't interfere with the zaptel driver for the PRI... I've tried 
> renicing X as far down as I can and renicing Asterisk up as far as I 
> can, however I fear this won't ever fix the problem since I think the 
> actual kernel module that is running the pri card needs to get higher
> priority (ie, the kernel itself needs higher priority).  
>

What exactly do you run on X? Is the CPU very busy? try a light
interface such as icewm, windowmaker or fluxbox with a theme that uses
no gradients and no special effects.

If your display has a little resolution, try something like matchbox.

> Is there any 
> way to do this?  Am I correct in my analysis?  I really don't 
> understand why on a system
> that averages less than 3% CPU usage with X running, why it can't handle the
> PRI.  I know for whatever reason X always gets a really high priority (although
> top doesn't show X getting any special treatment its PR 15 NICE 0 by default,
> lower than most other processes on the system).
> 
> Another idea is that right now the system is only a single proc, but it is dual
> proc capable.  Would this somehow help if we added the second proc?  My
> thinking is it won't because it's a kernel module we are dealing with, and
> because of that I can't control the affinity of the driver (I was thinking at
> one point put X11 on 1 proc and Asterisk on the second, but it's not Asterisk
> that has the problem I don't think.)
> 
> My final idea is that currently the system has an onboard 8mb ati graphic card
> that leaves almost all actual graphics processing to the CPU, could adding a
> better graphics card possibly help X use less cpu and not get in the way so
> much?
> 
> Anyway, I know this isn't a supported setup, so if thats your answer don't
> bother replying, I'm know this will be a kludge/hack to get working (if I can
> get it working at all).  I'm just trying to do something that will be
> convienient for me and my users, there are other systems running on the server
> that I don't want to manage through the CLI, and the users don't know how to
> manage through the CLI, and there is no web management for them.

You want to run a full desktop just be able to manage the Asterisk box?
That's what ssh is for.

Xorcom Rapid added a menu application for managing the box for those who
don't know the command to type. If you have an X server on your
workstation you can run X programs on your local X server. There should
be no need for a local X server on the Asterisk box.

> 
> Does anyone have success running X on an asterisk box that terminates a PRI?
> If so what hardware (video card, cpu, ram, mobo, etc)?
> 
> Thanks as I know this setup isn't supported, and I'm probably asking alot, don't
> think I'm just relying on the list for bizarre things, I've been trying various
> ways of doing this for the last 3 weeks, I can successfully run a vnc server on
> the box (without X running) and everything works, so for whatever reason it is
> getting a lower priority or something.  I really need to run GDM though as
> managing VNC passwords/usernames/desktop settings is quite cumbersome and if we
> can just get GDM running, we can use our ldap authentication server for logins
> to this box (which is what we were doing previously when we didn't have a PRI
> terminated on this box).

VNC is a protocol for remotely controling a desktop. There are several
ways of working with GDM. One useful way is to run a local XVnc server.
This requires no GDM at all, unless you want a separate user and
separate desktop for each real user (and waste tons of memory on that).

Still, why waste all of those resources of your * box?

-- 
Tzafrir Cohen         | New signature for new address and  |  VIM is
http://tzafrir.org.il | new homepage                       | a Mutt's  
tzafrir at cohens.org.il |                                    |  best
ICQ# 16849755         | Space reserved for other protocols | friend



More information about the asterisk-users mailing list