On a different terminal, perform a tail -fn0 /tmp/junklog.log, and you'll see that it's writing to that file also. Set the file readable and executable by all, run it, and you'll see it count time second by second. A Few Points on Installationįor the most part, djb's installation instructions are excellent, always assuming you're not installing it from a package manager (and I recommend you don't). Steve can be reached at his email address. Steve Litt is the author of the Universal Troubleshooting Process Courseware. In the words of Mark Antony, I came to explain daemontools, not to praise it. Your mileage may differ, but I consider daemontools not only a ruggedly simple monument to practicality, but also a work of art.Įnough introduction. You look at the filesystem, it makes sense, and you can even guess to a large degree what you're going to find in his code. Looking at the filesystems djb's software uses is like reading a document on the software. Eric Raymond says we should put software's complexity in the data, not the algorithm. Djb's use of a file's name and contents to represent a key->value pair is classic. Djb uses the Unix filesystem as a natural source of hierarchy, for configuration, grouping, and lots of stuff. Personally, I'm a big fan of the Linux Philosophy, and it's my opinion that djb's software takes the Linux Philosophy where it's never been before. With the impending systemd, and the proclamations of those evangelizing it, there's been an uptick in discussions of the Linux Philosophy. Once again, this isn't just running it in the background: It's controlling it with the svc command, examining it with svstat and svok, and having its every line to stdin and stdout sent to a log file whose format you control. You can daemonize pretty much any executable, even one never made to be a daemon. With daemontools, if you want to write your own daemon, you can write it as a normal program, and then just incorporate it into daemontools to daemonize it, with logs and restarts and control and everything. So, if you've read this far, I'll assume you're interested in maintaining your own computer system. Or any other init system (they're all bad, I think systemd is worse, but that's just my opinion.) If you don't care about the ability to take the metaphorical wrench to your computer, this web page has nothing for you, and you'll lose nothing by stopping at this point. As a matter of fact, this person probably would have no objection to systemd. The person wanting to use Linux as a more secure, no-cost Windows replacement wouldn't want to monkey around with daemontools. Of course, not everyone wants a 1959 Plymouth, and not everyone wants daemontools. daemontools is more like a 1959 Plymouth with a three on the tree and a flathead six: everything's visible, everything's easy to get to with only an editor, and it just works! Most init systems are like a 21st century car, so crammed full of smog equipment, computers, and other geegaws, that you need to have specialized tools and training to do the most mundane maintenance on them. Except for starting daemontools itself, daemontools works the same in any Unix like environment.Īs a matter of fact, even though the first sentence of this chapter mentioned systemd as a motive, it's also true for all the init systems. Every daemon you run out of daemontools is a daemon you can control with the svc command and examine with the svstat and svok commands, whether on systemd-mandatory Red Hat, systemd-verboten Funtoo, or any BSD. Every daemon you move out of systemd and into daemontools is another daemon whose log files you can read in text mode, natively. However, if you're anything like me, many of your daemons are rather independent.Įvery daemon you move out of systemd and into daemontools makes systemd a little less complex. At least you can't do it without some serious kludging. daemontools will never replace systemd, or any other init software, because it doesn't natively handle dependencies like "don't start Apache until the DNS server is started". Daemontools can do a lot of what systemd can do, in one tightly encapsulated, easy to understand, ingeniously simple package. With the impending Linux switch to systemd, daemontools by djb ( Daniel J.
0 Comments
Leave a Reply. |