一、 scribe 安装
autoconf-2.
automake-1.
boost_1_44_0.tar.bz2
boost-jam-3.
libevent-1.4.
thrift-0.4.
安装过程
Rhel4
需要先安装
autoconf-2.67
autoconf-2.
automake-1.11
automake-1.
Rhel5/CentOS5
boost_1_44_0.tar.bz2
libevent-1.4.
Python-2.
thrift-0.4.
. v
export SCRIBE_ROOT=/data/scribe
export SCRIBE_BUILD=/data/scribe-build
export LIBEVENT_SOURCE=libevent-1.4.14b-stable
export PYTHON_SOURCE=Python-2.6.6
export BOOST_SOURCE=boost_1_44_0
export THRIFT_SOURCE=thrift-0.4.0
export SCRIBE_SOURCE=scribe-master
build python
怎么删除历史记录我们的青春期#!/bin/sh
cd $PYTHON_SOURCE
./configure --prefix=$SCRIBE_ROOT --with-pymalloc
make -j4 && make install
build_libevent
#!/bin/sh
cd $LIBEVENT_SOURCE
./configure --prefix=$SCRIBE_ROOT
make -j4 && make install
build_boost
#!/bin/sh
export PATH=$PATH:$SCRIBE_ROOT/bin
cd $BOOST_SOURCE
./bootstrap.sh --prefix=$SCRIBE_ROOT --with-python=$SCRIBE_ROOT/bin/python
.
/bjam -j6 runtime-link=shared variant=relea link=shared threading=multi --without-mpi install
Build_thrift
#!/bin/sh
cd $THRIFT_SOURCE
export PY_PREFIX=$SCRIBE_ROOT
#export JAVA_PREFIX=$JAVA_HOME
export JAVA_PREFIX=/is/java/jdk1.6.0_21
./configure --prefix=$SCRIBE_ROOT \
学法心得体会 --with-boost=$SCRIBE_ROOT \
--with-libevent=$SCRIBE_ROOT \
--without-csharp
副班长申请书make -j4 && make install
build fb303
#!/bin/sh我心爱的宝贝
cd $THRIFT_SOURCE/contrib/fb303/
export PY_PREFIX=$SCRIBE_ROOT
export LDFLAGS="-Wl,-rpath -Wl,$SCRIBE_ROOT/lib -L$SCRIBE_ROOT/lib"
export ac_cv_path_PYTHON=/data/scribe/bin/python
./bootstrap.sh --prefix=$SCRIBE_ROOT \
--with-boost=$SCRIBE_ROOT \
--with-thriftpath=$SCRIBE_ROOT \
红烧小鸡腿
make -j4 && make install芹菜降血压吗
build scribe
#!/bin/sh
cd $SCRIBE_SOURCE
export LD_LIBRARY_PATH=${SCRIBE_ROOT}/lib
export LDFLAGS="-L${SCRIBE_ROOT}/lib -Wl,-rpath -Wl,${SCRIBE_ROOT}/lib"
./bootstrap.sh --prefix=$SCRIBE_ROOT \
--with-boost=$SCRIBE_ROOT \
路上花 --with-thriftpath=$SCRIBE_ROOT \
--with-fb303path=$SCRIBE_ROOT
二、 scribe是什么
Facebook scribe 是一个灵活的日志系统,Facebook在内部大量使用它。它能够处理Facebook这样超大规模的日志记录,并且能自动处理新生成的日志记录类别(Facebook有数百个日志类别)。
scribe是一个服务,负责监听服务器的某个端口1464/1463
使用方式,通过java或php程序调用thrift的函数,向该 ip:port发送msg,scribe将接收到msg,按照msg的category分类储存。
scribe 不分rver和client,只是监听端口。
三、 scribe 配置
需要记录日志的服务器
port=1463
max_msg_per_cond=2000000
max_queue_size=1000000
check_interval=3
<store>
category=*
type=buffer
buffer_nd_rate=1
retry_interval=20
retry_interval_range=5
<primary>
type=network
remote_host=
remote_port=1464