1distccd(1)                  General Commands Manual                 distccd(1)
2
3
4

NAME

6       distccd - distributed C/C++ compiler server
7

SYNOPSIS

9       distccd --daemon [OPTIONS]
10

DESCRIPTION

12       distccd  is  the  server  for  the  distcc(1) distributed compiler.  It
13       accepts and runs compilation jobs for network clients.
14
15       distcc can run over either TCP or a connection command such as  ssh(1).
16       TCP  connections are fast but relatively insecure.  SSH connections are
17       secure but slower.
18
19       For SSH connections, distccd must be installed  on  the  volunteer  but
20       should  not  run  as a daemon -- it will be started over SSH as needed.
21       SSH connections have several advantages: neither the client nor  server
22       listens  on  any new ports; compilations run with the privileges of the
23       user that requested them; unauthorized users cannot access the  server;
24       and source and output is protected in transit.
25
26       For  TCP  connections,  distccd can run either from an inetd-style pro‐
27       gram, or as  a  standalone  server.   Standalone  mode  is  recommended
28       because  it  is  slightly more efficient and allows distccd to regulate
29       the number of incoming jobs.  The --listen and --allow options  can  be
30       used for simple IP-based access control.
31
32       distcc  may  be  started  either  by root or any other user.  If run by
33       root, it gives away privileges and changes to the user specified by the
34       --user  option,  or  the  user  called  "distcc",  or  the  user called
35       "nobody".
36
37       distccd does not have a configuration  file;  it's  behaviour  is  con‐
38       trolled only by command-line options and requests from clients.
39

STANDALONE SERVER

41       The  recommended  method for running distccd is as a standalone server.
42       distccd will listen for network connections and fork several child pro‐
43       cesses to serve them.
44
45       If  you  installed  distcc  using a packaged version you may be able to
46       start the server using the standard mechanism for your  operating  sys‐
47       tem, such as
48
49              # service distcc start
50
51       To  start  distccd  as  a  standalone  service, run a command like this
52       either as root or an ordinary user:
53
54              # distccd --daemon
55

RUNNING FROM INIT

57       distccd may be run as a standalone daemon under the control of  another
58       program  like  init(8) or daemontools.  The super-server starts distccd
59       when the system boots, and whenever it exits.
60
61       distccd should be started just as for a standalone server, except  that
62       the --no-detach option should be used so that the super-server can mon‐
63       itor it.
64
65       For example, to add distccd as a process to Linux  sysvinit,  add  this
66       line to /etc/inittab
67
68              dscc:2345:respawn:/usr/local/bin/distccd  --verbose  --no-detach
69              --daemon
70

RUNNING FROM INETD

72       distccd may be started from a network super-server  such  as  inetd  or
73       xinetd.  In this case inetd listens for network connections and invokes
74       distccd when one arrives.
75
76       This is slightly less efficient than running a standalone distccd  dae‐
77       mon.   distccd  is  not  able to regulate the number of concurrent jobs
78       accepted, but there may be an option in your inetd configuration to  do
79       so.
80
81       For  traditional  Unix  inetd,  a  line  like  this  can  be  added  to
82       /etc/inetd.conf:
83
84              distcc  stream  tcp  nowait.6000   root   /usr/local/bin/distccd
85              distccd --inetd
86
87       inetd  imposes  a limit on the rate of connections to a service to pro‐
88       tect against accidental or intentional overuse.  The default  in  Linux
89       NetKit  inetd is 40 per minute, which is far  too low for distccd.  The
90       .6000 option raises the limit to 6000 per minute.
91

TERMINATING DISTCCD

93       To shut down a standalone server, send a SIGTERM signal to  the  parent
94       process.   The most reliable way to do this from a script is to use the
95       --pid-file option to record its process ID.  Shutting down  the  server
96       in this way should allow any jobs currently in progress to complete.
97

OPTIONS

99       --help Display summary usage information.
100
101       --version
102              Shows the daemon version and exits.
103
104       -j, --jobs JOBS
105              Sets  a  limit on the number of jobs that can be accepted at any
106              time.  By default this is set to two greater than the number  of
107              CPUs  on  the machine, to allow for some processes being blocked
108              on network IO.  (Daemon mode only.)
109
110       -N, --nice NICENESS
111              Makes the daemon more nice about giving  up  the  CPU  to  other
112              tasks  on  the machine.  NICENESS is an increment to the current
113              priority of the process.  The range of priorities depends on the
114              operating system but is typically 0 to 20.  By default the nice‐
115              ness is increased by 5.
116
117       -p, --port PORT
118              Set the TCP port to listen on, rather than the default of  3632.
119              (Daemon mode only.)
120
121       --listen ADDRESS
122              Instructs  the  distccd  daemon  to  listen  on  the  IP address
123              ADDRESS.  This can be useful for access  control  on  dual-homed
124              hosts.  (Daemon mode only.)
125
126       -P, --pid-file FILE
127              Save daemon process id to file FILE.  (Daemon mode only.)
128
129       --user USER
130              If distccd gets executed as root, change to user USER.
131
132       -a, --allow IPADDR[/MASK]
133              Instructs  distccd  to  accept  connections  from the IP address
134              IPADDR.  A CIDR mask length can be supplied optionally  after  a
135              trailing  slash,  e.g.  192.168.0.0/24,  in which case addresses
136              that match in the most significant MASK bits  will  be  allowed.
137              If  no  --allow  options are specified, all clients are allowed.
138              Unauthorized connections are rejected by closing the TCP connec‐
139              tion immediately.  A warning is logged on the server but nothing
140              is sent ot the client.
141
142       --no-detach
143              Do not detach from the shell that started the daemon.
144
145       --no-fork
146              Don't fork children for each connection, to allow attaching gdb.
147              Don't use this if you don't understand it!
148
149       --log-file FILE
150              Send  messages to file FILE instead of syslog.  Logging directly
151              to a file is significantly faster than going via syslog  and  is
152              recommended.
153
154       --log-level LEVEL
155              Set  the  minimum severity of error that will be included in the
156              log file.  Useful if you only want to see error messages  rather
157              than  an  entry  for  each  connection.  LEVEL can be any of the
158              standard syslog levels, and in particular critical, error, warn‐
159              ing, notice, info, or debug.
160
161       --log-stderr
162              Send  log  messages  to stderr, rather than to a file or syslog.
163              This is mainly intended for use in debugging.   Do  not  use  in
164              inetd mode.
165
166       --verbose
167              Include debug messages in log.  Equivalent to --log-level=debug
168
169       --wizard
170              Turn  on all options appropriate for starting distccd under gdb:
171              run as a daemon, log verbosely to stderr, and do not  detach  or
172              fork.  For wizards only.
173
174       --inetd
175              Serve a client connected to stdin/stdout.  As the name suggests,
176              this option should be used when distccd is  run  from  within  a
177              super-server  like inetd.  distccd assumes inetd mode when stdin
178              is a socket.
179
180       --daemon
181              Bind and listen on a socket, rather  than  running  from  inetd.
182              This  is  used for standalone mode.  distccd assumes daemon mode
183              at startup if stdin is a tty, so --daemon should  be  explicitly
184              specified when starting distccd from a script or in a non-inter‐
185              active ssh connection.
186

SEARCH PATHS

188       distcc can pass either a relative or an absolute name for the  compiler
189       to distccd.  If distcc is given an explicit absolute compiler filename,
190       that name is used verbatim on both the client and server.  If the  com‐
191       piler  name  is  not an absolute path, or if the client is used in mas‐
192       querade mode, then the server's PATH is searched.
193
194       distccd inherits its search path from its parent process.   By  default
195       distccd  tries  to remove directories that seem to contain distccd mas‐
196       querade  links,  to   guard   against   inadvertent   recursion.    The
197       DISTCCD_PATH environment variable may be used to set the path.
198
199       The  search  path is logged when --verbose is given.  In case of confu‐
200       sion, check the logs.
201
202       When distccd is run over ssh, the $HOME/.ssh/environment  file  may  be
203       useful in setting the path.  See ssh(1).
204

DIAGNOSTICS

206       distccd  logs  messages  to  syslog's daemon facility by default, which
207       normally writes to /var/log/daemon or /var/log/messages.  Log  messages
208       can be sent to a different file using the --log-file option.
209

ENVIRONMENT VARIABLES

211       DISTCCD_PATH
212              When  starting  distccd,  if  this  value is set it will be used
213              unaltered for the command-execution PATH.  The  code  that  nor‐
214              mally  tries  to  remove masquerade directories from the path is
215              skipped.
216
217       DISTCC_SAVE_TEMPS
218              If set to 1, temporary files are not deleted after use.
219
220       Note that DISTCC_LOG does  not  affect  the  log  destination  for  the
221       server.
222
223       DISTCC_TCP_DEFER_ACCEPT
224              On  Linux, turn on the TCP_DEFER_ACCEPT socket option.  Defaults
225              to on.
226
227       TMPDIR Directory for temporary files such as preprocessor  output.   By
228              default /tmp/ is used.
229

SEE ALSO

231       distcc(1), ccache(1), gcc(1), make(1) http://distcc.samba.org/
232

BUGS

234       IP-based  access  control is not secure against attackers able to spoof
235       TCP connections, and cannot discriminate different users on a client.
236
237       TCP connections are not secure against attackers  able  to  observe  or
238       modify network traffic.
239
240       Because ccache does not cache compilation from .i files, it is not use‐
241       ful to call it from distccd.
242

LICENCE

244       You are free to use distcc.  distcc  (including  this  manual)  may  be
245       copied, modified or distributed only under the terms of the GNU General
246       Public Licence version 2 or later.  distcc  comes  with  absolutely  no
247       warrany.  A copy of the GPL is included in the file COPYING.
248

AUTHOR

250       distcc  was  written  by Martin Pool <mbp@sourcefrog.net>, with the co-
251       operation of many scholars including Wayne Davison, Frerich Raabe, Dim‐
252       itri  Papadopoulos  and  others  noted in the NEWS file.  Please report
253       bugs to <distcc@lists.samba.org>.
254
255
256
257                                23 October 2003                     distccd(1)
Impressum