[distcc] Eight little patches for distcc.

Dan Kegel dank at kegel.com
Wed Apr 5 18:46:25 GMT 2006

contains eight patches I'm using locally.
I'd be happy to recieve feedback on these if they're not good enough as-is.


01 is an already-posted patch that avoids problems with gdb
not being able to find source files.  I used to think this should
be fixed inside gcc, but distcc has to be able to handle old versions
of gcc, too.

02 is my little lsdistcc program which enumerates servers from DNS.

03 lets you recover from compilers with infinite loops (gcc-2.95.3 has plenty)

06 helps if you have lots of servers but no load balancer
It's better performance-wise than the other randomize patch

00 and 04 together add simple http-based monitoring to distcc.
e.g. if distcc7 is a distcc server, and you started it with the --stats option,
then viewing http://distcc7:3633 displays some useful statistics.
The message it displays is (including http header):

+HTTP/1.0 200 OK\n\
+Content-Type: text/plain\n\
+Connection: close\n\n\
+argv /distccd\n\
+dcc_tcp_accept %d\n\
+dcc_rej_bad_req %d\n\
+dcc_rej_overload %d\n\
+dcc_compile_ok %d\n\
+dcc_compile_error %d\n\
+dcc_compile_timeout %d\n\
+dcc_cli_disconnect %d\n\
+dcc_other %d\n\
+dcc_longest_job %s\n\
+dcc_longest_job_compiler %s\n\
+dcc_longest_job_time_msecs %d\n\
+dcc_max_kids %d\n\
+dcc_current_load %d\n\
+dcc_load1 %1.2lf\n\
+dcc_load2 %1.2lf\n\
+dcc_load3 %1.2lf\n\
+dcc_num_compiles1 %d\n\
+dcc_num_compiles2 %d\n\
+dcc_num_compiles3 %d\n\
+dcc_num_procstate_D %d\n\
+dcc_max_RSS %d\n\
+dcc_max_RSS_name %s\n\
+dcc_io_rate %d\n\
+dcc_free_space %d MB\n\

dcc_load[123] is system load average over last 1, 5, 15 minutes
dcc_num_compiles[123] is number of jobs in last 1, 5, 15 minutes

Wine for Windows ISVs: http://kegel.com/wine/isv

More information about the distcc mailing list