# Tracing rc.d activity



## Hornpipe2 (Jan 18, 2011)

For whatever reason, my Apache server does not start up when I reboot my computer.  I always forget about this and then I need to start it manually with apachectl, a few days later or so.

Is there a way I can log rc.d as it executes different scripts, so I can see if I have a rogue rc script that is causing it to terminate early?


----------



## phoenix (Jan 18, 2011)

Add the following to /etc/rc.conf:

```
rc_debug="YES"           # Set to YES to enable debugging output from rc.d
```

From the rc.conf(5) man page:

```
rc_debug   (bool) If set to ``YES'', enable output of debug messages
           from rc scripts.  This variable can be helpful in diagnosing
           mistakes when editing or integrating new scripts.  Beware
           that this produces copious output to the terminal and
           syslog(3).
```


----------

