AFD Daemon


The process afdd is a daemon that runs in the background and listens on port AFD_TCP_PORT and waits for requests. This daemon will only run when AFD_TCP_PORT is set in AFD_CONFIG. The following lists of commands are supported by afdd:

Command Description Example return code
LRF Print content of rename rule file.
211- Command successful

[fiau]
fiau_*   *

[gisc]
*-*-*-*-*   %*1/%*2/%*3/%*4/%*5
200 End of data
       
QUIT Terminate session.
221 Goodbye.
SSTAT This command should be issued at the start of a session. It will return a summary status report of all hosts when this command is invoked. For the duration of the connection it will actively report any changes that might occur.
211- AFD status summary:
IS 0 0 187109699 1558 0 0 0 0
211- AFD host list:
NH 3
HL 0 intern localhost
EL 0 0 0 0 0 0
HL 1 fss_ 127.0.0.1 127.0.0.1
EL 1 0 0 0 0 0
HL 2 fiau localhost
EL 2 0 0 0 0 0
WD /home/afd/afd2
AV 1.3.0-pre14
MC 120
SR 397 ,,,,,
RH !!!!!!!!!!!!!!!!!!!!!0,!
SH !!!!!!!!!!!!!!!!!!!!!000
TH !!!!!!!!!!!!!!!!!!!!!,,,
AM 1
FD 1
AW 1
       
STAT Prints statistic of what has been done since last command. A more detailed description of the return code follows below.
211- AFD status summary:
IS 0 0 278358 2 0 0 0 0
       
HSTAT Prints host statistic of all hosts served by this AFD. A more detailed description of the return code follows below:
211- AFD host status:
NH 2
HL 0 ducktown 10.0.0.1 10.0.0.2
HS 0 0 0 0 11076342 2806595406387 0 0 1 1375344421
EL 0 0 0 0 0 0
HL 1 mail 10.0.0.4
HS 1 276 46 0 840 3226798 28 1089649 1 1375344401
EL 1 0 0 0 0 0
       

The meaning of the return code of the STAT and SSTAT commands is described in more details in the following table:

Parameter name Description Example
AM Status of AMG process. Possible values:
-3 Process has been stopped.
0 Not working.
1 Process is up and running.
19 Process is shutting down.
AM 1
AV Current AFD version.
AV 1.2.22
AW Status of archive_watch process. Possible values:
-3 Process has been stopped.
0 Not working.
1 Process is up and running.
19 Process is shutting down.
AW 1
DJ Danger number of jobs. As of this number, host will be automatically paused so that not to many jobs get queued.
DJ 4096
DL Directory list of the following form:
DL <dir_number> <dir ID> <dir alias> <dir name> [<original dir name>]
DL 0 f8cbd598 test /data0/afdftp/test ~afdftp/test afdftp
EL A list of host that are in error status. Syntax is as follows:
EL <host_number> <error code 1> ... <error code n>
The last 6 errors are shown. <error code 1> being the newes.

The meaning of the error numbers is as follows:

             0      Transfer success
             1      Connect error
             2      User error
             3      Password error
             4      Type error
             5      List error
             6      Mail error
             7      JID number not found
             8      Process was killed
             9      TLS/SSL authentification failed
            10      Failed to open remote file
            11      Failed to write to remote file
            12      Failed to close remote file
            13      Failed to move remote file
            14      Failed to change remote directory
            15      Failed to create remote lock file
            16      Failed to remove remote lock_file
            17      Failed to stat local file
            18      Failed to move local file
            19      Failed to rename local file
            20      Operation received timeout
            21      Received negative aknowledge
            22      Failed to read from remote file
            23      Failed to get size of remote file
            24      Failed to get date of remote file
            25      Failed to quit
            26      Failed to create directory
            27      Failed to change owner of file
            28      Connection reset by peer
            29      Connection refused
            30      Failed to open local file
            31      Failed to read from local file
            32      Failed to lock region in FSA
            33      Failed to unlock region in FSA
            34      Failed to allocate memory
            35      select error
            36      Failed to write to local file
            37      Failed to access target file/dir
            38      Local+remote size do not match
            40      Local file directory does not exist
            41      The message file does not exist
            50      Failed to send mail address
            51      Failed to send SMTP DATA command
            52      sigpipe error
            55      Error in MAP function
            56      External transmit failed
            60      Syntax error
            61      No files to send
            62      More files to send
EL 14 1 3 3 3 3
FD Status of FD process. Possible values:
-3 Process has been stopped.
0 Not working.
1 Process is up and running.
19 Process is shutting down.
FD 1
HL Contains information about a certain host. If the AFD serves more then one host, SSTAT will return all host each being separated by a linefeed newline combination. Syntax is as follows:
HL <host_number> <host alias> <real hostname 1> [<real hostname 2>]
HL 24 ducktown 10.0.0.1 10.0.0.2
HS Contains statistics about a certain host. Syntax is as follows:
HS <host_number> <host status> <error counter> <active transfers> <files send> <bytes send> <files queued> <bytes queued> <host toggle> <last successful transfer>
HS 24 0 0 1 102 24679822 1 1066 1 1375344401
IS Interval summary, showing what has happened since the last call of STAT or SSTAT. It contains the following information in the given order:
  • Files to be send
  • Bytes to be send
  • Bytes send per second
  • Files send per second
  • Total number of current errors
  • Number of error hosts
  • Number of active transfers
  • Jobs in queue
  • Files send
  • Bytes send
  • Total number of connections since last initialization
  • Total errors since last initialization
  • Files received
  • Bytes received
IS 48 973692840 1539134802 2388913707 0 0 263 14 2388913707 1638230914848082 61111817 337111 761012356 384606795190536
JL Job list of the following form:
JL <job_number> <job ID> <dir ID> <recipient string> <AMG options>
JL 0 b02cf7a6 f2cbd49a 1 file://localhost/tmp
Jl Same as above, only that this time some data is encoded.
Jl 0 b02cf9a6 f8cbd598 1 6jHej-#,Zn2p[i`=]rb\jr|X5TnmA~1Zm
LC Log configuration. Bitmask telling which logs can be retrieved. For more details on the bitmask see description on AFD_TCP_LOGS
LC 53232
MC Maximum number of connections.
MC 200
ND Number of directories.
ND 861
NH Number of hosts.
NH 207
NJ Number of jobs configured.
NJ 1568
RH Receive log history. The values returned here will be binary with the following meaning:
Sign in log Binary value Meaning
<I> 32 + 12 = 44 => ',' Information
<W> 32 + 14 = 46 => '.' Warning
<E> 32 + 16 = 48 => '0' Error
RH ,,,,,,,,,,,,,,,,,,,,,,,,
SH System log history. The values returned here will be binary with the following meaning:
Sign in log Binary value Meaning
  32 + 1 = 33 => '!' No information
<I> 32 + 12 = 44 => ',' Information
<C> 32 + 13 = 45 => '-' Configuration
<W> 32 + 14 = 46 => '.' Warning
<E> 32 + 16 = 48 => '0' Error
<F> 32 + 17 = 49 => '1' Fatal Error
SH ,,,,,,,,,,,,,,,,,,,,,,,!
SR System log radar. The first value is the number of SYSTEM_LOG entries. The values thereafter returned here will be binary with the following meaning:
Sign in log Binary value Meaning
<I> 32 + 12 = 44 => ',' Information
<C> 32 + 13 = 45 => '-' Configuration
<W> 32 + 14 = 46 => '.' Warning
<E> 32 + 16 = 48 => '0' Error
<F> 32 + 17 = 49 => '1' Fatal Error
SR 50248 ,,,,,
TH Transfer log history. The values returned here will be binary with the following meaning:
Sign in log Binary value Meaning
<I> 32 + 12 = 44 => ',' Information
<W> 32 + 14 = 46 => '.' Warning
<E> 32 + 16 = 48 => '0' Error
TH ,,,,,,,,,,,,,,,,,,,,,,,,
WD AFD working directory.
WD /home/donald/afd

Copyright © 2005 - 2013 by H.Kiehl
Holger.Kiehl@dwd.de
Last updated: 01.08.2013
[red dot]Index [red dot]Home