0

我是第一次使用 distcc 并且已经阅读了自述文件。

要设置我有三个 Ubuntu 服务器:主服务器和客户端:

根据自述文件,听起来我们需要在所有机器上安装它们。我已经完成了。 https://github.com/distcc/distcc/blob/master/INSTALL

在所有三台服务器上运行命令:

sudo apt-get install gcc make python3 python3-dev libiberty-dev

./autogen.sh ./configure 安装

他们完成了,没有任何错误。

在三台机器上创建 ssh 密钥,然后添加到授权主机部分。做了一个 ssh 并确认他们能够从主系统登录到代理系统而无需任何密码

现在,我从主服务器运行以下命令,指向两个两个客户端:

Export DISTCC_POTENTIAL_HOSTS='localhost 172.31.33.11 172.31.37.109'

创建了一个 hello world make 文件:

    #.DEFAULT_GOAL := generate
    .PHONY: all say_hello generate clean

    all: say_hello generate

    say_hello:
            @echo "Hello World"

    generate:
            @echo "Creating empty text files..."
            touch file-{1..10}.txt

    clean:
            @echo "Cleaning up....."
            rm -f *.txt

使用以下命令运行构建

 make
 Hello World
 Creating empty text files...
 touch file-{1..10}.txt
 root@ip-172-31-24-96:/data/helloworls#

所以在这里它看起来确实像预期的那样工作。

按照文档中的说明运行命令:

pump make -j40 CC="distcc gcc" --debug
__________Using distcc-pump from /usr/local/bin
__________Found 1 available distcc servers
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
 File 'all' does not exist.
   File 'say_hello' does not exist.
  Must remake target 'say_hello'.
   File 'generate' does not exist.
  Must remake target 'generate'.
Hello World
Creating empty text files...
touch file-{1..10}.txt
 File 'all' does not exist.
 File 'all' does not exist.
Must remake target 'all'.
Successfully remade target file 'all'.
__________Shutting down distcc-pump include server
root@ip-172-31-24-96:/data/helloworls# ls
Makefile  file-{1..10}.txt
root@ip-172-31-24-96:/data/helloworls#

问题:

1> How do we really know that the two client servers have been used during this build
2> Is setting the client servers same as that of the master, If no is there a difference
3> How do we see the UI distcc Monitor
4> How can i join a range of machines which does not have DistCC installed

谢谢

4

1 回答 1

0

要监视 distcc,您可以distccmon-text在启动构建的客户端上使用。这将输出 distcc 中作业的当前状态。

要永久监控,您可以使用watch -n 1 distccmon-text每秒更新一次状态。

我自己没有使用过 gui 应用程序distccmon。但是我看过截图。如果您在该系统上有可用的 GUI,那也应该是一种替代方法。

于 2021-10-05T06:53:17.417 回答