서버측

$ sudo apt-get install distcc distccmon-gnome

$ sudo vi /etc/default/distcc

STARTDISTCC="true"
ALLOWEDNETS="192.168.1.5/24 127.0.0.1"
LISTENER="192.168.1.5 127.0.0.1"
NICE="10"
JOBS=""
ZEROCONF="false"
 
$ sudo service distcc start
 * Starting Distributed Compiler Daemon: distccd                         [ OK ]

$ ps -ef | grep dist
distccd  18285     1  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18286 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18289 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18290 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18291 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18292 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18293 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
minimonk 18297 17675  0 22:10 pts/1    00:00:00 grep --color=auto dist 

클라이언트 측
$ sudo apt-get install distcc
$ export DISTCC_HOSTS='192.168.1.5 localhost'
$ CC="distcc gcc" ./configure
$ make -j 8 

[링크 : http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_22]

클라이언트에서 make -j 8 하니 서버에서 이렇게 cpu가 올라간다!! 우오오?!


valgrind를 컴파일 하는데 흐음..
네트워크 를 생각외로 많이 사용해 지는거 같기도 하고? (일단은.. 1MB/s 정도?)



gnome으로 된 distcc 모니터는 설정에 관련된 부분은 존재하지 않는다 -_-
$ sudo apt-cache search distcc
ccontrol - Compilation controller
distcc - Simple distributed compiler client and server
distcc-pump - pump mode for distcc a distributed compiler client and server
distccmon-gnome - GTK+ monitor for distcc a distributed client and server
dmucs - distributed compilation system for use with distcc
ubuntu-orchestra-modules-distcc - Modules mainly used by orchestra-management-server

$ distccmon-gnome



아무런 내용이 나오지 않는건.. 호스트 파일이 존재하지 않아서 이려나?
$ sudo distcc --show-hosts
distcc[18944] (dcc_parse_hosts) Warning: /home/minimonk/.distcc/zeroconf/hosts contained no hosts; can't distribute work
distcc[18944] (dcc_zeroconf_add_hosts) CRITICAL! failed to parse host file.

distcc[18944] (dcc_show_hosts) CRITICAL! Failed to get host list 

$ distcc
distcc 3.1 i686-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built Jul 17 2011 15:03:13
Copyright (C) 2002, 2003, 2004 by Martin Pool.
Includes miniLZO (C) 1996-2002 by Markus Franz Xaver Johannes Oberhumer.
Portions Copyright (C) 2007-2008 Google.

distcc comes with ABSOLUTELY NO WARRANTY.  distcc is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Built with Zeroconf support.

Please report bugs to distcc@lists.samba.org

Usage:
   distcc [COMPILER] [compile options] -o OBJECT -c SOURCE
   distcc --help

Options:
   COMPILER                   defaults to "cc"
   --help                     explain usage and exit
   --version                  show version and exit
   --show-hosts               show host list and exit
   -j                         calculate the concurrency level from the host list.

Environment variables:
   See the manual page for a complete list.
   DISTCC_VERBOSE=1           give debug messages
   DISTCC_LOG                 send messages to file, not stderr
   DISTCC_SSH                 command to run to open SSH connections
   DISTCC_DIR                 directory for host list and locks

Server specification:
A list of servers is taken from the environment variable $DISTCC_HOSTS, or
$DISTCC_DIR/hosts, or ~/.distcc/hosts, or /etc/distcc/hosts.
Each host can be given in any of these forms, see the manual for details:

   localhost                  run in place
   HOST                       TCP connection, port 3632
   HOST:PORT                  TCP connection, specified port
   @HOST                      SSH connection
   USER@HOST                  SSH connection to specified host
   --randomize                Randomize the server list before execution

distcc distributes compilation jobs across volunteer machines running
distccd.  Jobs that cannot be distributed, such as linking or
preprocessing are run locally.  distcc should be used with make's -jN
option to execute in parallel on several machines.


$ vi /etc/default/distcc
# Defaults for distcc initscript
# sourced by /etc/init.d/distcc

#
# should distcc be started on boot?
#
# STARTDISTCC="true"

STARTDISTCC="false"

#
# Which networks/hosts should be allowed to connect to the daemon?
# You can list multiple hosts/networks separated by spaces.
# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
# Hosts are represented by a single IP Adress
#
# ALLOWEDNETS="127.0.0.1"

ALLOWEDNETS="127.0.0.1"

#
# Which interface should distccd listen on?
# You can specify a single interface, identified by it's IP address, here.
#
# LISTENER="127.0.0.1"

LISTENER="127.0.0.1"

#
# You can specify a (positive) nice level for the distcc process here
#
# NICE="10"

NICE="10"

#
# You can specify a maximum number of jobs, the server will accept concurrently
#
# JOBS=""

JOBS=""

#
# Enable Zeroconf support?
# If enabled, distccd will register via mDNS/DNS-SD.
# It can then automatically be found by zeroconf enabled distcc clients
# without the need of a manually configured host list.
#
# ZEROCONF="true"

ZEROCONF="false" 

$ vi /etc/distcc/hosts
# As described in the distcc manpage, this file can be used for a global
# list of available distcc hosts.
#
# The list from this file will only be used, if neither the
# environment variable DISTCC_HOSTS, nor the file $HOME/.distcc/hosts
# contains a valid list of hosts.
#
# Add a list of hostnames in one line, seperated by spaces, here.
+zeroconf 
[링크 : http://pointclouds.org/documentation/advanced/distcc.php]


'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc 크로스 컴파일/커널 빌드 관련  (0) 2016.09.13
distcc 로 valgrind-3.6.1 컴파일 실패?  (0) 2014.12.12
distcc 작동모드  (0) 2014.12.09
ccache & distcc  (0) 2014.12.08
distcc on ubuntu  (0) 2014.12.08
distcc - 네트워크 분산 컴파일  (2) 2010.03.04
Posted by 구차니

댓글을 달아 주세요