Like any other piece of software (and information generally), daemontools comes with NO WARRANTY. Things you have to decide before starting: * Where programs will be installed, normally /usr/local/bin. To change this directory, edit conf-bin now. * Where man pages will be installed, normally /usr/local/man. To change this directory, edit conf-man now. How to install: 1. Compile the programs: % make 2. Create the formatted man pages, *.0: % make man 3. Install the programs and man pages: # make setup 4. Run instcheck to make sure it doesn't print any warnings: % make check How to test: 5. Feed a few lines of data to accustamp: % (echo one; echo two) | ./accustamp 869197736.542713 one 869197736.542752 two Each line will be prefixed with a number. 6. Feed the current date through accustamp and tailocal: % date | ./accustamp | ./tailocal 1997-07-17 22:50:03.262569 Thu Jul 17 22:50:03 CDT 1997 The initial date and time will agree with the rest of the line. 7. Create two test directories: % mkdir test1 test2 Run a supervised sleep service using the first test directory: % ./supervise test1 sleep 6000 & Run a supervised date service, initially stopped, using the second test directory: % ./supervise -s test2 date & Check the status of the two services: % ./svstat test1 test2 869199160 up pid 5260 869199165 down % ./svstat test1 test2 | ./tailocal 1997-07-17 23:12:40 up pid 5260 1997-07-17 23:12:45 down 8. Kill the sleep process, using the pid shown by svstat, to simulate a crash: % kill 5260 Check the sleep status again: % ./svstat test1 | ./tailocal 1997-07-17 23:14:22 up pid 5281 You will see the pid of the new sleep process. 9. Bring the sleep service down: % ./svc -d test1 % ./svstat test1 | ./tailocal 1997-07-17 23:16:12 down, normally up 10. Bring it back up: % ./svc -u test1 % ./svstat test1 | ./tailocal 1997-07-17 23:16:59 up pid 5306 11. Run the date program once: % ./svc -o test2 Thu Jul 17 23:17:30 CDT 1997 The date will be printed after a second by the background supervised date service. 12. Bring the date service up, pause five seconds, and then bring it back down: % ./svc -u test2; sleep 5; ./svc -d test2 Thu Jul 17 23:17:47 CDT 1997 Thu Jul 17 23:17:48 CDT 1997 Thu Jul 17 23:17:49 CDT 1997 Thu Jul 17 23:17:50 CDT 1997 The date will be printed 4 or 5 times, about once per second. 13. Check whether testfilelock detects that supervise is running: % ./testfilelock test1/lock && echo 'supervise is running' supervise is running 14. Bring both services down, and destroy the supervise processes: % ./svc -dx test1 test2 Then try to use svc: % ./svc -u test1 test2 svc: warning: unable to control test1: device not configured svc: warning: unable to control test2: device not configured Try testfilelock again: % ./testfilelock test1/lock || echo 'supervise is not running' supervise is not running 15. Create another test directory: % mkdir test3 Feed some text to cyclog: % ./cyclog -s 2000 -m 80 -n 5 test3 < Makefile cyclog will pause for about 10 seconds. Check that there are at most 5 files in test3, each under 2000 bytes: % ls -l test3 total 10 -r--r--r-- 1 djb 1963 Jul 18 00:06 @00000869202382 -r--r--r-- 1 djb 1949 Jul 18 00:06 @00000869202383 -r--r--r-- 1 djb 1929 Jul 18 00:06 @00000869202384 -r--r--r-- 1 djb 1945 Jul 18 00:06 @00000869202385 -r--r--r-- 1 djb 1236 Jul 18 00:06 @00000869202386 16. Find the total size of the files in test3: % cat test3/* > test3.cat % wc -c test3.cat 9022 test3.cat Extract that many bytes from the end of the cyclog input, and compare it to the results stored in test3: % tail -9022c Makefile | cmp - test3.cat 17. As root, check setuser's group membership assignment: # ./setuser joe groups Replace joe with your username. You should see your normal gid and nothing else. Under Solaris, make sure to use /usr/ucb/groups; /usr/bin/groups is broken. 18. Run fifo to print everything fed to a file: % ./fifo testp & Make sure that it works: % echo hi > testp hi 19. Check whether ./usually /dev/null echoes lines to stderr: % echo hi | ./errorsto testp ./usually /dev/null > /dev/null hi Check whether it skips blank lines: % echo '' | ./errorsto testp ./usually /dev/null > /dev/null 20. Check whether ./usually rereads its patterns on a HUP: % echo two > test.usu % ( echo three; sleep 3; echo three >> test.usu; sleep 1; \ ./svc -h test1; sleep 2; echo three; sleep 2; ./svc -kx test1 ) \ | ./errorsto testp ./supervise test1 ./usually test.usu You should see a pause of one second, ``three'' twice, a pause of five seconds, ``three'' once, and a pause of two seconds. Now kill the background fifo process from step 18. That's it! To report success: % ( echo 'First M. Last'; cat `cat SYSDEPS` ) \ | mail djb-qst@koobera.math.uic.edu Replace First M. Last with your name.