Apr 07 2009

整型INT

Category: 技术ssmax @ 18:21:18

java里面是32位:

static int MAX_VALUE
          A constant holding the maximum value an int can have, 231-1.
static int MIN_VALUE
          A constant holding the minimum value an int can have, -231.

 

mysql里面也是默认的32位:

M indicates the maximum display width for integer types

 

TINYINT[(M)] [UNSIGNED] [ZEROFILL]

A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255.

  • SMALLINT[(M)] [UNSIGNED] [ZEROFILL]A small integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535.
  • MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]A medium-sized integer. The signed range is -8388608 to 8388607. The unsigned range is 0 to 16777215.
  • INT[(M)] [UNSIGNED] [ZEROFILL]A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295.
  • INTEGER[(M)] [UNSIGNED] [ZEROFILL]This type is a synonym for INT.
  • BIGINT[(M)] [UNSIGNED] [ZEROFILL]A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615.SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.
  •  

    C的话就是看编译器了,32位就和java一样,现在基本都是32位的了,当初学TC的时候是16位的,造成一个错觉,一直都以为java的int类型虽然不是16位,但是也不够表示mysql里面的int,而且mysql里面int 是表示成 int(11) 的,而

    M indicates the maximum display width for integer types

    意思就是11表示的是mysql显示的列宽,而不是制定数据位数。。。以前竟然一直都以为11是指11位的十进制数,而32位的int最长是10位二进制,真是郁闷啊。。。哎,造成java编程的时候都用long来表示,不是一般的郁闷。。


    Mar 16 2009

    Asterisk 安装笔记(4)- 从程序发起呼出的几种方法

    Category: 技术ssmax @ 17:14:59

    如果没有sip或者iax客户端的话,只是写简单的程序来实现呼出,就没有固定的dialplan了。。。方法有如下几种:

     

    Automated dial out

    The Asterisk dial plan extensions.conf responds to someone calling an extension on a channel. If you want to initiate a call from an external application, there are several ways to do this.

    There are basically four ways to initiate outgoing calls in Asterisk

    • Use .call files. A call file is a text file that when placed in the correct directory makes Asterisk make an outgoing call.
    • Use the manager API to activate a call. See Asterisk manager dialout
    • Use the Asterisk CLI originate command
    • FollowMe command of Asterisk 1.4: Since this has the abitility to fork (create multiple calls) it could be ‘misused’ to initiate outgoing calls.

    See also additional Digium documents.


    Mar 11 2009

    Asterisk 安装笔记(3)- E1 on Dahdi 的配置

    Category: 技术ssmax @ 15:27:07

    安装好 dahdi之后,make config就会生成默认的配置文件

    /etc/dahdi/init.conf

    init.d自动启动脚本的配置,一般不需要改,以前是放在/etc/sysconfig下面的

     

    /etc/dahdi/modules

    需要加载的modules,看你的板卡型号,把不需要的注释掉

    我的是TE410P,使用 wct4xxp

    # Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1
    # Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
    # Digium TE220: PCI-Express dual-port T1/E1/J1
    # Digium TE420: PCI-Express quad-port T1/E1/J1
    wct4xxp

     

    /etc/dahdi/system.conf

    最重要的配置文件,里面参数很多,基本都有注释,很清楚的了。

    下面是我的情况,一条E1连接到该卡#1端口上面,配置如下

    # Span 1: TE4/0/1 “T4XXP (PCI) Card 0 Span 1” (MASTER) HDB3/CCS
    span=1,1,0,ccs,hdb3
    # termtype: te
    bchan=1-15,17-31
    dchan=16
    echocanceller=mg2,1-15,17-31

    # Global data

    loadzone        = no
    defaultzone     = no

     

    请参照你的E1,看看有没有用crc4,我配置了半天发现我的E1上面是不能加crc4的,郁闷死,嘿嘿。defaultzone  据说中国设置为no。

    另外echocanceller也很重要,这个是硬件的回音消除,TE410P就支持。

     

    /etc/modprobe.d/blacklist

    这个是modules 不加载的列表,默认是要先取消所有模块,然后再加载。不用改

     

    /etc/modprobe.d/dahdi

    这个是每个模块的特别设置,比如T1到E1的软跳线,4个端口,一个个跳

    The driver accepts parameter t1e1override and decimal value between 0 and 15 wich corespond to binary from 0000 to 1111 where each bit corespond to a span. 0 is T1 and 1 is E1.

    Decimal  |  Binary
          0       |   0000
          1       |   0001
          2       |   0010
          3       |   0011
          4       |   0100
          5       |   0101
          6       |   0110
          7       |   0111
          8       |   1000
          9       |   1001
          10     |   1010
          11     |   1011
          12     |   1100
          13     |   1101
          14     |   1110
          15     |   1111

    But how to know which port is configured for T1 or E1? Take a look at the picture below.

    Binary 0 0 0 0
    Spans 4 3 2 1

    debug就是调试信息输出到syslog

    noburst 就是是否开启突发传输,默认noburst=1就是关闭burst

     

    options wct4xxp t1e1override=15 debug=1 noburst=0
    options dahdi debug=1

     

     

    启动脚本:

    /etc/init.d/dahdi

     

     

    Asterisk 1.6的配置文件:chan_dahdi.conf

    [channels]
    language=en
    context=default

    switchtype=euroisdn
    pridialplan=national

    internationalprefix = +
    nationalprefix = +86
    localprefix = +8620
    privateprefix = +8620xxxxxxxx
    unknownprefix =

    signalling=pri_cpe
    usecallerid=yes
    hidecallerid=no
    callwaiting=yes
    callwaitingcallerid=yes
    threewaycalling=yes
    transfer=yes
    cancallforward=yes
    echocancel=yes
    rxgain=0.0
    txgain=0.0
    group=1
    callgroup=1
    pickupgroup=1
    immediate=no
    callprogress=no
    callerid=asreceived

    group=1
    context=default
    signalling=pri_cpe
    channel => 1-15,17-31

     

    详细的含义嘛,参看上一篇文档。


    Mar 11 2009

    Asterisk 安装笔记(2)- Zaptel 和 Dahdi 的配置

    Category: 技术ssmax @ 13:30:14

    Zap Channel Module Configuration

    The Zap channel module permits Asterisk to communicate with the Zaptel device driver, used to access Zaptel telephony interface cards. You configure Asterisk’s Zap channel module in the zapata.conf file.
    Zap channel模块允许Asterisk与zaptel驱动程序之间通讯。通过配置zapata.conf文件实现

    You will need the Zaptel kernel module device driver installed. See:

    Although TDMoE is not directly related to Zapata hardware, it uses a pseudo-TDM engine, and gets configured here.

    Using MySQL For Zap Channel Configuration

    It is possible to store configuration settings for the Zap channel driver in a MySQL table, rather than editing the zapata.conf text file. You will have to compile a version of Asterisk with this support built in. See:

    可以把zap channel而配置存储在mysql表中,而不是zapatap.conf中,这需要版本支持

     

    The rest of this page assumes you are editing the zapata.conf file by hand.

    Creating Channels

    The format of the zapata.conf file is unfortunately not as simple as it could be. Most keywords do not do anything by themselves; they merely set up the parameters of any channel definitions that follow. The channel keyword actually creates the channel, using the settings specified before it. For example, you might create two channels like this:
    zapata.conf文件,没有看上去那么复杂,大多数关键词自己不做什么,仅仅是定义通道参数,channel关键词才是真正的创建通道。

       signalling=fxo_ks
       language=en
       context=reception
       channel => 1

       signalling=fxo_ks
       language=fr
       context=sales
       channel => 2

    This creates channel 1 with a default language code “en” and a context “reception”. Channel 2 has a default language code “fr” and context “sales”.

    This is important, if you put something like echocancel=no before the channel definition, it will effect all channels unless you turn it on later with echocancel=yes. It progresses downward, but the definition must be above the channel=> statement.
    非常重要的是,如果例如在通道前定义echocancel=no,会使影响所有通道,直到定义echocancel=yes,他会往下执行,因此,定义必须在channel=>前面进行定义

    Available Settings

     

    Signalling Type

    The signalling type to use with your interface is the only mandatory setting. You must set a signalling type before allocating a channel. If you are connecting analog telephone equipment, note that analog phone signalling can be a source of some confusion. FXS channels are signalled with FXO signalling, and vice versa. Asterisk ‘talks’ to internal devices as the opposite side. An FXO interface card is signalled with FXS signalling by Asterisk, and should be configured as such.
    信令类型是唯一强制设置,在分配一个通道之前,必须定义信令类型。如果连接的模拟电话设备,注意模拟信令是导致混乱的来源。FXS通道采用FXO信令,反之,Asterisk通知内部设备采用相反方式。FXO接口卡采用FXS信令,同样须定义。

    signalling: Sets the channel signaling type. These parameters should match the Zaptel driver configuration. The setting to use depends partly on which interface card you have. Asterisk will fail to start if a channel signaling definition is incorrect or unworkable, if the statements do not match the Zaptel driver configuration, or if the device is not present or properly configured. The correct setting to use is almost certainly one of the following four: fxs_ks, fxo_ks, pri_cpe or pri_net. This setting has no default value; you must set a value before allocating a channel. Asterisk supports the following signalling types:
    signalling:设置通道信令类型,这些参数须与zaptel驱动配置匹配。设置基于采用什么样的板卡,如果通道信令设置错误,如果配置描述与zaptel驱动配置不匹配,或者如果卡不存在而配置正确,Asterisk不会工作。正确的设置通常包含下面4中信令中一种,fxs_ks, fxo_ks, pri_cpe or pri_net。该设置没有缺省值,必须在分配通道前设置信令值,下面是Asterisk支持的信令类型。

    • em: E & M Immediate Start
    • em_w: E & M Wink Start
    • em_e1: E & M CAS signalling for E1 lines
    • featd: Feature Group D (The fake, Adtran style, DTMF)
    • featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through a Tandem Access point
    • fgccama Feature Group C-CAMA (DP DNIS, MF ANI)
    • fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI)
    • featdmf: Feature Group D (The real thing, MF (domestic, US))
    • featb: Feature Group B (MF (domestic, US))
    • fxs_ls: FXS (Loop Start)
    • fxs_gs: FXS (Ground Start)
    • fxs_ks: FXS (Kewl Start)
    • fxo_ls: FXO (Loop Start)
    • fxo_gs: FXO (Ground Start)
    • fxo_ks: FXO (Kewl Start)
    • pri_cpe: PRI signalling, CPE side
    • pri_net: PRI signalling, Network side (for instance, side that provides the dialtone)
    • sf: SF (Inband Tone) Signalling
    • sf_w: SF Wink
    • sf_featd: SF Feature Group D (The fake, Adtran style, DTMF)
    • sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US))
    • sf_featb: SF Feature Group B (MF (domestic, US))
    • e911: E911 (MF) style signalling. Originating switch goes off-hook, far-end winks, originating sends KP-911-ST, far-end gives answer supervision, Originating-end sends KP-0-ANI-ST
    • The following are used for Radio interfaces:
    • fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the channel bank)
    • fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the channel bank)
    • fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the channel bank)
    • fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at the channel bank)
    • em_rx: Receive audio/COR on an E&M interface (1-way)
    • em_tx: Transmit audio/PTT on an E&M interface (1-way)
    • em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface (2-way)
    • em_rxtx: same as em_txrx (for our dyslexic friends)
    • sf_rx: Receive audio/COR on an SF interface (1-way)
    • sf_tx: Transmit audio/PTT on an SF interface (1-way)
    • sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface (2-way)
    • sf_rxtx: same as sf_txrx (for our dyslexic friends)
    PRI通道存在一个空闲Extension和一个微小闲置数字,只要闲置通道是空闲的,ZAP通道模块就会尝试在该通道上进行空闲拨号,然后Asterisk就会执行定义为idelext的Context和Extension中的命令。当通道需要进行语音呼叫时,’空闲’呼叫会断开并让多数通道有效。(当然尽管有微小闲置呼叫正在运行)。主要的用途是创建动态的服务,当闲置通道绑定了multilnk ppp协议后,将比传统的多重映射提供更有效率的提供综合的语音/数据服务。

    minunused: The minimum number of unused channels available. If there are fewer channels available, Asterisk will not attempt to bundle any channels and give them to the data connection. Takes an integer.
    minunused:最小可用闲置通道的数量。如果有很少的通道可用,Asterisk不会尝试捆绑任何通道进行数据连接。该参数需要一个整数。
    minidle: The minimum number of idle channels to bundle for the data link. Asterisk will keep this number of channels open for data, rather than taking them back for voice channels when needed. Takes an integer.
    minidle:最小绑定进行数据连接的通道数量,Asterisk会为数据开启这个通道数量,而不是在需要的时候返回到语音通道的使用上。该参数需要一个整数。

    idledial: The number to dial as the idle number. This is typically the number to dial a Remote Access Server (RAS). Channels being idled for data will be sent to this extension. Takes an integer that does not conflict with any other extension in the Dialplan, and has been defined as an idleext.
    idledial: 空闲拨号的数量,这是用于拨叫远程访问服务器最基本的一个数字,为数据预留的闲置通道被这个分机。该参数需要一个整数,与在拨号方案中定义了idleext的分机不会产生冲突。

    idleext: The extension to use as the idle extension. Takes a value in the form of exten@context. Typically, the extension would be an extension to run the ZapRAS command.
    idleext:用于空闲分机的extension,以exten@context的用法使用,典型的用法是被作为分机运行ZapRAS命令。
      minunused=2
      minidle=1
      idledial=6999
      idleext=6999@idle

     

    Analog Trunk Features (模拟中继特征)

    usedistinctiveringdetection: Whether or not to attempt to recognize distinctive ring styles on incoming calls. This does not require audio analyisis because rings are simple transitions of the analog line. It’s merely a matter of matching the transition pattern.
    usedistinctiveringdetection:是否尝试识别来电特殊铃音,这不需要音频分析,因为铃音在模拟线路上是非常简单转换,只需要匹配转换样本。缺省值:no
    Default: no.
       usedistinctiveringdetection=yes

    dring1, dring2, dring3: If you set usedistinctiveringdetection=yes, then you may define up to three different distinctive ring styles for Asterisk to attempt to recognize. Each style is defined as a comma separated list of up to three integers. Nobody has yet documented what these numbers mean, so you’re on your own when it comes to trying to figure out what numbers to use for the distinctive ring syles used by your phone company in your country. But the tip is to use the Asterisk console in verbose mode, and apparently it reports numbers describing the ring patterns it sees. These patterns may be a starting point:
    dring1, dring2, dring3:如果设置了usedistinctiveringdetection=yes,就需要定义三种不同特点的铃音风格,以便于Asterisk能够尝试识别。每种风格使用逗号分割三个整数来定义。没有文档说明三个数字的含义,因此需要自己测试鉴别在不同国家不同公司中,不同数字代表的风格。Asterisk控制台上也会显示识别的风格数字,具体风格可能会是以下一些情况。
       dring1=96,0,0
       dring2=325,95,0
       dring3=367,0,0

    dring1context, dring2context, dring3context: Along with setting up to three distinctive ring patterns with dring1, dring2 and dring3, you also set corresponding contexts for incoming calls matching those distinctive ring patterns to jump into. If an incoming call does not match any of the distinctive ring patterns defined, then of course it will enter Asterisk with the default context defined for this channel. 
    dring1context, dring2context, dring3context:根据三种不同的铃音风格设置不同的context进行来电跳转,如果来电没有定义的风格匹配,就会进入该通道缺省的congtext。
       dring1context=line2incoming
       dring2context=business
       dring3context=chocolate

    busydetect: If enabled, Asterisk will analyze the audio coming in on the line during a call or a dial attempt to attempt to recognize busy signals. This is useful on analog trunk interfaces both to detect a busy signal when dialing out, and for detecting when the person has hung up. See also Disconnect Supervision. Be sure that you don’t use this on digital interfaces like QuadBri cards and so on. Otherwise you will run in “broken calls” problems. default=no
    busydetect:忙音检测,如果开启,Asterisk会拨号尝试或通话中分析在线的音频,从而尝试识别忙音信号。这非常在模拟中继接口上外呼时检测忙音信号非常有用,可以检测何时挂机。确认不能在例如QuadBri等卡上使用该参数,否则出现中断通话的问题,缺省值:no

      busydetect=yes

    busycount: This option requires busydetect=yes. You can specify how many busy tones to wait before hanging up. The default is 3, but better results can be achieved if set to 6 or even 8. The higher the number, the more time is needed to detect a disconnected channel, but the lower the probability mistaking some other sound as being a busy tone.
      busycount=5
    busycount:这个选项需要busydetect=yes,可以定义等待挂机的忙音信号数量,缺省值是3,但能达到的最好效果可能是设置6或者8,数字越高,检测挂机通道所需要的时间就越长,但小的数字可能会导致把其他声音错误的识别为忙音信号。

    callprogress: Asterisk can attempt to monitor the state of the call to listen for a ringing tone, busy tone, congestion tone, and sounds indicating that the line has been answered. It appears that this feature is independent of the busydetect feature; it seems that both can run in parallel, and both will independently attempt to recognize a busy tone. The callprogress feature is highly experimental and can easily detect false answers, so don’t count on it being very accurate. Also, it is currently configured only for standard U.S. phone tones. Default: no. 
    callprogress:Asterisk可以通过尝试监控呼叫状态来侦听振铃音,忙音,拥塞音以及线路已经应答声音特征。这个特征不受busydetect特征影响,两者可以并行处理,独自尝试识别忙音信号。callprogress的特征是高实验证明更容易检测错误应答,所以不要指望它非常准确。因此,目前仅仅在标准美国电话铃音中配置,缺省值:no
      callprogress = yes

    pulse: The standard installation of Asterisk does not permit you to specify that a Zaptel device use pulse dialing, even though the Zaptel driver supports pulse dialing. But you can apply a patch file to enable you to specify pulse dialing with the pulse keyword. See Pulse Dialing on Zap Channels for the patch.
    pulse:Asterisk标准安装中,没有允许定义Zaptel卡使用脉冲拨号,尽管Zaptel驱动支持脉冲拨号,但可以更新补丁文件,使用pulse关键字去开启脉冲拨号。
       pulse=yes

    Analog Handset Features 模拟电话特征

    adsi: If your handset has ADSI (Analog Display Services Interface) capability, set set adsi=yes. The ADSI specification is system similar to Caller ID to pass encoded information to an analog handset. It allows the creation of interactive visual menus on a multiline display, offering access to services such as voicemail through a text interface.
    adsi:如果手持设备支持ADSI(模拟显示服务接口),设置set adsi=yes,ADSI类似来电显示功能,传递编码信息到手持设备。它可以在多行显示的手持设备上创建交互式可视化菜单,通过文本接口提供类似语音邮件的访问服务。

    immediate: Normally (i.e. with immediate set to ‘no’, the default), when you lift an FXS handset, the Zaptel driver provides you a dialtone and listens for digits that you dial, passing them on to Asterisk. Asterisk waits until the number you’ve dialed matches an extension, and then begins executing the first command on the matching extension. If you set immediate=yes, then Asterisk will instruct the Zaptel driver to not generate a dialtone when you lift a handset, instead passing control immediately to Asterisk. Asterisk will start executing the commands for this channel’s “s” extension. This is sometimes referred to as “batphone mode”. Default: no.
    immediate:通常(immediate设置为no,缺省值),当FXS话机挂机时,Zaptel驱动会马上提供拨号音,等待拨号并传递给Asterisk。Asterisk等到接收到extension匹配号码时,就会开始执行相应的命令,如果设置 immediate=yes,Asterisk会命令Zaptel驱动不要在FXS挂机时产生拨号音,而是把控制权交还给Asterisk,Asterisk会开始执行这个通道的s extension。这通常应用于batphone 模式(蝙蝠电话?),缺省No
       immediate=yes

    callwaiting: If enabled, Asterisk will generate “call waiting pips” when you are already in a conversation on your FXS handset when someone tries to call you. If the channel has call waiting by default, you can temporarily disable it by lifting the handset and dialing *70, whereupon you will get a dialrecall tone and may then dial the intended number. There is no corresponding way to temporarily enable call waiting for channels that have it off by default. Default: no.
    callwaiting:如果开启,在通话过程中如果有来电时,Asterisk就会产生呼叫等待提示音。如果通道缺省有呼叫等待,可以临时摘机按键*70取消,这种情况下,会收到重播提示音去拨打希望拨打的号码。没有合适的方法临时开启缺省设置为关闭的通道的呼叫等待。缺省为no
       callwaiting=yes

    callwaitingcallerid: Sets whether Asterisk will send Caller ID data to the handset during call waiting indication. Requires also setting callwaiting=yes. Default: no.
    callwaitingcallerid:设置在呼叫等待过程中是否传送主叫号码等数据,需要设置callwaiting=yes,缺省值:no
       callwaitingcallerid=yes

    threewaycalling: If enabled, you can place a call on hold by pressing a hook flash, whereupon you get a dialrecall tone and can make another call. Default: no.
    threewaycalling:(三方通话)如果设置开启,可以在按保持键切换话路,让原通话处于保持状态,这时会收到重拨提示音,并开启另外一方通话。缺省值:no
       threewaycalling=yes

    transfer: This option has effect only when threewaycalling=yes. If threewaycalling=yes and transfer=yes, then once you’ve placed a call on hold with a hook flash, you can transfer that call to another extension by dialing the extension and hanging up. Default: no.

    transfer:(呼叫转接)这个选项仅当三方通话=yes时有效,当设置了三方通话和呼叫转接,一旦通过或呼叫保持按键把当前话路置于保持状态,就可以拨号呼叫另外分机,把2个话路桥接起来,然后挂机。缺省值:no
       transfer=yes

    cancallforward: If enabled, you may activate “call forwarding immediate” by dialing *72 (whereupon you get a dialrecall tone) followed by the extension number you wish to forward your calls to. If someone dials your extension, the call will be redirected to the forwarding number. You may disable the call forwarding by dialing *73. Default: no.
    cancallforward:如果呼叫前转启用,可以通过拨号*72+想要转向的Extension,立刻激活呼叫前转(同时会有重拨提示音),这时如果有来话,那么呼叫会被重定向到设置的转移号码上,可以通过拨打*73取消呼叫前转。缺省值:no
       cancallforward=yes

    callreturn: If enabled, you may dial *69 to have Asterisk read to you the caller ID of the last person to call. You will hear the dialrecall tone if there is no record of a last caller. Default: no.
    callreturn:如果开启此设置,可以通过拨打*69让Asterisk读出最后呼入的主叫号码,如果没有记录最后呼叫主叫号码,将听到重拨提示音,缺省值:no
       callreturn=yes

    callgroup: A channel may belong to zero or more callgroups. Callgroups specify who may answer this phone when it is ringing. If this channel is ringing, then any other channel whose pickupgroups include one of this channel’s callgroups may answer the call by dialing *8#. This feature is supported by Zap, SIP, Skinny and MGCP channels. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups. 
    callgroup:通道可以不属于或者属于多个呼叫群组。呼叫群组定义了当电话振铃时,谁可以接听。当一个通道振铃时,其它那些pickupgroups中包含该通道callgroups其中之一的通道可以通过按*8#来接听电话。这个特性支持在ZAP,SIP。skinny和MGCP通道类型上使用,群组数字范围为0-31,,缺省值是空字符串,即没有组。
      group=1
      callgroup=1,2,3

    pickupgroup: A channel may belong to zero or more pickupgroups. Pickupgroups specify whose phones you may answer. If another channel is ringing, and this channel’s pickupgroups include one of the ringing channel’s callgroups, then this channel may answer the call by dialing *8#. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
    pickupgroup:通道可以不属于或者属于多个摘机群组,摘机群组定义了可以应答那些电话。如果其他通道振铃,而本通道pickupgroup是振铃通道callgroups群组其中之一,那么本通道可以通过按*8#来接听振铃通道。群组范围为0-31,缺省值为空字符串,即没有群组。
      group=1

    See more about Channels and Groups

    If you dial *8# when there is more than one channel whose calls you are eligible to answer, then it just answers the “first ringing channel”, i.e. you have no control which one you pick up. 
    如果同时不止一路通道振铃符合条件可以通过按键*8#接听,只能接听第一条振铃通道,即不能控制选择接听哪一条。
      pickupgroup=3,4

    useincomingcalleridonzaptransfer: If you set this option (Use Incoming Caller ID On Zap Transfer) to ‘yes’, then when you transfer a call to another phone, the original caller’s Caller ID will get forwarded on too. Default: no.
    useincomingcalleridonzaptransfer:如果设置了这个选项(在ZAP通道上启用来电转接),可以转接来电到另外一个电话,外部呼叫的主叫号码同时跟随。
       useincomingcalleridonzaptransfer=yes

    Caller ID Options

    callerid: Sets the Caller ID string to forward to the recipient when calls come in from this channel. You normally use this to set the Caller ID for handsets. Specify the Caller ID name in double quotation marks, followed by the Caller ID number in <> symbols. For trunk lines, set to “asreceived” to pass the received Caller ID forward.
    callerid:当来电时设置主叫ID字符串,传送给接收者,通常为手持设备设置callerID。定义callerid:双引号名字后紧跟角括号数字,对中继线路,设置asreceived来传送主叫ID。
      callerid=”Mark Spencer” <256 428-6000>
      callerid=
      callerid=asreceived

    Important Note: Caller ID can only be transmitted to the public phone network with supported hardware, such as a PRI. It is not possible to set external caller ID on analog lines.
    重要事项:CallerID只能在硬件支持的公共电话交换网上被传输,例如PRI。在模拟线路上设置外部CallerID是不可能的。
    usecallerid: For handsets, this option will cause Asterisk to send Caller ID data to the handset when ringing it. For trunk lines, this option causes Asterisk to look for Caller ID on incoming calls. Default: yes.
    usecallerid:对于手持设备,这个选项可以在振铃时让Asterisk发送CallerID数据到到手持设备,对于中继线路,该选项致使Asterisk查找来电主叫ID,缺省值:yes
       usecallerid=no

    hidecallerid: (Not for FXO trunk lines) For PRI channels, this will stop the sending of Caller ID on outgoing calls. For FXS handsets, this will stop Asterisk from sending this channel’s Caller ID information to the called party when you make a call using this handset. FXS handset users may enable or disable sending of their Caller ID for the current call only by lifting the handset and dialing *82 (enable) or *67 (disable); you will then get a “dialrecall” tone whereupon you can dial the number of the extension you wish to contact. Default: no.

    hidecallerid:主叫ID隐藏(不能应用于FXO中继线路),对于PRI通道,在外呼时停止传送主叫ID。对于FXS端外呼时,会停止发送主叫ID信息到被叫方。FXS端可以在话机上按*82(启用)*67(关闭)可以控制是否传送主叫ID传送。
       hidecallerid=yes

    restrictcid: (PRI channels only) This option has effect only when hidecallerid=no. If hidecallerid=no and restrictcid=yes, Asterisk will prevent the sending of the Caller ID data as a presentation number when making outgoing calls (ANI data is still sent). Default: no.
    restrictcid:(仅用于PRI通道),该选项在hidecallerid=no时可以有效设置,如果hidecallerd=no并且restrictcid=yes,外呼时,asterisk会阻止以显示号码方式发送主叫id,但ANI消息数据仍然发送),缺省为no
       restrictcid=yes

    usecallingpres: (PRI channels only) Whether or not to use the Caller ID presentation for the outgoing call that the calling switch is sending. See also the CallingPres command. Read more in this discussion from 2003.
    usecallingpres:(仅PRI通道有效)不管是否把callerid作为外呼的显示号码,交换机都会传送。
       usecallingpres=no

    Audio Quality Tuning Options (音频质量调整选项)

    These options adjust certain parameters of Asterisk that affect the audio quality of Zapata channels. See also:

    relaxdtmf: If you are having trouble with DTMF detection, you can relax the DTMF detection parameters. Relaxing them may make the DTMF detector more likely to have “talkoff” where DTMF is detected when it shouldn’t be. Default: no.
    relaxdtmf:如果DTMF检测有问题,可以放宽DTMF检测的参数。
       relaxdtmf=yes

    echocancel: Disable or enable echo cancellation (default is ‘yes’). It is recommended that you do not turn this off. You may specify echocancel as ‘yes’ (128 taps), ‘no’ (0 taps, disabled), or a preset number of taps which are one of 16, 32, 64, 128, or 256. Each tap is one sample from the data stream, so on a T1 this will be 1/8000 of a second. Accordingly the number of taps equate to a 2ms, 4ms, 8ms, 16ms or 32ms tail length. Beware that if you set echocancel to a different value, Asterisk will fall back to the default of 128 taps without warning.
    echocancel:开启或关闭回音消除(缺省值:是),建议不要关闭该设置,可以定义回音消除yes(128滤波参数)或者no(0滤波),或者定义参数为16,32,64,128,256中一个,每种滤波参数都是一种数据流样本,在T1线路上会是每秒1/8000,因此滤波参数值等于2ms,4ms,8ms,16ms,32ms尾长,如果设置的回音消除为不同的值,Asterisk将直接使用128而不会警告。
       echocancel=no

    echocancelwhenbridged: Enables or disables echo cancellation during a bridged TDM call. In principle, TDM bridged calls should not require echo cancellation, but often times audio performance is improved with this option enabled. Default: no.
    echocancelwhenbridged:开启或关闭在桥接的TDM呼叫中的回音消除,原则:TDM桥接呼叫不需要回音消除,但开启这个选项通常可以提高语音效果。
       echocancelwhenbridged=yes

    echotraining: In some cases, the echo canceller doesn’t train quickly enough and there is echo at the beginning of the call which then quickly fades out. Enabling echo training will cause Asterisk to briefly mute the channel, send an impulse, and use the impulse response to pre-train the echo canceller so it can start out with a much closer idea of the actual echo. However, the characteristics of some trunks may change as the endpoints become connected and, if there is a considerable delay between the circuit being ‘up’ and the endpoints being finalised, the training impulse may measure the characteristics of the open trunk rather than the completed circuit. Accordingly you may either specify a value between 10ms and 4000ms to delay before starting the impulse response process or ‘yes’, which equates to 400ms. Default: undefined.
    echotraining:有时回音消除不能够很快的自学习,通话开始时会有回音,然后很快消除。开启回音训练可以让Asterisk使通道暂时无声而发送一个刺激信号,并根据响应效果预训练回音消除,从而能够更接近真实的回音。然而如果在电路up和终端响应定位之间有相当的延时,某些典型中继被会作为终端进行连接,训练刺激信号会检测open中继的特性而不是实际电路。因此,在开始响应刺激信号处理之前,可以在10ms和4000ms延时之间定义一个值,或者定义yes,缺省就是400ms。默认值没有定义。
       echotraining=no

    rxgain: Adjusts receive gain. This is the audio recieved by Asterisk from the device. E.g: in a phone connected to a FXS channel, this would control the audio that is sent from the phone to Asterisk. This can be used to raise or lower the incoming volume to compensate for hardware differences. You specify gain as a decimal number from -100 to 100 representing dB. 10 is significantly high. Change these options by only a few dB at a time. Default value: 0.0
    rxgain:调整接收获取强度值,这是指Asterisk从例如连接到FXS通道上的电话设备上接收到的音频,该选项能控制由电话发送给Asterisk的音频,可以用于提高或降低进入的声音音量,从而补偿硬件损耗。可以定义获得值从-100db到100db,10db就意味着很高了。修改时应进行微调。
       rxgain=4.2

    txgain: Adjusts transmit gain. This is the audio transmitted by Asterisk to the device. E.g: in a phone connected to a FXS device this would control the audio that is heard in the handset. This can be used to raise or lower the outgoing volume to compensate for hardware differences. Takes the same type of argument as rxgain. Default: 0.0
    txgain:调整传出强度值,这是指由Asterisk发送给连接到FXS上的电话等设备的音频,Asterisk可以控制音频音量传送给手持设备端收听。这用于提高或降低外呼音量从而降低设备损耗。使用方法参数雷同fxgain,缺省值为0.0
       txgain=-10.2

    See: Asterisk zapata gain adjustment

    Call Logging Options

    Asterisk normally generates Call Detail Records (CDR), being a log or database of the calls made through Asterisk. This data can be used for Automated Machine Accounting (AMA). See Asterisk Billing.
    Asterisk通常会产生详单记录,记录是由Asterisk呼叫产生的,以日志或数据库存储。通话详单记录可以用作自动记账AMA。

    accountcode: Sets the data for the “account code” field in the CDR for calls placed from this channel. The account code may be any alphanumeric string. It may be overridden at call time with the Asterisk cmd SetAccount|SetAccount command.
    accountcode:设置通话详单中account code字段的数据,用于通道呼叫处理。计费代码可以是数字和文字字符串,可能在呼叫时被Asterisk命令setaccount重置。
      accountcode=spencer145

    amaflags: Sets the AMA flags, affecting the categorization of entries in the call detail records. Possible values are:
    amaflags:设置AMA自动记账标记,影响通话详单中的分类条目。

    • default: Let the CDR system use its default value.  (CDR采用缺省值)
    • omit: Do not record calls.  (不记录)
    • billing: Mark the entry for billing (产生记账条目)
    • documentation: Mark the entry for documentation. (标记条目文档)

      amaflags=billing

    Timing Parameters (定时参数)

    These keywords are used only with (non-PRI) T1 lines. All values are in milliseconds. These do not need to be set in most configurations, as the defaults work with most hardware. It has been noted that the common Adtran Atlas uses long winks of about 300 milliseconds, and channels from them should be configured accordingly.
    这个关键字仅用于T1线路,不包含pri。
    prewink: Sets the pre-wink timing.
    preflash: Sets the pre-flash timing.
    wink: Sets the wink timing.
    rxwink: Sets the receive wink timing.
    rxflash: Sets the receive flash timing.
    flash: Sets the flash timing.
    start: Sets the start timing.
    debounce: Sets the debounce timing. “The debounce settings in the Asterisk configuration affects how Asterisk
    handles hookswitch transitions on its FXO/FXS interfaces.” — Derek Bruce

      rxwink=300
      prewink=20~~

    Other Features

    mailbox: If this option is defined for a channel, then when the handset is lifted, Asterisk will check the voicemail mailbox(es) specified here for new (unheard) messages. If there are any unheard messages in any of the mailboxes, Asterisk will use a stutter dialtone rather than the ordinary dialtone. On supported hardware, the message waiting light will also be activated — this probably requires that you also set adsi=yes. Update: This option does NOT require ADSI. It will send a standard FSK tone down the line that lights up the MWI on any capable analog phone.
    mailbox:这个选项为通道定义的。当摘机时,Asterisk会检测语音邮箱中未读的邮件。如果有未读邮件,Asterisk会有摘机警告音而不是通常的拨号音。在支持的硬件上,等待消息同样激活,这需要设置adsi=yes。这个选项不需要ADSI支持,它会发送一个 标准的频移键控提示音(也称为移频调制和移频信号)来挂掉支持WMI(消息等待支持)的模拟线路。

    The parameters to this option are one or more comma-separated mailbox numbers, as defined in voicemail.conf.

       mailbox = 1234
       mailbox = 1,2

    For each mailbox, if the mailbox is in a context other than “default”, place the context after the mailbox number
    separated by an at sign (@).
    如果语音邮件不是在default而是在context,按照mailbox@context的格式

       mailbox = 1234@office
       mailbox = 12@office,34@home

    group: Allows you to group together a number of channels so that the Dial command will treat the group as a single channel. When Dial tries to make a call on a Zap group, the Zap channel module will use the first available (i.e. non-busy) channel in the group for the call. Multiple group memberships may be specified with commas, and to signify no group membership, the portion after the equals sign may be omitted. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
    group:允许把多个通道组成一组,Dial命令拨号的时候把群组视为一个单一通道。当Dial试图在ZAP组上拨号时,Zap通道模块使用组中第一个可用通道。多群组关系可以通过逗号来定义,等号后面省略表示没有群组。群组范围从0-31,缺省值时空字符串,即没有群组。

       group=1
       group=2,3
       group=

    See more about Channels and Groups

    language: Each channel has a default language code that affects which language version of prerecorded sounds Asterisk uses for this channel. See Setting up a Multi-Language Asterisk Installation. The default is an empty string.
    language:每个通道有一个缺省的语言编码,这是由预先录制声音的语言版本来定义的
       language=en

    progzone: This defines the timing and frequencies for call progress detection, which are buried in the sources in asterisk/dsp.c. This is DIFFERENT than the call progress timing defined in zaptel/zonedata.c and in /etc/asterisk/indications.conf, and so far only options you can use (defined in dsp.c) are us, ca, br, cr and uk. (This was added sometime between 1.0.9 stable and 1.2 beta). Default is: us
    progzone:该选项为呼叫处理检测(在asterisk/dsp.c源代码中)定义了时间和频率,这与在zaptel/zonedata.c和/etc/asterisk/indications.conf中的定时呼叫处理不同。到目前为止该参数只能是:us,ca,br,uk,缺省是us

    Important Stuff

    context: This specifies which context a call will start in. The context controls how Asterisk will handle the call. Contexts are defined in the Dialplan. Default: “default”.
    context:定义了呼叫开始的context,context控制Asterisk如何处理呼叫。Context在dialplan中定义,缺省为”default”
       context=internal

    channel: This keyword is unlike all the other keywords in this configuration file, because where all the other keywords merely specify settings to use, this keyword causes Asterisk to actually allocate a channel with the settings that have been specified earlier in the file.
    channel:这个关键字与配置文件中的其他关键字不同。原因是其他关键字仅仅定义设置来使用,这个关键字可以使Asterisk把前面定义的设置分配到通道中。

    The channel keyword defines one or more channels. Each channel definition will inherit all options stated ahead of it in this file. Channels maybe specified individually, separated by commas, or as a range separated by a hyphen. Allocating a channel will not “clear” the settings, so any channels defined later on in this file will inherit the options for this channel unless you override settings.
    通道关键字定义一个或多个通道,每行通道定义都会继承前面所有的选项配置状态。通道可以通过逗号分离单独定义,或者用连接符连接一组,分配通道不会清空设置,所以任何在后面定义的通道都会继承前面的选项除非覆盖设置。

       channel => 16
       channel => 2,3
       channel => 1-8


    Mar 10 2009

    asterisk 安装笔记(1)

    Category: 技术ssmax @ 21:04:10

    今天终于要搞asterisk了,用的是digium 的卡,所以要装dahdi驱动,debian下面安装过程:

    1、安装内核源码

    apt-get install linux-source-2.6.18

    cd /usr/src

    tar -xjf linux-source-2.6.18.tar.bz2

    解压得到/usr/src/linux-source-2.6.18

     

    2、源码连接到modules目录

    cd /lib/modules/2.6.18-6-686

    ln -s /usr/src/linux-source-2.6.18 build

     

    3、进行配置和预编译

    cd /usr/src/linux-source-2.6.18

    vi Makefile

    找到EXTRAVERSION 改为

    EXTRAVERSION = -6-686

    这个是 uname -r 显示的内核版本,里面的扩展字段,这个在后面安装的时候有点用吧,毕竟很多人的内核都是系统装好的,没有源代码的。

    如果这里不修改,后面install的时候modules会安装在/lib/2.6.18/下面,虽然也能insert ,但是可能以后会有点问题啦,呵呵

    make oldconfig

    make prepare scripts

    这步比较重要。。。因为用到genksyms等脚本,如果用

    make prepare 或者 make prepare-all 都不会编译出来。。。这里搞得比较郁闷。。。

     

    4、下载dahdi-linux-complete-2.1.0.4+2.1.0.2.tar.gz

    解压,cd,

    make all

    make install

    make config

    然后配置好/etc/dahdi/*

    /etc/init.d/dahdi start

    启动,明天再搞配置文件了,嘿嘿。。。。


    Feb 27 2009

    apache + fastcgi + php 安装要点

    Category: 技术ssmax @ 14:32:46

    这两天在新机器上面装了apache和php,原来用的是so module的模式运行php,因为php建议使用prefock mpm,这样子每个apache 的进程都会加载php module,造成占用内存过大,如果站点静态内容多的话,个人觉得太耗资源了,apache单线程一般是4-5m,加载了php之后是20M以上,汗啊。。。这样子1G内存也开不了多少进程。。。

    最后决定用fastcgi方式执行php了,按需才生成,而且是用fastcgi的动态模式,方便进程管理。

    具体步骤如下:

    1、编译apache,一般我用的参数是:

    ./configure –prefix=/home/apache2 –enable-modules=most –enable-mods-shared=most –enable-ssl –enable-so

    make

    make install

    2、编译php,如果要用fastcgi,就不能加–with-apxs2

    ‘./configure’ ‘–prefix=/home/php’ ‘–enable-fastcgi’ ‘–with-mysql’ ‘–with-openssl’ ‘–with-zlib’ ‘–with-gd’ ‘–with-curl’ ‘–with-bz2’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-freetype-dir’ ‘–enable-gd-native-ttf’ ‘–enable-force-cgi-redirect’

    make

    make install

    cp php.ini-recommended /home/php/lib/php.ini

    3、编译mod_fastcgi,最新的也是2007年的版本了。。。还好apache 2.2 一样能用。

    cp Makefile.AP2 Makefile

    vi Makefile 把涉及到apache的目录全部改成/home/apache2,就是上面的apache安装目录

    make

    make install

    4、配置apache的httpd.conf

    在Server全局配置:

    LoadModule fastcgi_module     modules/mod_fastcgi.so
    FastCgiIpcDir /tmp/fastcgi

    FastCgiConfig -appConnTimeout 30 -maxClassProcesses 128 -maxProcesses 128 -restart
    ScriptAlias /php-go-fcgi-bin/ /home/apache2/cgi-bin/
    <Directory “/home/apache2/cgi-bin”>
        SetHandler fastcgi-script
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>

    Action application/x-httpd-php /php-go-fcgi-bin/php

     

    然后在需要支持php的vhost里面加上:

    AddType application/x-httpd-php .php .phtml

     

    这样就可以支持php了。

     

    最后还要制定cgi脚本的位置,上面的配置制定了的是cgi-bin下面,可以ln -s来支持,但是这样如果直接访问这个php文件的话,会造成下载php-cgi执行文件的问题,所以就用了一个shell脚本来执行,这样子直接访问的话fastcgi就只会显示这个shell脚本。

    vi /home/apache2/cgi-bin/php

    #!/bin/sh

    exec /home/php/bin/php-cgi

     

    chmod a+x /home/apache2/cgi-bin/php

     

    5、启动apache,/home/apache/bin/apachectl start 完事。

     

    附上mod_astcgi动态的配置说明:

    FastCgiConfig

    Syntax: FastCgiConfig option [option ...]
    Context: server config

    The FastCgiConfig directive defines the default parameters for all dynamic FastCGI applications. This directive does not affect static or external applications in any way.

    Dynamic applications are not started at server initialization, but upon demand. If the demand is heavy, additional application instances are started. As the demand fades, application instances are killed off. Many of the options govern this process.

    Option can be one of (case insensitive):

    -appConnTimeout n (0 seconds)
    Unix:  The number of seconds to wait for a connection to the FastCGI application to complete or 0 to indicate a blocking connect() should be used. Blocking connect()s have an OS dependent internal timeout. If the timeout expires, a SERVER_ERROR results. For non-zero values, this is the amount of time used in a select() to write to the file descriptor returned by a non-blocking connect(). Non-blocking connect()s are troublesome on many platforms. See also -idle-timeout, it produces similar results but in a more portable manner.
    Windows NT:  TCP based applications work as above. Named pipe based applications (static applications configured without the -port option and dynamic applications) use this value successfully to limit the amount of time to wait for a connection (i.e. it’s not “troublesome”). By default, this is 90 seconds (FCGI_NAMED_PIPE_CONNECT_TIMEOUT in mod_fastcgi.h).
    -autoUpdate (none)
    Causes mod_fastcgi to check the modification time of the application on disk before processing each request. If the application on disk has been changed, the process manager is notified and all running instances of the application are killed off. In general, it’s preferred that this type of functionality be built-in to the application (e.g. every 100th request it checks to see if there’s a newer version on disk and exits if so). There may be an outstanding problem (bug) when this option is used with -restart.
    -flush (none)
    Force a write to the client as data is received from the application. By default, mod_fastcgi buffers data in order to free the application as quickly as possible.
    -gainValue n (0.5)
    A floating point value between 0 and 1 used as an exponent in the computation of the exponentially decayed connection times load factor of the currently running dynamic FastCGI applications. Old values are scaled by (1 - gainValue), so making it smaller weights old values more than the current value (which is scaled by gainValue).
    -idle-timeout n (30 seconds)
    The number of seconds of FastCGI application inactivity allowed before the request is aborted and the event is logged (at the error LogLevel). The inactivity timer applies only as long as a connection is pending with the FastCGI application. If a request is queued to an application, but the application doesn’t respond (by writing and flushing) within this period, the request will be aborted. If communication is complete with the application but incomplete with the client (the response is buffered), the timeout does not apply.
    -initial-env name[=[value]] (none)
    A name-value pair to be passed in the initial environment when instances of applications are spawned. To pass a variable from the Apache environment, don’t provide the “=” (if the variable isn’t actually in the environment, it will be defined without a value). To define a variable without a value, provide the “=” without any value. The option can be used repeatedly.
    -init-start-delay n (1 second)
    The minimum number of seconds between the spawning of instances of applications. This delay decreases the demand placed on the system at server initialization.
    -killInterval n (300 seconds)
    Determines how often the dynamic application instance killing policy is implemented within the process manager. Smaller numbers result in a more aggressive policy, larger numbers a less aggressive policy.
    -listen-queue-depth n (100)
    The depth of listen() queue (also known as the backlog) shared by all instances of applications. A deeper listen queue allows the server to cope with transient load fluctuations without rejecting requests; it does not increase throughput. Adding additional application instances may increase throughput/performance, depending upon the application and the host.
    -maxClassProcesses n (10)
    The maximum number of dynamic FastCGI application instances allowed to run for any one FastCGI application. It must be <= to -maxProcesses (this is not programmatically enforced).
    -maxProcesses n (50)
    The maximum total number of dynamic FastCGI application instances allowed to run at any one time. It must be >= to -maxClassProcesses (this is not programmatically enforced).
    -min-server-life n (30)
    The minimum number of seconds a dynamic FastCGI application must run for before its restart interval is increased to 600 seconds. The server will get 3 tries to run for at least this number of seconds.
    -minProcesses n (5)
    The minimum total number of dynamic FastCGI application instances allowed to run at any one time without being killed off by the process manager (due to lack of demand).
    -multiThreshold n (50)
    An integer between 0 and 100 used to determine whether any one instance of a FastCGI application should be terminated. If the application has more than one instance currently running, this attribute will be used to decide whether one of them should be terminated. If only one instance remains, singleThreshold is used instead.
    For historic reasons the mis-spelling multiThreshhold is also accepted.
    -pass-header header (none)
    The name of an HTTP Request Header to be passed in the request environment. This option makes available the contents of headers which are normally not available (e.g. Authorization) to a CGI environment.
    -priority n (0)
    The process priority to be assigned to the application instances (using setpriority()).
    -processSlack n (5)
    If the sum of the number of all currently running dynamic FastCGI applications and processSlack exceeds maxProcesses, the process manager invokes the killing policy. This is to improve performance at higher loads by killing some of the most inactive application instances before reaching maxProcesses.
    -restart (none)
    Causes the process manager to restart dynamic applications upon failure (similar to static applications).
    -restart-delay n (5 seconds)
    The minimum number of seconds between the respawning of failed instances of applications. This delay prevents a broken application from soaking up too much of the system.
    -singleThreshold n (0)
    An integer between 0 and 100 used to determine whether the last instance of a FastCGI application can be terminated. If the process manager computed load factor for the application is lower than the specified threshold, the last instance is terminated. In order to make your executables run in the “idle” mode for the long time, you would specify a value closer to 1, however if memory or CPU time is of primary concern, a value closer to 100 would be more applicable. A value of 0 will prevent the last instance of an application from being terminated; this is the default value, changing it is not recommended (especially if -appConnTimeout is set).
    For historic reasons the mis-spelling singleThreshhold is also accepted.
    -startDelay n (3 seconds)
    The number of seconds the web server waits patiently while trying to connect to a dynamic FastCGI application. If the interval expires, the process manager is notified with hope it will start another instance of the application. The startDelay must be less than appConnTimeout to be effective.
    -updateInterval n (300 seconds)
    The updateInterval determines how often statistical analysis is performed to determine the fate of dynamic FastCGI applications.


    Feb 27 2009

    svn 安装要点

    Category: 技术ssmax @ 14:14:31

    1、需要使用 berkeley db的话,需要安装db4和db4-devel,一般yum或者apt都能找到,然后configure的时候一定要指定 –with-berkeley-db ,否则很多时候都不会编译进去。

    2、和apache的结合问题,通常编译之后不成功,就是和apache的结合有问题,经常表现为apr和apr-util版本不对,所以最好保留apache编译时候的源码包(很多时候就算去下载一样版本的apr都是有问题的,因为apache自己就改过),找到srclib下面的apr和apr-util,拷贝到subversion源码根目录,然后进入apr和apr-util目录,各make clean一次(因为你的apache装的时候make过一次了),然后configure的时候只要制定–with-apxs=pathToApacheApxs,不要制定apr和apr-util,它就会自己找源代码装的了。

    3、客户端用neon和ssl的问题,下载最新的neon源码包,然后放在subversion源码根目录下面,configure的时候加上–with-neon=./neon –with-ssl 就可以了。


    Feb 25 2009

    Real Time JVM 实时JAVA虚拟机

    Category: 技术ssmax @ 12:31:50

    记得一年前去sun的研讨会,说到java实时虚拟机,貌似很强大的,今天无意中找到几款,下载来研究研究,嘿嘿

    第一个就是BEA的JRockit real time,因为普通的JRockit jvm已经整合到WebLogic 里面的,如果不想下载700多M的WebLogic ,real time就是另外一个选择了,填了一大张表才能下载到

    http://www.oracle.com/technology/software/products/jrockit/index.html

    jrrt-3.0.0-1.6.0-linux-ia32.bin

    和标准的jvm一样,chmod a+x jrrt-3.0.0-1.6.0-linux-ia32.bin; ./jrrt-3.0.0-1.6.0-linux-ia32.bin

    然后就可以安装了,用来跑resin,jira也没有什么问题,有空找些大项目来试验试验,嘿嘿

     

    第二个就是IBM的jvm real time,是隐藏在WebSphere Real Time V2.0 32-bit xSeries (Intel compatible)

    里面的,文件是

    ibm-wrt-i386-sdk-2.0-0.0.i386.rpm

    也是一堆表格要填写才给你下载。。。

    http://www.ibm.com/developerworks/java/jdk/linux/download.html

     

    第三个就是sun自己的jrts了,90天的试用期,研究用可以无限

    http://java.sun.com/javase/technologies/realtime/rts/

     

    实时虚拟机增加了很多功能,好像内存控制方面的,垃圾回收方面的,不过这些都要求你写新的代码,所以通用的话估计还是没什么大效果。


    Feb 13 2009

    几款java反编译软件

    Category: 技术ssmax @ 21:37:56

    这几年用了好几款java反编译工具,现在罗列如下:

    1、最早用的是DJ JAVA DECOMPILER,现在最新版本是3.10.10.93,很强大的,破解一般就靠它了,可惜没有eclipse的插件

    http://members.fortunecity.com/neshkov/dj.html

     

    2、Jad,一款很快速的反编译工具,但是有很多类都反编译不出来,而且也没有什么维护了,2006年的,不过就有JadClipse,也是我用的第一款eclipse里面的反编译工具。

    http://www.kpdus.com/jad.html

    http://sourceforge.net/projects/jadclipse

     

    3、JodeEclipse 也是一款基于eclipse的反编译工具,不用另外装什么exe,也挺好用,不过也是没有更新很久了。

    http://sourceforge.net/projects/jodeeclipse

     

    4、JD,有windows版本的,基于C++,有eclipse版本的JD-Eclipse,今天刚开始用,看起来还不错,嘿嘿。

    http://java.decompiler.free.fr/

     

    5、还有一款没有用过,但是听说过的,是DAVA,是Soot的一部分,没用过,也不清楚。

    http://www.sable.mcgill.ca/dava/

     

    因为java太容易反编译了,所以工具也特别多,下面的网站有一个很全的列表。。。不过估计大多数都是不更新的了

    http://www.java-decompiler.com/


    Feb 06 2009

    真假raid列表

    Category: 技术ssmax @ 09:56:40

    所谓的假raid,就是fake raid,没有集成io控制芯片的,还是要通过cpu和系统驱动来运算的。真的硬件raid其实也不贵,列表区别一下,以后可以买来玩玩。

     

    • (link) 3Ware Escalade 9xxx (e.g., 9500S-4 4-port, 9500S-8 8-port, 9500S-8MI 8-port, 9500S-12 12-port, 9500S-12MI 12-port) and 8xxx family (e.g., 8506, 8006, 8006-2LP 2-port, 8506-4LP 4-port, 8506-8 8-port, 8506-12 12-port) SATA-I PCI cards and 95xx series family (e.g., 9550SX-4LP 4 port, 9550SX-8LP 8 port, 9550SX-12 12-port, 9550SX-12MI 12-port, 955SX-16ML 16-port) SATA-II NCQ PCI-X cards — real hardware RAID. Supported by its own (3w-xxxx and 3w-9xxx) driver in 2.4.18 or earlier: essentially any recent 2.4 kernel. Uses exact same driver as prior (non-SATA) 7xxx series. Faster at sequential reads than the Adaptec cards, if you tune the readahead buffers. Note: 3Ware provides utilities to support ATA hotswap with its host adapters (only), if using suitable drive enclosures/connectors. Model 9500S-8 (8-port card) accepts an optional battery backup unit. Applied Micro Circuits Corporation (AMCC) acquired 3Ware, Inc. in March 2004.
    • (link) Adaptec AAR 2400, 2410, 2410SA, 2120S, 2200S, 2810SA (8-port), 21610SA (16-port) series PCI cards — real hardware RAID, using the slightly anemic Intel IOP302/303 I/O co-processor chips. Use “aacraid” driver. (Should not be confused with the Adaptec 2400A ATA RAID host adapter, for which one uses the dpt_i2o driver, that card being a legacy of Adaptec’s buying DPT — nor with the low-end Adaptec AAR 12×0 series, which please see.) Faster at random I/O than the 3Ware cards. Optional battery is available for the card’s cache, for more reliable operation in the event of power loss, etc. (Card disables the drive’s write cache.)
    • (link) Adaptec AAR 2420SA (4-port) and AAR 2820SA (8-port) PCI-X cards — real hardware RAID. Use “aacraid” driver. Features Adaptec AIC-8210 RAID co-processor chip. Supports NCQ, hot sparing. Optional battery backup unit is available.
    • (link) Adaptec AAR 1200, 1210, 1210SA, 1205SA, 2047600 (2-port) series PCI cards — fakeraid. This turns out to be a Silicon Image 3112-variant or 3112A-variant. Works with a patched version of libata’s sata_sil subdriver (2003-12).
    • (link) Adaptec ASR-2020SA/2025SA Zero-Channel RAID cards — real hardware RAID. Cards lack SATA I/O functionality but supply RAID logic: offload I/O processing across ZCR connection to EMRL- or RAIDIOS-compatible SATA-I I/O chip on motherboard. Use “aacraid” driver.
    • (link) Adaptec AAR-1420SA 4-port SATA-II PCI-X — fakeraid. These are rumoured to be a cheap OEM from someone else, but the chipset identity is unknown. Note Brent Norris’s scathing review. Beware of Adaptec’s term “HostRaid”: This means fakeraid, not real hardware RAID. Adaptec offers proprietary drivers (binary-only).
    • (link) Addonics SATA-I family — fakeraid. See Silicon Image 3112. Models ADST203 (2-port SATA-I PCI combo card), ADST108 (external/internal 2-port SATA-I PCI card), and ADSA2 (2-port SATA-I PCI card) all use SiI3112 chips. Models ADSA4R-E (4-Port eSATA-I PCI card) and ADST114 (4-port SATA-I RAID PCI card) both use SiI3114 chips. Model AD2SAP-E (2-Port eSATA-I PCI card) uses SiI3512 chips.
    • (link) Addonics SATA-II family — fakeraid. See Silicon Image 3124. Models ADS3GX4R5-E (eSATA-II RAID5/JBOD card), ADS3GX4R5 (SATA-II PCI-X RAID card), and ADSA3GX4R-E (4-Port External SATA-II PCI-X card) all use SiI3124 chips. Model ADSA3GPX1-E (eSATA-II PCI-Express card) uses SiI3132 chips.
    • (link) Addonics CardBus PCMCIA cards — fakeraid. Model ADCB2SA-E is a 2-port eSATA-I CardBus card. Model ADCBSA2 is a 2-port SATA-I CardBus card. I so far have no information on their chipsets: This entry is a placeholder.
    • (link) ADMA — fakeraid. Please see entry for Pacific Digital Talon, as no other manufacturers yet implement this open-standard hardware spec.
    • (link) AHCI mode — fakeraid. Intel’s Advanced Host Controller Interface is an open-standard PCI abstract device layer for mass-storage access describing a fairly advanced SATA interface (“HBA” = host bus adapter), in theory supporting native command queuing (NCQ) with per-device queues, hotplug, port multiplexer, etc. It’s currently represented by Intel’s ICH6-R and ICH6-M chipsets, ULi’s (formerly ALi) M1575 and M1567 4-port SATA-II PCI Express South Bridges; AMD’s SB600 South Bridge, and some chipsets from SiS, VIA, Nvidia, ATI, and JMicron. libata AHCI driver “ahci” became available starting 2.4.29-preX and 2.6.9-rcX, and is now production quality. If your desired installation kernel lacks “ahci”, you may be able to use a pre-AHCI fallback mode (e.g., the ICH5-like fallback mode of Intel ICH6/ICH6-R chipsets): Look in your BIOS Setup program for a “legacy” or “ATA” setting, e.g., as reported by Peter Knaggs for his Dell Dimension XPS Gen 3 Series / Intel 925X Express chipset motherboard.
    • (link) AMD SB600 South Bridge — fakeraid. Supports the standard AHCI driver interface.
    • (link) Areca Technology Corp. ARC-11xx, ARC-12xx PCI-X and PCI-Express cards — real hardware RAID. Model ARC-1120 has a battery backup unit option. Said to use Marvell 88SX60xx chips and an Intel 80332 XOR engine. Erich Chen of Areca maintains GPLed source code for a “arcmsr” driver for these chipsets (also available at unnet). Like Garzik’s libata driver, Chen’s “arcmsr” driver uses the kernel’s SCSI layers.
    •  (link) ATI 4379 — fakeraid. This turns out to be an integrated version of the Silicon Image 3112. 
    • (link) Broadcom RAIDCore BC4852, BC4810 (8-port), and BC4452, BC4410 (4-port) PCI-X cards — fakeraid. Units use Broadcom BCM5770 chips. The cheaper 4810 and 4410 cards differ from their 4852 and 4452 brethren in having some advanced capabilities disabled; they can be upgraded via an extra-cost software key. (Broadcom Corporation acquired RAIDCore in spring 2004.)Broadcom offers proprietary driver “bcraid” for its BCM5770-chip-based RAIDCore BC4000-series products (BC4452, BC4652, BC4852, BC4450, BC4650, BC4850, BC4410, BC4610, BC4810).
    • (link) Broadcom SATA-II cards — fakeraid. As of 2005-09, new cards are expected based on Broadcom’s BCM5773 chip supporting 8-port PCI-X or PCI-Express SATA-II with Broadcom’s XelCore fakeraid. This entry is a placeholder.
    • (link) Broadcom RAIDCore BCM5785 aka HT-1000 chips — fakeraid. Proprietary drivers using Broadcom’s proprietary “blob” are available from IBM and Tyan.
    • (link) HP (/Compaq) SA5xxx PCI cards — real hardware RAID. Supported in 2.6.6 and later kernels using the Compaq CISS (cciss) driver.
    • (link) HighPoint RocketRAID 1540/1542/1544/1640 & 454 (HPT374 chipset), RocketRAID 1520 (HPT372, HPT372N, or HPT372A chipset), and Rocket 1520 (HPT302N chipset — non-RAID) PCI cards — fakeraid. Supported by drivers/ide’s hpt36x driver, by at latest 2.4.21-pre5. No libata driver exists for these, but Alan Cox is working on one (as of 2006-01). Note: Some recent HighPoint cards use Marvell 88SX50xx chips (for which see separate driver info). Problematic proprietary Linux i386 binary drivers for HighPoint fakeraid (release 2.0 of which is reported to malfunction or even fail to compile on later 2.6 kernels ranging, at least, from 2.6.8 through 2.6.14) are available, but, as usual, you’re better off using Linux’s own open-source “md” software-RAID driver. (Warning: You’ll need to load the proprietary driver only into kernels lacking the conflicting drivers/ide htp36x driver, in the presence of which your system will seize up, at boot time.)
    • (link) HighPoint Rocket 1511 (1-port external port, PCI) and RocketHead 100 (external PATA/SATA converter widget) — fakeraid. These devices both are based on HighPoint PATA controller chips (HPT302N and HPT372A, respectively), speaking to SATA via a Marvell 88i8030 SATA bridge chip. As such, they cannot be supported by Linux’s drivers/ide htp36x driver, but there are proprietary, binary-only drivers.
    • (link) HighPoint RocketRAID 1820 (8-port) / 1820A (8-port) / 1810 (4-port) SATA-II PCI-X cards — fakeraid. Said to use the Marvell 88SX5080 chip. Model 1820A adds the HighPoint HPT601 XOR engine chip: Its model 1820 predecessor was out only briefly, and should be rare.HighPoint makes available proprietary driver “hptmv” (source code wrapper around a binary-only proprietary core library).
    • (link) HighPoint RocketRAID 2240 (16-port SATA-II PCI-X), 2220 (8-port SATA-II PCI-X), 2320 (8-port SATA-II PCI Express), 2224 (4-port SATA-II PCI-X) cards — fakeraid. Proprietary binary drivers (2240, 2220, 2320, 2224) can be downloaded from the manufacturer. Correspondent Berkley Shands notes that these cards and proprietary drivers are quite CPU-intensive, even pushing a quad-Opteron system a bit. He also recommended tweaking hpt_reset routine to fix IRQ spinlocks, on 2.6.14/2.6.15 kernels. He achieved a maximum initial read speed of 870MB/sec. on RAID0, using 50% of CPU power. Note that models 2220 and 2240 both try to use (different) proprietary drivers named “hptmv6”. Use command-line rather than GUI RAID setup utility, if there will be more than 8 drives per array. Shands adds: “Just FYI, to get those nice performance numbers, you must set the read-ahead value for the drive and use the POSIX_WILL_NEED function of fadvise(). The default read-ahead is 8 sectors. I use 1024; otherwise, you won’t come anywhere near those numbers.”
    • (link) HighPoint RocketRAID 2310 (4-port SATA-II PCI Express card) — fakeraid. An proprietary “rr2310_00” driver (source code wrapper around binary-only proprietary core libraries, deceptively claimed to be “open source”) is available from the manufacturer.
    • (link) HighPoint RocketRAID 2320 (8-port SATA-II PCI Express card) — fakeraid. An proprietary, high-performance “rr232x” driver (source code wrapper around binary-only proprietary core libraries, deceptively claimed to be “open source”) is available from the manufacturer.Garzik mentions that newer HighPoint cards (those that aren’t based on Marvell 88SX50xx chips) pretend they are SCSI and are supported by the “hptiop” driver.
    • (link) IBM ServeRAID family, e.g. ServeRAID-7t, and 7k PCI and PCI-X cards — real hardware RAID. Prior to the ServeRAID-7 series, units probably worked with the same ips driver as for the SCSI predecessor cards in this family. More info. Somewhere around the ServeRAID 7t, IBM began applying the “ServeRAID” brand to Adaptec-oriented host adapters and Intel ICH-oriented fakeraid (so-called “HostRaid”) ones: E.g., the ServeRAID-7t and 7k are based on an Adaptec 2410SA chip; the ServeRAID-7e uses an Intel ICH5-R fakeraid chip (entries for which, please see). Oddly, support for IBM/Adaptec HostRAID fakeraid format (ServeRAID model 7e) is said to require Adaptec’s proprietary a320raid driver.
    • (link) ICP Vortex GDT8586RZ (4-port), GDT8546RZ (8-port) series PCI cards — real hardware RAID: Uses Intel 80303 I/O processor and hardware XOR engine dedicated coprocessor, and includes 128MB cache. Works with the kernel’s gdth driver version 3.04 or later. A file of hints on using the gdth driver with sundry distributions is available from ICP Vortex. (Adaptec acquired ICP Vortex — from Intel — in 2003.) One source says these cards are based on Silicon Image 3112 chips, which are probably not the system-facing chipsets, and so don’t determine driver support.
    • (link) Intel ICH5 / ICH5-R family chips — fakeraid. (See fakeraid support details under Intel ICH6.) Supported in 2.4.22 and later kernels using drivers/ide’s piix driver (but that driver locks up in many cases), and also (much more reliably) in libata’s ata_piix driver, production quality since 2004-02-25. Intel ICH5/ICH6 is an open-standard hardware spec. ICH7/8 usually can be set to be backwards-compatible. “Enhanced mode” or “SATA-only mode” may need to be set in BIOS.Intel produced GPLed patch sets for ICH5 in the 2.4.9 and 2.4.20 kernels of (respectively) Red Hat Advanced Server 2.1 and Red Hat Linux 8.0, available for download as part of its driver set for the 6300ESB I/O Controller Hub South Bridge on its E7520 and 875P motherboard chipsets.

      Adaptec has released a proprietary “aarich” driver (source code wrapper surrounding a binary-only core library) for Intel ICH5-R and Silicon Image 3512. (The name is intended to be parsed as AAR-ICH, as it is intended for certain Adaptec AAR-series cards based on Intel ICH5 SATA-I chips.)

      Supermicro’s ftp site offers proprietary drivers for Intel ICH5-R chips on Intel Hance Rapids motherboards, written by Adaptec.

    • (link) Intel ICH6 / ICH6-R / ICH6-M family SATA-I chips — fakeraid. libata’s ata_piix driver support is now (2004-02-25) functional when the ICH6 is running in either ICH5-alike mode or (on ICH6-R or ICH6-M) the enhanced, much-faster, open-specification “AHCI” mode (entry for which, please see), as of 2004-07-08.i ICH6 and AHCI are both open-standard hardware specs. If your desired installation kernel lacks the “ahci” driver, you may be able to use ICH5-like fallback mode: Look in your BIOS Setup program for a “legacy” or “ATA” setting, e.g., as reported by Peter Knaggs for his Dell Dimension XPS Gen 3 Series / Intel 925X Express chipset motherboard.Note that as of 06/2004, Silicon Image chipsets have a bug in “lba48” addressing (of a few drives over 137GB, but not all of them), necessitating a patch that will, as a necessary consequence, limit performance on the drives affected (only).

      Alternatively, LSI has produced proprietary, binary-only drivers (source code wrapper accompanying a “megaide” binary-only driver) for ICH6-R. Supermicro’s ftp site offers versions of those same proprietary, binary-only drivers.

      Intel ICH5-R, ICH6-R, and perhaps some others perform RAID0 disk-spanning via a BIOS trick, which is thus OS-independent. That mode of Intel fakeraid (Intel Software RAID) can be supported in 2.4.x on ICH5/6 with ataraid subdriver iswraid atop libata’s ata_piix (not atop drivers/ide): http://www.kerneltraffic.org/kernel-traffic/kt20031201_243.html#16, http://www.kerneltraffic.org/kernel-traffic/kt20040331_255.html#16. (The iswraid patch will be merged into kernel 2.4.28; it and related patches/info are available at http://iswraid.sourceforge.net/.)

    • (link) Intel ICH7 / ICH7-R SATA-II chips — fakeraid. Should work with either libata’s ata_piix driver or libata’s ahci driver. (Please see entries for ICH5, ICH6, and AHCI.)Supermicro’s ftp site offers proprietary drivers for Intel ICH7-R, written by Adaptec.
    • (link) Intel SRCS14L Serial ATA RAID Controller PCI card — real hardware RAID. This is a four-port PCI card for servers, based on an ICP Vortex chipset, driving SATA-I output using a pair of Silicon Image SiI3112A SATA-I chips, and with an Intel GC80303 dedicated I/O processor with 64MB of ECC SDRAM for processing XOR logic. Use the kernel’s “gdth” driver (for ICP Vortex and for related Intel SCSI RAID cards). The Silicon Image chips are not the system-facing chipsets (1 2), and so don’t determine driver support.
    • (link) Intel SRCS16 and SRCS28X Serial ATA RAID Controller PCI cards — real hardware RAID. These are six-port PCI and eight-port PCI-X cards (respectively) for servers, based on an LSI Logic MegaRAID chipset, driving SATA-I output using Silicon Image SiI3112A SATA-I chips (one for each channel pair) and an Intel GC80302 or IOP331 (respectively) dedicated I/O processor with 64MB or 128 MB of ECC SDRAM (respectively) for processing XOR logic. Use the kernel’s “megaraid2” driver (For LSI Logic MegaRAID). The Silicon Image chips are not the system-facing chipsets (1 2), and so don’t determine driver support. An optional battery-backup daughterboard is available.
    • (link) Intel 31244 4-port SATA-II PCI-X sub-board — this is based around a Vitesse VSC71714 chip (which please see). No RAID functionality, in itself: Sub-board can be embedded on a NAS controller card with a separate RAID chip.
    • (link) ITE Tech., Inc. IT8212 / IT8212F PCI Express card — real hardware RAID. GPLed “iteraid” driver by Mark Lu of ITE Tech., Inc. is available — which unfortunately is broken in 2.6.10 and later kernels, because it relies on the long-deprecated MOD_DEC_USE_COUNT and MOD_INC_USE_COUNT module-use-count macros removed from include/linux/module.h as of that kernel version. (2005-09-12 addendum: Donald Huang of ITE Tech. answered my query, and said that Jack Lee of ITE Tech. will undertake the necessary revision work, some time later.)Alternatively, Alan Cox’s series of -ac variant kernel source code trees include an “it8212” driver as Alan’s add-in to 2.6.9 and later kernels’ drivers/ide driver collections. (As of 2005-09-08, this patch isn’t in mainline kernels, however. Update: As of 2006-01, the new driver is said to be in mainline 2.6.14 kernels, at least.)
    • (link) LSI Logic MegaRAID SATA 150-4 (four ports) and 150-6 (six ports) Serial ATA RAID Host Adapters — real hardware RAID. Work with 2.4.x kernel’s megaraid2 driver (same one as for SCSI). Cards use an Intel GC80302 dedicated I/O processor. This chipset, under its former AMI brand name, has had a long and excellent history with SCSI gear. Optional battery backup unit is available for the model 150-6 card’s cache, for more reliable operation in the event of power loss, etc. These cards should not be confused with the low-end LSI Logic MegaRaid SATA 150-2 card (which please see).
    • (link) LSI Logic MegaRAID SATA 150-2 Serial ATA RAID Host Adapter PCI card — fakeraid. This turns to to be a Silicon Image 3112-variant. Reports suggest that Linux’s open-source SiI 3112 driver sets from Linux work with this card.An i386 binary (ataraid?) subdriver (megaide) for this fakeraid (“IDEal RAID”) scheme can be retrieved from Steve Hardy’s Web site, from http://pub.datux.nl/linux/drivers/proliant/, or from LSI Logic. The driver is a GPLed wrapper around proprietary library megaide_lib.o. I’d recommend using (instead) Linux’s own open-source “md” software-RAID driver, unless/until LSI Logic (like HighPoint, Nvidia, Promise, and VIA) gets a clue about open source.
    • (link) LSI Logic MegaRAID SATA 300-4X 4-port and 300-8X 8-port SATA-II PCI-X cards — real hardware RAID. Uses a Marvell 88SX6081 chip. Compatible with Linux’s megaraid2 driver.
    • (link) LyCOM Technology, Inc. cards — fakeraid. These PCI (ST-108, ST-114, ST-102, ST-117, ST-119, ST-117R, ST-115, ST-100, ST-103, ST-200, ST-208, ST-210, ST-203, ST-209, ST-211, NW-201, ST-125, ST-124, ST-113e, ST-119e, ST-134e, ST-117e), PCI Express (PE-105N, PE-102R5, PE-103R5, PE100, PE100N, PE102, PE-103), and PCI-X (64-101, 64-102, 64-102-1) cards appear to use various Silicon Image chips.
    • (link) LyCOM Technology, Inc. CardBus cards — fakeraid. It’s unclear what chipset these PCMCIA cards use: This entry is a placeholder.
    • (link) Marvell Technology Group Ltd. 88SX7xxx, 88SX6xxx (“Hercules II”) and 88SX5xxx/88SX48 (“Hercules I”) chip series chips — fakeraid. The 88SX50xx series supports TCQ, but not NCQ or port multipliers. The 88SX60x1 series supports TCQ, NCQ, and port multipliers. libata driver “sata_mv” became available 2005-06 (beta quality as of 2007-02).For Marvell chipsets 88SX5040, 88SX5041, 88SX5080, and 88SX5081 “Hercules I” (all SATA-I); and 88SX6041 4-port & 88SX6081 8-port “Hercules II” (both SATA-II), there is a “mvSata” driver from Marvell International Ltd. Like Garzik’s libata “sata_mv” driver, Marvell’s “mvSata” driver uses the kernel’s SCSI layers.

      As of May 2005’s v. 3.4.1, that driver changed from proprietary licensing to GPLv2; probably the best revised source code is now Carlos Vidal’s file tree, which also has precompiled kernels for Fedora Core and a HOWTO that should generalise well to other distributions. A patch may be necessary to run this driver properly on newer 2.6 kernels.

      Supermicro’s ftp site offers proprietary drivers for Marvell 4-port and 8-part SATA chips, written by Adaptec.

    • (link) Maxtor SATA/150 PCI Card — fakeraid. A relabelled Promise FastTrak TX2plus card (which please see), using a PDC20375 chip.
    • (link) NetCell SyncRAID SR3000, SR3100 (3-port) and SR5000, SR5103 (5-port) SATA-I RAID PCI cards — real hardware RAID. All units cited are based on the NetCell SyncRAID TD6405 64-bit controller ASIC. NetCell provides a GPLed driver in the form of a patch to the Linux kernel source tree’s drivers/ide code.
    • (link) Nvidia NForce3 Go120, Go150, 150, 250, 250Gb, and 150 Pro (SATA-I); NForce 4 MCP, SLI, Ultra (SATA-II); and NForce Pro 2200 MCP and 2050 (SATA-II) chips — fakeraid. This motherboard chipset family uses yet another type of fakeraid called nvRAID. libata driver “sata_nv” added as of 2004-07-08 development code, included in kernel 2.6.8, and now production quality. As of 2006-01-25, Nvidia provided provided information (under NDA) that will permit implementation of NCQ support. Note: Nvidia’s proprietary Linux i386 binary driver bundles for its chipsets seem to rely on (and in some cases furnish) Garzik’s “sata_nv” driver — presumably adding to that Nvidia’s own subdriver to support nvRAID disk formatting. However, as usual, you’re probably better off using Linux’s own open-source “md” software-RAID driver for the RAID functionality.Note that newer Nvidia chipsets have switched to the AHCI open standard.
    • (link) Pacific Digital Talon ZL-2, ZL-4, and RAIDStaQ LP-4 series SATA-I PCI cards (and potentially cards from licensees using PD’s “automatic DMA” = ADMA interface) — fakeraid. No hotplug or port multipliers. libata driver “ata_adma” existed in the development branch a/o 2005-11, but in 2007 appears to have been replaced by the libata “pdc_adma” driver (beta quality as of 2007-02).
    • (link) Pacific Digital QMaster RAID SATA-II PCI-X cards — genuine hardware RAID (but Linux driver uses it only in non-RAID mode). libata driver “sata_qstor” (initially named “ata_qstor”) was added in 2005-03, and is beta quality as of 2007-02.
    • (link) Promise FastTrak SATA150, SATA150 TX2, SATA150 TX2plus, SATA150 TX4, SATA150 SX4, SX4-M, SATA378, and Ultra 618 series PCI cards (e.g., PDC20621, PDC20275, PDC20618, PDC20318, PDC20319, PDC20375, PDC20378, and PDC20376 chips) PCI cards — fakeraid, mitigated by the fact that the Promise PDC20621 ASIC chip (on SX4, SX4-M, and TX4, but not TX2) functions as a “RAID accelerator” — XOR engine and memory, leaving RAID logic to the host CPU — but libata doesn’t support that functionality at this time (2005-11). libata’s “sata_promise” driver (for tx2/tx4, production quality driver) or “sata_sx4” (for sx4, beta quality driver) provides support a/o 2004-02-25 (included in kernel 2.6.x). Cache memory add-on hardware module is available for some models (OEM versions only, though, not retail). Proprietary fakeraid “ft” driver (ataraid?) is available, as are instructions. An now-unmaintained 2003-02 i386 binary driver (often claimed in error to be open source; people being fooled by its source-code wrapper) is also available.
    • (link) Promise SX8 PCI-X card — fakeraid. Per the 2004-09-15 libata report, a separate block driver, “sx8” (not part of libata), has been written for this hardware. (However, Garzik later wrote that it may be rolled into libata, after all, to make possible ATAPI support.)
    • (link) Promise PDC20579-chip-based SATAII150 579 SATA-II chipset — fakeraid. libata’s sata_promise driver can support it using a patch to the 2004-10 libata development code and a 2.6 kernel, or by using the manufacturer’s GPLed driver code.
    • (link) Promise PDC20518-chip-based SATAII150 TX4 SATA-II card — fakeraid. libata’s sata_promise driver can support it using a patch to the kernel 2.6.10 libata code. Garzik posted his own patch on 2005-02-06 to support this device; the code will be included in kernel 2.6.11. Alternatively, use the manufacturer’s GPLed driver code.Kristoffer Winther Sørensen has posted a guide to retrofitting Garzik’s sata_promise patch to the current SUSE Linux installer.
    • (link) Promise PDC20575-chip-based SATAII150 TX2plus SATA-II chip — fakeraid. Garzik posted a patch on 2005-02-06 to support this device; the code will be included in kernel 2.6.11. Alternatively, use the manufacturer’s GPLed driver code.
    • (link) Promise PDC20619 chip — fakeraid. Tobias Lorenz’s patch for libata’s sata_promise driver was incorporated into libata-dev on 2005-03-13 and merged into kernel 2.6.11-rc4.
    • (link) Promise PDC40718-chip-based SATA300 TX4 SATA-II chipset — fakeraid. Supported by libata’s sata_promise driver as of 2005-04-15. Alternatively, use the manufacturer’s GPLed driver code.
    • (link) Promise PDC20775-chip-based SATA300 TX2plus SATA-II chipset — fakeraid. Supported by libata’s sata_promise driver as of 2005-04-15. Alternatively, use the manufacturer’s GPLed driver code.
    • (link) Promise PDC20779-chip-based SATA300 779 SATA-II chipset — fakeraid. This chipset will probably prove compatible with libata’s sata_promise driver, perhaps requiring modifications. Alternatively, use the manufacturer’s GPLed driver code.
    • (link) Promise FastTrak TX2300/TX2200 (2-port) and TX4300/TX4200 (4-port) RAID SATA-II PCI cards — fakeraid. I gather that these have a programming interface differing from that of their sata_promise-compatible predecessors, but have no chip information so far: This entry is a placeholder.Promise offers a “ftsata2” proprietary driver (open-source wrapper around a binary-only, proprietary core library). Warning: Correspondent Andreas Thienemann warns that this driver works on Linux 2.4.x kernels only, and cannot be built to function on 2.6.x because it uses deprecated interfaces and references missing headers.
    • (link) Promise SuperTrak EX8300 8-port SATA-II PCI-X card and SuperTrak EX8350 8-port SATA-II PCI Express card — real hardware RAID(?). Uses Intel IOP331 I/O processor (XScale family) and Marvell 88SX6081 SATA chipset. Press releases says there’s a “full open source Linux driver” — which might be the Marvell driver(?). EX8500 card was demoed on 2005-08-23.
    • (link) ServerWorks Frodo / Apple K2 / Broadcom chip — libata’s sata_svw driver provides support a/o 2005-11. As of 2004-07-08, that driver supports the Apple K2 and ServerWorks Frodo4 (4-port) / Frodo8 (8-port) variants. Driver is now production quality. Other variants’ PCI IDs haven’t yet been collected, added to the driver, and tested. The Broadcom chip used appears not to be model BCM5770, so Broadcom’s proprietary “bcraid” driver likely won’t work. (Broadcom acquired ServerWorks in 2001.)
    • (link) SIIG SC-SAE012-S1 PCI-Express SATA-II card — fakeraid. Uses a Silicon Image 3132 chip.
    • (link) Silicon Image 3112 (2-port integrated chip) / 3114 / 3114R (4-port integrated chip) and 3512 / 3512A / 3514 (chip in 2-port PCI card) (Silicon Image, Inc. aka SiI, formerly CMD Technology, Inc.) — fakeraid. libata’s “sata_sil” driver (production quality) provides support (a/o 2004-07-08), or probably 2.4.x drivers/ide’s siimage driver (originally developed for the pre-SATA CMD680 aka SiI680 chip used in many ATA host adapters). Note that enabling libata support for this chipset requires enabling CONFIG_BROKEN (under “Code maturity level options”) in your kernel configuration, for reasons Garzik has explained. As of 2004-12, Silicon Image 311x became an open-standard hardware spec.An OEM (and apparently slightly modified) version of the SiI 3112 chip is sometimes integrated into motherboards as the ATI IXP400 SATA chip. In that form, it’s reportedly had support by libata’s “sata_sil” driver since the 2.6.11 kernel.

      I am still trying to untangle references to SiI’s model numbers. Strings within Silicon Image’s proprietary drivers suggest that that 3112, 3114, 3512, 3514, 434e, and 4e4e are chipset model numbers with the following “subdevice” numbers in their respective families. 3112: 3423, 6112. 3114: 3424, 6114. 3512: 3422, 3423, 6512. 3514: 3424 (note duplicate), 6514. That driver purports to be for “SiI SATA RAID Controllers 3x and 6x Series” and shows the identification string “SiI6514 (3112 to 6514) SATA RAID controller”.

      Daniel Paepcke has posted a HOWTO for building the sata_sil driver.

      ataraid support for SiI’s Medley fakeraid is available from 2.4.21 or later’s silraid (Arjan van de Ven’s) subdriver or its superior 2.4.26 and later replacement, medley (by Thomas Horsten). Note: So far, medley supports only Medley’s RAID0 “striped” mode, and not its RAID1 “mirrored” or RAID1+0 (AKA “RAID10”) modes. Alternatively, you can use Linux’s “md” software-RAID driver.

      Silicon Image, Inc’s proprietary, binary-only drivers are available from Tyan, Tekram, IBM, or Supermicro.

      Adaptec has released a proprietary “aarich” driver (source code wrapper surrounding a binary-only core library) for Intel ICH5-R and Silicon Image 3512. (The name is intended to be parsed as AAR-ICH, as it is intended for Adaptec AAR-series cards based on Intel ICH5 SATA-I chips.)

    • (link) Silicon Image 3124/3124-2 (chip in 4-port SATA-II PCI-X cards) and 3132 (chip in 2-port SATA-II PCI Express cards) (Silicon Image, Inc., formerly CMD Technology, Inc.) — libata’s sata_sil24 driver (production quality) supports Silicon Image 3124 (2005-08) and also the follow-on 2-port PCI Express SATA-II successor chip, the Silicon Image 3132. (Per 2004-07-08’s libata status report, Silicon Image provided Garzik with docs and sample hardware.)
    • (link) SiS 964 South Bridge, SiS 180 card — fakeraid. Supports hotplug and port multipliers. Is now (2004-03-01) supported in libata using driver “sata_sis” contributed by Uwe Koziolek. The 2.6.6 kernel added this driver a/o 2004-05-09. Driver is now production quality.Note that newer SIS chipsets have switched to the AHCI open standard.
    • (link) SiS 965L South Bridge — fakeraid. No known open-source drivers. Manufacturer’s propriatary, binary only SiSE 18x card driver also supports SiS 965L, but at present (2005-09), you need this in the modules.pcimap file to furnish the missing PCI ID: “sata_sis 0x00001039 0x00000182 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0”. I’d speculate that libata’s “sata_sis” driver might work to the same degree, but do not have confirmation.Note that newer SIS chipsets have switched to the AHCI open standard.
    • (link) Supermicro DAC-SATA-MV8 PCI card — uses a Marvell chip (which please see).
    • (link) Tekram PCI-X and PCI-Express cards — Inexpensive variants of similar models from Areca. E.g., Tekram SIR-1120 is near-identical to an Areca ARC-1120. Cards use Marvell chips.
    • (link) ULi Electronics, Inc. (formerly ALi) M1573 South Bridge and M5285, M5283, and M5281 SATA-I bridge chips — fakeraid. libata driver “sata_uli”. Driver is now production quality.
    • (link) ULi Electronics, Inc. (formerly ALi) AHCI-compatible chips — fakeraid. ULi’s M1575 4-port SATA-II PCI Express South Bridge is its first chipset to support the standard AHCI driver interface.
    • (link) ULi Electronics, Inc. (formerly ALi) M1567 SATA-II PCI Express South Bridge — fakeraid. Probably supports the standard AHCI driver interface (unconfirmed).
    • (link) VIA Technologies, Inc. VT6421 and VT6421L PCI chips &mdash fakeraid. A libata-dev patch was posted on 2005-02-06.
    • (link) VIA Technologies, Inc. VT8235M South Bridge chipset. — fakeraid. Driver status unknown.
    • (link) VIA Technologies, Inc. VT8237 and VT8237A South Bridge chipset, using VIA’s VT6420 Serial ATA chip — fakeraid. libata’s “sata_via” driver set provides support a/o 2005-11 (included since kernel v. 2.6.3). Driver is now production quality. Recent 2.4.x drivers/ide code should support it, too. Proprietary drivers available.
    • (link) VIA Technologies, Inc. VT8237R and VT8237R+ South Bridge chipset — fakeraid. 2-port chip, said to support RAID 0, 1, 0+1 and JBOD. Might be based on VIA’s VT6421L Serial ATA chip(?). Driver status unknown. The “+” variant is said to differ from the earlier non-plus variant in having forwards compatibility for SATA-II drives.
    • (link) VIA Technologies, Inc. VT8251 PCI Express South Bridge chipset — fakeraid. This 4-port SATA-II chipset (used in some new a/o 2005-11 motherboards such as the ASUS A7V-MX) is claimed to use the standard AHCI driver interface, though one correspondent had no luck a/o 2005-11-15 — possible just a PCI ID problem? Uniquely (to my knowledge) for a fakeraid adapter, it supports RAID 5 along with RAID levels 0 and 1.
    • (link) Vitesse Semiconductor Corp. VSC7174 Serial ATA chip — libata’s sata_vsc (by Jeremy Higdon) was added as of the 2.6.5 kernel. Driver is now production quality. No RAID functionality, in itself: Chip can be embedded on a NAS controller card with a separate RAID chip. Supports hotplug and port multipliers.


    « Previous PageNext Page »