FlumeUserGuide

http://archive.cloudera.com/cdh4/cdh/4/flume-ng/FlumeUserGuide.html


1. HDFS로 로그를 write할 Agent

vim /etc/flume-ng/conf/flume.conf

agentM.sources = avro-collection-source

agentM.channels = mem-channel

agentM.sinks = hdfs-sink


# For each one of the sources, the type is defined

agentM.sources.avro-collection-source.channels = mem-channel

agentM.sinks.hdfs-sink.channel = mem-channel

agentM.sinks.hdfs-sink.type = hdfs

agentM.sinks.hdfs-sink.hdfs.path = hdfs://sm06/flumetest/events/

agentM.sinks.hdfs-sink.hdfs.filePrefix = events-

agentM.sinks.hdfs-sink.hdfs.round = true

agentM.sinks.hdfs-sink.hdfs.roundValue = 10

agentM.sinks.hdfs-sink.hdfs.roundUnit = 1


# Each sink's type must be defined

agentM.sources.avro-collection-source.type = avro

agentM.sources.avro-collection-source.bind = 0.0.0.0

agentM.sources.avro-collection-source.port = 41414


#Specify the channel the sink should use


# Each channel's type is defined.

agentM.channels.mem-channel.type = memory


# Other config values specific to each type of channel(sink or source)

# can be defined as well

# In this case, it specifies the capacity of the memory channel

agentM.channels.mem-channel.capacity = 100

sudo -u hdfs flume-ng agent --conf /etc/flume-ng/conf --conf-file /etc/flume-ng/conf/flume.conf --name agentM -Dflume.root.logger=INFO,console


2. HDFS Agent로 로그를 보내줄 Agent

agent.sources = avro-AppSrv-source

agent.channels = file-channel

agent.sinks = avro-forward-sink


agent.sources.avro-AppSrv-source.type = exec

agent.sources.avro-AppSrv-source.command = tail -F /var/log/httpd/access_log

agent.sources.avro-AppSrv-source.channels = file-channel

agent.sinks.avro-forward-sink.channel = file-channel


agent.sinks.avro-forward-sink.type = avro
agent.sinks.avro-forward-sink.hostname = 172.21.81.106
agent.sinks.avro-forward-sink.port = 41414

agent.channels.file-channel.type = memory
agent.channels.file-channel.capacity = 100

sudo -u hdfs flume-ng agent --conf /etc/flume-ng/conf --conf-file /etc/flume-ng/conf/flume.conf --name agent -Dflume.root.logger=INFO,console


타벡스를 먹은것과 안먹은 것이 너무 차이 나는거 같다.

담배 피고 싶긴하지만 참지못할정도는 아니었다.

결과적으로는 퇴근할때까지 한대도 피지 않았으나,

저녁에 친구들과 술을 먹고 술자리에서 한 대를 폈다.

술자리에서는 담배를 정말 많이 피는 편인데, 한 대 피고 그걸로 끝~

앞으로도 쭉 타벡스와 금연!!!

점심에 물건을 받고 1시30분을 마지막으로 담배를 폈다.
3시에 처음으로 한 알을 먹었다.
심리적인 것인지 담배가 절실하다는 생각이 별로 들지 않는거 같다.
4시반에 회사 동료와 이야기 하다가 담배하나를 줘서 피웠다.
3일동안 6개를 피우게 되면 망하는거...
지금 이 글을 쓰는 동안 더 이상 담배는 안 피고 있다.
시작한지 이제 24시간 되지도 않았지만 ㅎㅎ
한 시간에 한대씩 담배를 찾고 연달아 피기도 하는 나로써는 큰 발전이다.
타벡스는 보조제일뿐 중요한건 내 의지다.
오늘도 잘 견디자!

나의 금연을 도와줄 타벡스가 도착했다.

챔픽스는 비싸서 타벡스를 선택하긴했는데,,, 잘한거 같다.

방금 1알을 먹었는데, 괜찮은거같다. 

금연일지를 앞으로 여기 계속 적어나갈 예정 ^^


사용법은 다음과 같다.

1-3일 매 2시간 마다 1정 (1일 6정)
(이때 6개피 이상 흡연하였을 경우 2-3개월 이후 다시 시작)
4-12일 매 2시간 30분 마다 1정 (1일 5정)
13-16일 매 3시간 마다 1정 (1일 4정)
17-20일 매 5시간 마다 1정 (1일 3정)
21-25일 1일에 1-2정



glusterfs

git clone git://git.gluster.com/glusterfs.git

yum install gcc autoconf automake libtool flex openssl* bison

./autogen.sh

./configure

make

make install

mkdir /usr/local/include/glusterfs/

cp glusterfs/libglusterfs/src/*.h /usr/local/include/glusterfs/

cp glusterfs/config.h /usr/local/include/glusterfs/

cp glusterfs/contrib/uuid/uuid.h /usr/local/include/glusterfs/

 

 

 

 qemu

 yum install glib2-devel

 yum install libuuid-devel

 

 ./configure --disable-werror --target-list=x86_64-softmmu --enable-glusterfs --enable-uuid

 ./configure --disable-werror --target-list=x86_64-softmmu --enable-glusterfs

 

 GlusterFS support yes

 

 make

 make install

vim /etc/profile

export QEMU_HOME=/usr/local/qemu

export PATH=${QEMU_HOME}:${PATH}

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

source /etc/profile


ln -s ${QEMU_HOME}/bin/qemu-system-x86_64 /usr/bin/kvm

modprobe kvm

modprobe kvm_intel



qemu-system-x86_64 -enable-kvm -nographic -smp 4 -m 2048 -drive file=gluster://172.21.80.156/testVol/centos.raw,if=virtio,cache=none -vnc :5


돌아다니다가 외국에서 어떤 구루삘 나는 사람이 쓰길래...

일단 기록해놓음.

wget http://brick.kernel.dk/snaps/fio-2.0.10.tar.bz2

bzip2 -d fio-2.0.10.tar.bz2

tar xvf fio-2.0.10.tar

yum install libaio-devel

make && make install


vim random-read-test.fio

[random-read]

rw=randread

size=128m

directory=/data1

fio random-read-test.fio


https://www.linux.com/learn/tutorials/442451-inspecting-disk-io-performance-with-fio/

libvirt를 최신버전으로 바꾸면서 virt-manager를 사용할 수가 없게 되었다.

ip없이 vm을 생성하게 되면 확인할 방법이 없었는데,

vm에 vnc 포트를 넣어 생성하게 되면

vinagre를 통해서 vm을 확인할 수가 있다.


설치는 

# yum install vinagre

Ubuntu 12.04 로 3대의 서버 기준

# apt-get install ceph

# mkdir /var/lib/ceph/mon/ceph-a

# iptables -A INPUT -m multiport -p tcp -s 0/0 --dports 6789,6800:6810 -j ACCEPT

# mkfs.btrfs /dev/vda2

# mount /dev/vda2 /var/lib/ceph/osd/ceph-0/

/etc/ceph/ceph.conf

[global]

        auth supported = cephx

        keyring = /etc/ceph/$name.keyring

[mon]

        mon data = /brick/mon.$id

[osd]

        osd journal size = 1000

[mds]


[mon.a]

        host = node1

        mon addr = 172.21.81.243:6789

[mon.b]

        host = node2

        mon addr = 172.21.81.244:6789

[mon.c]

        host = node3

        mon addr = 172.21.81.245:6789

[osd.0]

        host = node1

[osd.1]

        host = node2

[osd.2]

        host = node3

[mds.a]

        host = node1


# mkcephfs -a -c /etc/ceph/ceph.conf -k /etc/ceph/admin.keyring

# /etc/init.d/ceph start

# ceph -c /etc/ceph/ceph.conf -k /etc/ceph/admin.keyring health


GlusterFS에서 Volume을 만들었다가 다른 Volume으로 이전 사용했던 Brick을 다시 사용하려고 할 경우,

${brick_path} or a prefix of it is already part of a volume

이와 같은 에러가 뜬다.

해결 방법은,

setfattr -x trusted.glusterfs.volume-id $brick_path
setfattr -x trusted.gfid $brick_path
rm -rf $brick_path/.glusterfs

자세한 내용은 아래 블로그를 참고.

http://joejulian.name/blog/glusterfs-path-or-a-prefix-of-it-is-already-part-of-a-volume/

http://blog.daum.net/cypanic/2143317

+ Recent posts