/[gentoo]/xml/htdocs/doc/en/distcc.xml
Gentoo

Diff of /xml/htdocs/doc/en/distcc.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.29
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.3 2003/09/08 08:09:02 blubber Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.29 2005/07/02 04:50:55 smithj Exp $ -->
4 4
5<guide link="/doc/en/distcc.xml"> 5<guide link="/doc/en/distcc.xml">
6 6
7<title>Gentoo Distcc Documentation</title> 7<title>Gentoo Distcc Documentation</title>
8 8
9<author title="Author"> 9<author title="Author">
10 <mail link="lisa@gentoo.org">lisa@gentoo.org</mail> 10 <mail link="lisa@gentoo.org">Lisa Seelye</mail>
11</author>
12
13<author title="Editor">
14 <mail link="vapier@gentoo.org">Mike Frysinger</mail>
15</author>
16
17<author title="Editor">
18 <mail link="erwin@gentoo.org">Erwin</mail>
19</author>
20
21<author title="Editor">
22 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
23</author>
24
25<author title="Editor">
26 <mail link="pylon@gentoo.org">Lars Weiler</mail>
11</author> 27</author>
12 28
13<author title="Reviewer"> 29<author title="Reviewer">
14 <mail link="swift@gentoo.org">swift@gentoo.org</mail>
15</author>
16
17<author title="Reviewer">
18 <mail link="blubber@gentoo.org">blubber@gentoo.org</mail> 30 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
19</author> 31</author>
20 32
33<abstract>
34This document serves as a HOWTO for using distcc with Gentoo.
35</abstract>
36
37<!-- The content of this document is licensed under the CC-BY-SA license -->
38<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
39<license/>
40
21<version>1.1</version> 41<version>1.12</version>
22<date>September 08, 2003</date> 42<date>2005-07-01</date>
23
24<abstract>This document serves as a HOWTO for using distcc with Gentoo.</abstract>
25 43
26<chapter> 44<chapter>
27 <title>Introduction</title> 45<title>Introduction</title>
28 <section> 46<section>
29 <title>What is distcc?</title> 47<title>What is distcc?</title>
30 <body> 48<body>
31 <p>Distcc is a program designed to distribute compiling tasks across a network to participating hosts. It is comprised of a server, <c>distccd</c> and a client program, <c>distcc</c>. Distcc can work transparently with <uri link="http://ccache.samba.org">ccache</uri> and Portage with a little set up.</p> 49
50<p>
51Distcc is a program designed to distribute compiling tasks across a network to
52participating hosts. It is comprised of a server, <c>distccd</c>, and a client
53program, <c>distcc</c>. Distcc can work transparently with <uri
54link="http://ccache.samba.org">ccache</uri>, Portage, and Automake with a
55little setup.
56</p>
57
32 </body> 58</body>
33 </section> 59</section>
34
35 <section> 60<section>
36 <title>Dependancies</title> 61<title>Using distcc to bootstrap</title>
37 <body> 62<body>
38 <pre caption="Distcc Dependancies"> 63
39&gt;=sys-apps/portage-2.0.46-r11 64<p>
40&gt;=sys-devel/gcc-config-1.3.1 65If you are planning on using distcc to help you bootstrap a Gentoo
41&gt;sys-apps/shadow 66installation, make sure you read the section <uri link="#bootstrapping">Using
42<codenote>(As of version 2.8) And the following optional dependancies when you have <c>gtk</c> in your <c>USE</c> flags</codenote> 67distcc to Bootstrap</uri>, which is situated further down in this document.
43&gt;=x11-libs/gtk+-2.2.1 68</p>
44 </pre> 69
45 </body> 70</body>
46 </section> 71</section>
47</chapter> 72</chapter>
48 73
49<chapter> 74<chapter>
50 <title>Setup</title> 75<title>Setup</title>
51 <section> 76<section>
77<title>Dependencies</title>
78<body>
79
80<p>
81In order to use Distcc, all of the computers on your network need to have the
82same GCC versions. For example, mixing 3.3.x (where the x varies) is okay, but
83mixing 3.3.x with 3.2.x <b>may</b> result in compilation errors or runtime
84errors.
85</p>
86
87</body>
88</section>
89<section>
90<title>Installing Distcc</title>
91<body>
92
93<p>
94There are a couple of options you should be aware of before you start
95installing distcc.
96</p>
97
98<p>
99Distcc ships with a graphical monitor to monitor tasks that your computer is
100sending away for compilation. If you use Gnome then put 'gnome' in your USE
101flags. However, if you don't use Gnome and would still like to have the
102monitor then you should put 'gtk' in your USE flags.
103</p>
104
105<pre caption="Installing distcc">
106# <i>emerge distcc</i>
107</pre>
108
109</body>
110</section>
111<section>
52 <title>Setting up Portage to use Distcc</title> 112<title>Setting up Portage to use Distcc</title>
53 <body> 113<body>
54 <p>Setting up distcc is very easy to do with Portage. Follow these simple steps on each computer you want to use distcc on:</p> 114
115<p>
116Setting up Portage to use distcc is easy. Execute the following steps on
117each system that should participate in the distributed compiling:
118</p>
119
55 <pre caption="Integrating Distcc and Portage"> 120<pre caption="Integrating Distcc and Portage">
56# <i>emerge distcc</i> 121# <i>emerge distcc</i>
57# <i>nano -w /etc/make.conf</i> 122# <i>nano -w /etc/make.conf</i>
58<codenote>Edit your FEATURES flags to include &quot;distcc&quot;</codenote> 123<comment>(Set N to a suitable number for your particular setup)</comment>
124<comment>(A common strategy is setting N as twice the number of total CPUs + 1
125available)</comment>
126MAKEOPTS="-jN"
127<comment>(Add distcc to your FEATURES)</comment>
128FEATURES="distcc"
59 </pre> 129</pre>
60 130
61 <p>Next you have to specify what hosts you want to use. To do this you can use the <i>distcc-config</i> command to set that list of hosts. Here is an example of some hosts that might be in your list:</p> 131</body>
132</section>
133<section>
134<title>Specifying Participating Hosts</title>
135<body>
136
137<p>
138Use the <c>distcc-config</c> command to set the list of hosts. Here is an
139example of some hosts that might be in your list:
140</p>
141
62 <pre caption="Examples of host definitions"> 142<pre caption="Examples of host definitions">
63192.168.0.1 192.168.0.2 192.168.0.3 143192.168.0.1 192.168.0.2 192.168.0.3
64192.168.0.1/2 192.168.0.2 192.168.0.3/10 144192.168.0.1/2 192.168.0.2 192.168.0.3/10
65192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4 145192.168.0.1:4000/2 192.168.0.2/1 192.168.0.3:3632/4
66@192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3 146@192.168.0.1 @192.168.0.2:/usr/bin/distccd 192.168.0.3
147<comment>(There are also several other methods of setting up hosts. See the
148distcc manpage for more details.)</comment>
149<comment>If you wish to compile on the local machine you should put 'localhost'
150in the hosts list. Conversely if you do not wish to use the local machine to
151compile (which is often the case) omit it from the hosts list. On a slow
152machine using localhost may actually slow things down. Make sure to test your
153settings for performance.</comment>
67 </pre> 154</pre>
68 <p>It may all look complicated, but in most cases a variant of line 1 or 2 will work. An explanation of each line is: Line 1 is just a space-delimited list of hosts that will use default everything. Line 2 is a list of hosts that specifies the maxmimum number of jobs (by use of the /N) to send that host at any given time (specified with the <c>/n</c>). Since most people won't be using lines 3 or 4, I'll <uri link="http://distcc.samba.org/man/distcc_1.html">point you to</uri> the distcc docs for more information.</p> 155
69 <p>A sample command to set the hosts (for line 1) is:</p> 156<p>
157It may all look complicated, but in most cases a variant of line 1 or 2 will
158work.
159</p>
160
161<p>
162Since most people won't be using lines 3 or 4, I'll <uri
163link="http://distcc.samba.org/man/distcc_1.html">refer to</uri> the distcc
164docs (man distcc) for more information.
165</p>
166
167<p>
168For instance, to set the first line in the previous example:
169</p>
170
70 <pre caption="Sample command to set the hosts"> 171<pre caption="Sample command to set the hosts">
71# <i>/usr/bin/distcc-config --set-hosts "192.168.0.1 192.168.0.2 192.168.0.3</i> 172# <i>/usr/bin/distcc-config --set-hosts "192.168.0.1 192.168.0.2 192.168.0.3"</i>
72 </pre> 173</pre>
73 174
74 <p>The final step to integrating distcc into Portage is to re-open your <path>/etc/make.conf</path> and edit <c>MAKE_OPTS</c> to include <c>-jN</c> (where N is an integer). Typically you will want to set this to the total number of processors in your network plus one.</p> 175<p>
75 <pre caption="Final steps in make.conf"> 176Edit <path>/etc/conf.d/distccd</path> to your needs and be sure to set the
177<c>--allow</c> directive to allow only hosts you trust. For added security,
178you should also use the <c>--listen</c> directive to tell the distcc daemon
179what IP to listen on (for multi-homed systems). More information on distcc
180security can be found at <uri
181link="http://distcc.samba.org/security.html">Distcc Security Design</uri>.
182</p>
183
184<impo>
185It is important to use --allow and --listen. Please read the distccd manpage
186or the above seurity document for more information.
187</impo>
188
189
190<p>
191Now start the distcc daemon on all the participating computers:
192</p>
193
194<pre caption="Starting the distcc daemon">
195<comment>(Add distccd to the default runlevel)</comment>
196# <i>rc-update add distccd default</i>
197<comment>(Start the distcc daemon)</comment>
198# <i>/etc/init.d/distccd start</i>
199</pre>
200
201</body>
202</section>
203<section>
204<title>Setting up Distcc to Work With Automake</title>
205<body>
206
207<p>
208This is, in some cases, easier than the Portage setup. What you have to do is
209update your <c>PATH</c> variable to include <path>/usr/lib/distcc/bin</path>
210in front of the directory that contains <c>gcc</c> (<path>/usr/bin</path>).
211However, there is a caveat. If you use ccache you have to put distcc after
212the ccache part:
213</p>
214
215<pre caption="Setting your path">
216# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i>
217<comment>You can put this in your .bashrc or equivelant file to have the PATH
218set every time you log in</comment>
219</pre>
220
221<p>
222Then, as you would normally type <c>make</c>, you would type <c>make -jN</c>
223(where N is an integer). The value of N depends on your network and the types
224of computers you are using to compile. Test your own settings to find the
225number that yields the best performance.
226</p>
227
228</body>
229</section>
230</chapter>
231
232<chapter>
233<title>Cross-Compiling</title>
234<section>
235<title>A Note on Cross-Compiling</title>
236<body>
237
238<p>
239Cross-compiling is using one architecture to build programs for another
240architecture. This can be as simple as using an Athlon (i686) to build a
241program for a K6-2 (i586), or using a Sparc to build a program for a ppc.
242</p>
243
244</body>
245</section>
246<section>
247<title>An Introduction to Cross-Compiling</title>
248<body>
249
250<p>
251If you want to give cross-compiling a try you can to follow <uri
252link="http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO">The Cross Compile
253HOWTO</uri>; Crossdev is deprecated.
254</p>
255
256</body>
257</section>
258</chapter>
259
260<chapter id="bootstrapping">
261<title>Using Distcc to Bootstrap</title>
262<section>
263<title>Step 1: Configure Portage</title>
264<body>
265
266<p>
267Boot your new box with a Gentoo Linux LiveCD and follow the <uri
268link="/doc/en/handbook/handbook-x86.xml?part=1">installation instructions</uri>
269up until the bootstrapping part. Then configure Portage to use distcc:
270</p>
271
272<pre caption="Preliminary Setup">
76# <i>nano -w /etc/make.conf</i> 273# <i>nano -w /etc/make.conf</i>
274<comment>(Add distcc to the FEATURES</comment>
275FEATURES="distcc"
276<comment>(Modify MAKEOPTS to include -jN, where N is twice the number of CPUs
277+1 available)</comment>
77MAKE_OPTS=-jN 278MAKEOPTS="-jN"
78 </pre> 279</pre>
79 </body> 280
80 </section>
81 <section>
82 <title>Setting up Distcc to Work With Automake</title>
83 <body>
84 <p>This is in some cases easier than the Portage setup. What you have to do is update your <c>PATH</c> envvar to include <path>/usr/lib/distcc/bin</path> before where gcc (<path>/usr/bin</path>). However, there is a caveat. If you use ccache you have to put distcc after the ccache part. Like so:</p>
85 <pre caption="Setting your path"> 281<pre caption="Setting your path">
86# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i> 282# <i>export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"</i>
87 </pre> 283</pre>
88 <p>Then, as you would normally type <c>make</c>, you would type <c>make -jN</c> (where N is an integer). A safe number to use for N varries on your network and the types of computers you are using to compile. For me, I have a dual processor P3 and a K6-2/400 that compile everything for my desktop (a 1200MHz Athlon Thunderbird) and I use -j5. Test your own settings to find the right number.</p> 284
89 </body> 285</body>
90 </section> 286</section>
287<section>
288<title>Step 2: Getting Distcc</title>
289<body>
290
291<p>
292Before the installation of distcc, a user called distcc must be added to the
293<path>/etc/passwd</path>:
294</p>
295
296<pre caption="Create user distcc">
297# <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" &gt;&gt;/etc/passwd</i>
298</pre>
299
300<impo>
301It is important to note that adding users like this is very bad. We only do
302it here because there is no <c>useradd</c> utility (which you normally use for
303adding users) yet at this stage of installation.
304</impo>
305
306<p>
307Install distcc:
308</p>
309
310<pre caption="Getting Distcc on the new box">
311# <i>USE='-*' emerge --nodeps sys-devel/distcc</i>
312</pre>
313
314</body>
315</section>
316<section>
317<title>Step 3: Setting Up Distcc</title>
318<body>
319
320<p>
321Run <c>distcc-config --install</c> to setup distcc:
322</p>
323
324<pre caption="Final distcc setup">
325<comment>(Substitute host1, host2, ... with the IP number(s) of the
326participating hosts)</comment>
327# <i>/usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i>
328<comment>An example: <i>/usr/bin/distcc-config --set-hosts "localhost
329192.168.0.4 192.168.0.6"</i></comment>
330</pre>
331
332<p>
333Distcc is now set up to bootstrap! Continue with the official installation
334instructions and <e>do not forget</e> to re-emerge distcc after <c>emerge
335system</c>. This is to make sure that all of the dependencies you want are
336installed as well.
337</p>
338
339<note>
340During bootstrap and <c>emerge system</c> distcc may not appear to be used.
341This is expected as some ebuilds do not work well with distcc, so they
342intentionally disable it.
343</note>
344
345</body>
346</section>
91</chapter> 347</chapter>
92 348
93<chapter> 349<chapter>
94 <title>Cross-Compiling</title> 350<title>Troubleshooting</title>
95 <section> 351<section>
96 <title>A Note on Cross-Compiling</title> 352<title>Mozilla and Xfree</title>
97 <body> 353<body>
98 <p>Cross-compiling is using one architecture to build programs for another architecture. This can be as simple as using an Athlon (i686) to build a program for a K6-2 (i586), or using a Sparc to build a program for a ppc.</p> 354
355<p>
356As you emerge various packages, you'll notice that some of them aren't being
357distributed (and aren't being built in parallel). This is because the
358developers of the Mozilla and Xfree ebuilds intentionally disable parallel
359building because it is known to cause problems.
360</p>
361
362<p>
363Sometimes distcc might cause a package to fail to compile. If this happens
364for you, please <uri link="http://bugs.gentoo.org">report</uri> it to us.
365</p>
366
99 </body> 367</body>
100 </section> 368</section>
101 <section> 369<section>
102 <title>A Personal Note on Cross-compiling</title> 370<title>A Mixture of hardened-gcc and non-hardened-gcc Hosts Will Be Faulty</title>
103 <body> 371<body>
104 <p>I'd love to be able to help out on the Gentoo Cross-compiling effort, but I don't have any non-x86 machines. I can create things that work <e>in theory</e>, but I have to rely on other people to test what I write. That works to an extent, but it's tough. ;-)</p> 372
105 <p>In the near future I hope to acquire a Sparc of some type to put Gentoo on so I can play around in-house.</p> 373<p>
374With such a long title any explanation here is almost irrelevent. However, if
375you plan to use distcc across hosts that have the <uri
376link="/proj/en/hardened/etdyn-ssp.xml">PaX/hardened-gcc</uri> and some that do
377not, you will run into problems.
378</p>
379
380<p>
381The solution requires a little foresight on your part; you have to run
382<c>hardened-gcc -R</c> on the host that has PaX/hardened-gcc, or you have to
383enable PaX protections in your kernel and <c>emerge hardened-gcc</c>. Both of
384which are a good thing to do since for the most part the protections offered
385by both packages is a good thing and is transparent to the user.
386</p>
387
106 </body> 388</body>
107 </section> 389</section>
390<section>
391<title>Mixed GCC Versions</title>
392<body>
393
394<p>
395If you have different GCC versions on your hosts, there will likely be very
396weird problems. The solution is to make certain all hosts have the same GCC
397version.
398</p>
399
400<p>
401Recent Portage updates have made Portage use <c>${CHOST}-gcc</c> instead of
402<c>gcc</c>. This means that if you're mixing i686 machines with other types
403(i386, i586) you will run into problems. A workaround for this may be to
404<c>export CC='gcc' CXX='c++'</c> or to put it in <path>/etc/make.conf</path>.
405</p>
406
407<impo>
408Doing this explicitly redefines some behaviour of Portage and may have some
409weird results in the future. Only do this if you're mixing CHOSTs.
410</impo>
411
412
413</body>
414</section>
108</chapter> 415</chapter>
109 416
110<chapter> 417<chapter>
111 <title>Known Problems With Distcc</title>
112 <section>
113 <title>Portage Doesn't Work With Distcc</title>
114 <body>
115 <p>This heading is a misnomer, really. The only thing that doens't work is the monitoring programs (<c>distccmon-text</c> and <c>distccmon-gnome</c>) with the standard distcc source. The reason for this is that distcc relies on the <c>TMPDIR</c> envvar, but Portage reassigns that.</p>
116 <p>The solution to this is a patch that changes the dependancy to <c>DISTCC_TMPDIR</c>. The patch is automatically applied to distcc. If you don't want to use <path>/tmp</path> (the default) you can reassign <c>DISTCC_TMPDIR</c>.</p>
117 <p>You may also notice that Distcc does not work with some packages. This can be a result of several things, such as an error in the .ebuild (Using <c>make</c> instead of <c>emake</c>) or an error in the program's Makefile, which the next section addresses.</p>
118 </body>
119 </section>
120 <section>
121 <title>Mozilla and Xfree</title>
122 <body>
123 <p>As you emerge various packages, you'll notice that they aren't being distributed (and indeed aren't being built in parallel). This is because the developers of Mozilla and Xfree .ebuilds disabled parallel building because it is known to cause problems. This isn't necessarily a distcc problem.</p>
124 <p>That isn't to say that sometimes distcc will cause a package to fail to compile.</p>
125 </body>
126 </section>
127</chapter>
128
129<chapter>
130 <title>Using Distcc to Bootstrap</title>
131 <section>
132 <title>Step 1: Build the Tarball</title>
133 <body>
134 <p>This section is helpful if you want to use Distcc during the Gentoo installation. Surprisingly it isn't that hard. What you'll need is another computer running Gentoo and a way to transfer a tarball to your new system (I use scp).</p>
135 <p>First you have to build a tarball of Distcc and include a library (<c>/usr/lib/libpopt.so.*</c>).</p>
136 <pre caption="Building the tarball">
137<i># USE='-gtk -selinux' emerge --buildpkg distcc
138# mkdir -p /tmp/distcc/usr/lib
139# cp /usr/portage/packages/sys-devel/distcc-DISTCC_VERSION.tbz2 /tmp/distcc/
140# cp /usr/lib/libpopt.so.* /tmp/distcc/usr/lib
141# cd /tmp/distcc
142# tar cfzv distcc.tar.gz *</i>
143<codenote>Be sure you replace DISTCC_VERSION with the version (and Gentoo revision) of Distcc, <c>like 2.10-r1</c></codenote>
144 </pre>
145 </body>
146 </section>
147 <section>
148 <title>Step 2: Setup on New Box</title>
149 <body>
150 <impo>Do not forget to start sshd and reset the root password for the LiveCD!</impo>
151 <p>Next, you have to boot your new box with a Gentoo Linux LiveCD and follow all of the steps up until the bootstrapping. Then procede with a little preliminary setup on the new box.</p>
152 <pre caption="Preliminary Setup">
153<codenote>Here we add distcc to FEATURES</codenote>
154<i># echo "FEATURES=\"\${FEATURES} distcc\"" >> /etc/make.conf</i>
155<codenote>You can also use <c>nano</c> to edit <c>/etc/make.conf</c> and manually add distcc to FEATURES.</codenote>
156<i># echo "MAKEOPTS=\"\${MAKEOPTS} -jN\"" >> /etc/make.conf</i>
157<codenote>Just like above, you can use <c>nano</c> to edit <c>/etc/make.conf</c> and manually change MAKEOPTS.</codenote>
158 </pre>
159 <p>Then add the distcc user to your <c>/etc/passwd</c>:</p>
160 <pre caption="Add the distcc user to /etc/passwd">
161<i># echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >>/etc/passwd</i>
162<codenote>Do not forget the `<c>&gt;&gt;</c>'</codenote>
163 </pre>
164 </body>
165 </section>
166 <section>
167 <title>Step 3: Copy the Tarball</title>
168 <body>
169 <p>Next you will want to copy the distcc tarball that you made.</p>
170 <pre caption="Copy the tarball to the new box">
171<codenote>Execute this on the "old" box</codenote>
172<i># scp /tmp/distcc/distcc.tar.gz root@ip.of.new.box:/mnt/gentoo/</i>
173<codenote>Substitute <c>ip.of.new.box</c> for your new box's IP</codenote>
174 </pre>
175 </body>
176 </section>
177
178 <section>
179 <title>Step 4: Unpacking the Tarball</title>
180 <body>
181 <pre caption="Unpack the tarball">
182<i># tar xvfz distcc.tar.gz
183# tar xvfjp distcc-DISTCC_VERSION.tbz2</i>
184<codenote>Be sure you replace DISTCC_VERSION with the version (and Gentoo revision) of Distcc, <c>like 2.10-r1</c></codenote>
185 </pre>
186 </body>
187 </section>
188
189 <section>
190 <title>Step 5: Setting Up Distcc Itself</title>
191 <body>
192 <p>Now set up distcc itself...</p>
193 <pre caption="Final distcc setup">
194<i># /usr/bin/distcc-config --install
195# /usr/bin/distcc-config --set-hosts "localhost host1 host2 host3 ..."</i>
196 </pre>
197
198 <p>distcc should be set up now to bootstrap! Continue the official install guide, and dont forget to re-emerge distcc after <c>emerge system</c>.</p>
199 </body>
200 </section>
201</chapter>
202
203
204<chapter>
205 <title>Distcc Extras</title> 418<title>Distcc Extras</title>
206 <section> 419<section>
207 <title>Distcc Monitors</title> 420<title>Distcc Monitors</title>
208 <body> 421<body>
209 <p>Distcc ships with two monitors. The text-based one is always built, it is called <c>distccmon-text</c>. Running it for the first time can be a bit confusing, but it is really quite easy to use. If you run the program with no parameter it will run once. However, if you pass it a number it will update every N seconds, where N is the argument you passed.</p> 422
210 <p>The other monitor is only turned on if you enabled <c>gtk</c> in your <c>USE</c> flags. This one is GTK+ based and runs in an X environment, and it is quite lovely.</p> 423<p>
211 <p>There is a caveat to using these programs. If you want to monitor any emerge, you have to start the monitor like so:</p> 424Distcc ships with two monitors. The text-based one is always built and is
425called <c>distccmon-text</c>. Running it for the first time can be a bit
426confusing, but it is really quite easy to use. If you run the program with no
427parameter it will run once. However, if you pass it a number it will update
428every N seconds, where N is the argument you passed.
429</p>
430
431<p>
432The other monitor is only turned on if you enabled <c>gtk</c> or <c>gnome</c>
433in your <c>USE</c> flags. This one is GTK+ based, runs in an X environment
434and it is quite lovely. For Gentoo the GUI monitor has been called
435<c>distccmon-gui</c> for less confusion. Elsewhere it may be referred to as
436<c>distccmon-gnome</c>.
437</p>
438
212 <pre caption="Starting the monitors"> 439<pre caption="Starting the monitors">
213<i>sudo -u portage distccmon-text N</i> 440# <i>distccmon-text N</i>
214<codenote>Or you can start the graphical monitor...</codenote> 441<comment>(Or)</comment>
215<i>sudo -u portage distccmon-gnome</i> 442# <i>distccmon-gui</i>
216<note>If you aren't using <c>userpriv</c> in your FEATURES, you should not use the '-u portage' part.</note> 443<comment>To monitor Portage's distcc usage you can use:</comment>
444# <i>DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text N</i>
445<comment>(Or)</comment>
446# <i>DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-gui</i>
217 </pre> 447</pre>
448
449<impo>
450If your distcc directory is elsewhere, change the DISTCC_DIR variable
451accordingly.
452</impo>
453
218 </body> 454</body>
219 </section> 455</section>
220</chapter>
221
222<chapter> 456</chapter>
223 <title>Future Plans for Distcc and Gentoo</title>
224 <section>
225 <title>distcc-subnetscan</title>
226 <body>
227 <p><c>distcc-subnetscan</c> is a perl program in development that will scan a subnet for hosts that have a participating distcc daemon. Even this will be enhanced to test if the daemon on a remote host will conform to a specific <c>CHOST</c> setting to make cross-compiling easier.</p>
228 <p>The perl script is being kept at <uri link="http://dev.gentoo.org/~lisa/distcc/distcc-subnetscan/distcc-subnetscan.pl">right here</uri> until a more formal home can be found.</p>
229 </body>
230 </section>
231 <section>
232 <title>distcc-config</title>
233 <body>
234 <p><c>distcc-config</c>, the userland configuration tool for distcc is out of date. Soon it will be rewritten to be brought up the current version of distcc.</p>
235 </body>
236 </section>
237</chapter>
238
239</guide> 457</guide>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20