Starting and Stopping AFD


To start or stop the AFD there is a small program afd that can be used for this task. The program can take the following parameters:

   Usage: afd [-w <AFD working dir>] [-u[ <user>]] [option]
                 -a          only start AFD
                 -b          blocks starting of AFD
                 -c          only check if AFD is active
                 -C          check if AFD is active, if not start it
                 -d          only start afd_ctrl dialog
                 -h          only check for heartbeat
                 -H          check if heartbeat is active, if not start AFD
                 -i          initialize AFD, by deleting fifodir
                 -I          initialize AFD, by deleting everything
                             except for etc directory
                 -r          removes blocking startup of AFD
                 -s          shutdown AFD
                 -S          silent AFD shutdown
                 -z          set shutdown bit
                 --help      prints out this syntax
                 -v          just print version number
                 --version   show current version

Before starting make sure that you have done the following:

To start call afd with the option -a. The following process should be running after issuing the command (check with ps command):

    7604 ?        S      0:00 init_afd -w /home/afd
    7605 ?        S      0:00 system_log -w /home/afd
    7606 ?        S      0:00 receive_log -w /home/afd
    7607 ?        S      0:00 transfer_log -w /home/afd
    7608 ?        S      0:00 trans_db_log -w /home/afd
    7609 ?        S      0:00 archive_watch -w /home/afd
    7610 ?        S      0:00 input_log -w /home/afd
    7611 ?        S      0:00 output_log -w /home/afd
    7612 ?        S      0:00 delete_log -w /home/afd
    7613 ?        S      0:00 production_log -w /home/afd
    7614 ?        S      0:00 amg -w /home/afd
    7615 ?        S      0:00 afd_stat -w /home/afd
    7616 ?        S      0:00 fd -w /home/afd
    7617 ?        S      0:00 dir_check /home/afd 5 20 40

The first process init_afd is the most important one, since it starts and controls all other processes. Next amg, dir_check and fd should be up. If not look in $AFD_WORK_DIR/log/SYSTEM_LOG or $AFD_WORK_DIR/log/DAEMON_LOG.init_afd for any clues why it does not start.

Stopping AFD is done by calling afd with the -s option. With -S it will silently do the shutdown.

To initialize AFD use the -i option, this will delete everything in $AFD_WORK_DIR/fifodir. It will not delete any jobs queued by AFD or are currently being transmitted. This can only be done if AFD is not active. With -I everything will be reset as if AFD is started for the first time. This will also remove any current jobs being transmitted or queued by AFD.

If AFD is running on a system with shared disk and filesystem, use the -h or -H option to check if AFD is active. AFD has an internal heartbeat counter and with this option it checks if this counter is still updated by init_afd.


Copyright © 2005 - 2007 by H.Kiehl
Holger.Kiehl@dwd.de
Last updated: 03.08.2007
[red dot]Index [red dot]Home SourceForge.net Logo