LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 763|回复: 3

如何判断是否成功使用distcc?

[复制链接]
发表于 2011-1-27 13:32:45 | 显示全部楼层 |阅读模式
我的distcc部分日志如下:

distcc[24151] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[24151] (dcc_spawn_child) forking to execute: i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -o objs/nginx objs/src/core/nginx.o objs/src/core/ngx_log.o objs/src/core/ngx_palloc.o objs/src/core/ngx_array.o objs/src/core/ngx_list.o objs/src/core/ngx_hash.o objs/src/core/ngx_buf.o objs/src/core/ngx_queue.o objs/src/core/ngx_output_chain.o objs/src/core/ngx_string.o objs/src/core/ngx_parse.o objs/src/core/ngx_inet.o objs/src/core/ngx_file.o objs/src/core/ngx_crc32.o objs/src/core/ngx_rbtree.o objs/src/core/ngx_radix_tree.o objs/src/core/ngx_slab.o objs/src/core/ngx_times.o objs/src/core/ngx_shmtx.o objs/src/core/ngx_connection.o objs/src/core/ngx_cycle.o objs/src/core/ngx_spinlock.o objs/src/core/ngx_cpuinfo.o objs/src/core/ngx_conf_file.o objs/src/core/ngx_resolver.o objs/src/core/ngx_open_file_cache.o objs/src/event/ngx_event.o objs/src/event/ngx_event_timer.o objs/src/event/ngx_event_posted.o objs/src/event/ngx_event_busy_lock.o objs/src/event/ngx_event_accept.o objs/src/event/ngx_event_connect.o objs/src/event/ngx_event_pipe.o objs/src/os/unix/ngx_time.o objs/src/os/unix/ngx_errno.o objs/src/os/unix/ngx_alloc.o objs/src/os/unix/ngx_files.o objs/src/os/unix/ngx_socket.o objs/src/os/unix/ngx_recv.o objs/src/os/unix/ngx_readv_chain.o objs/src/os/unix/ngx_udp_recv.o objs/src/os/unix/ngx_send.o objs/src/os/unix/ngx_writev_chain.o objs/src/os/unix/ngx_channel.o objs/src/os/unix/ngx_shmem.o objs/src/os/unix/ngx_process.o objs/src/os/unix/ngx_daemon.o objs/src/os/unix/ngx_setproctitle.o objs/src/os/unix/ngx_posix_init.o objs/src/os/unix/ngx_user.o objs/src/os/unix/ngx_process_cycle.o objs/src/os/unix/ngx_linux_init.o objs/src/event/modules/ngx_epoll_module.o objs/src/os/unix/ngx_linux_sendfile_chain.o objs/src/event/ngx_event_openssl.o objs/src/core/ngx_regex.o objs/src/http/ngx_http.o objs/src/http/ngx_http_core_module.o objs/src/http/ngx_http_special_response.o objs/src/http/ngx_http_request.o objs/src/http/ngx_http_parse.o objs/src/http/ngx_http_header_filter_module.o objs/src/http/ngx_http_write_filter_module.o objs/src/http/ngx_http_copy_filter_module.o objs/src/http/modules/ngx_http_log_module.o objs/src/http/ngx_http_request_body.o objs/src/http/ngx_http_variables.o objs/src/http/ngx_http_script.o objs/src/http/ngx_http_upstream.o objs/src/http/ngx_http_upstream_round_robin.o objs/src/http/ngx_http_parse_time.o objs/src/http/modules/ngx_http_static_module.o objs/src/http/modules/ngx_http_index_module.o objs/src/http/modules/ngx_http_chunked_filter_module.o objs/src/http/modules/ngx_http_range_filter_module.o objs/src/http/modules/ngx_http_headers_filter_module.o objs/src/http/modules/ngx_http_not_modified_filter_module.o objs/src/http/ngx_http_busy_lock.o objs/src/http/ngx_http_file_cache.o objs/src/http/modules/ngx_http_gzip_filter_module.o objs/src/http/ngx_http_postpone_filter_module.o objs/src/http/modules/ngx_http_ssi_filter_module.o objs/src/http/modules/ngx_http_charset_filter_module.o objs/src/http/modules/ngx_http_userid_filter_module.o objs/src/http/modules/ngx_http_autoindex_module.o objs/src/http/modules/ngx_http_auth_basic_module.o objs/src/http/modules/ngx_http_access_module.o objs/src/http/modules/ngx_http_limit_zone_module.o objs/src/http/modules/ngx_http_limit_req_module.o objs/src/http/modules/ngx_http_realip_module.o objs/src/http/modules/ngx_http_geo_module.o objs/src/http/modules/ngx_http_map_module.o objs/src/http/modules/ngx_http_split_clients_module.o objs/src/http/modules/ngx_http_referer_module.o objs/src/http/modules/ngx_http_rewrite_module.o objs/src/http/modules/ngx_http_ssl_module.o objs/src/http/modules/ngx_http_proxy_module.o objs/src/http/modules/ngx_http_fastcgi_module.o objs/src/http/modules/ngx_http_uwsgi_module.o objs/src/http/modules/ngx_http_scgi_module.o objs/src/http/modules/ngx_http_memcached_module.o objs/src/http/modules/ngx_http_empty_gif_module.o objs/src/http/modules/ngx_http_browser_module.o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o objs/ngx_modules.o -L/usr/lib -lcrypt -lpcre -lssl -lcrypto -ldl -lz
distcc[24151] (dcc_spawn_child) child started as pid24152
distcc[24152] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distcc[24151] (dcc_collect_child) cc child 24152 terminated with status 0
distcc[24151] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt
distcc[24151] compile (null) on localhost completed ok
distcc[24151] (dcc_unlock) release lock fd5
distcc[24151] elapsed compilation time 0.093308s
distcc[24151] (dcc_exit) exit: code 0; self: 0.000000 user 0.001999 sys; children: 0.055991 user 0.033994 sys
distcc[24151] (dcc_cleanup_tempfiles_inner) deleted 0 temporary files

客户端是正在安装中的gentoo x86,
也有使用cchace

echo $PATH 为:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.4

配置如下:
# /etc/conf.d/distccd: config file for /etc/init.d/distccd
DISTCCD_OPTS=""
DISTCCD_EXEC="/usr/bin/distccd"
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.10.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.10.103"
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"

服务器端是openSUSE 11.3 x86
自己 svn up 的源代码安装的distcc  默认./configure
启动脚步如下


#! /bin/sh
. /etc/rc.status
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

DISTCC=/usr/local/bin/distccd
DISTCC_OPTS="--daemon --allow 192.168.10.103/24"
DISTCC_USER=daemon

rc_reset
case "$1" in
    start)
        echo -n "Starting distcc daemon"
        ## Start daemon with startproc(8). If this fails
        ## the echo return value is set appropriate.

        startproc -u $DISTCC_USER $DISTCC $DISTCC_OPTS

        # Remember status and be verbose
        rc_status -v
        ;;
   .............................

两边都能运行成功,emerge nginx 没感觉边快了多少。
不知道成功用上distcc没有
日志文件见附件。
发表于 2011-1-27 15:43:40 | 显示全部楼层
有monitor的,三个版本任君挑选:
/usr/bin/distccmon-text; /usr/bin/distccmon-gui; /usr/bin/distccmon-gnome
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-1-27 16:03:23 | 显示全部楼层
我用过distccmon-text 了,客户端和服务器端都没有任何输出

说明我未配置成功。

搞不懂了.
回复 支持 反对

使用道具 举报

发表于 2011-2-3 13:24:35 | 显示全部楼层
  1. DISTCC_DIR=${PORTAGE_TMPDIR}/portage/.distcc distccmon-text
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表