- The log files in the log directory All logs are stored in the $AFD_WORK_DIR/log directory. All but the statistics files are in plain ASCII, so they can be viewed with any editor. The logs are rotated automatically by AFD itself, either by date or size. The number at the end of the filename is the log number where zero is always the current log file. The higher the log number the older will be the log file. SYSTEM_LOG - Here all system events are logged, see following example: 13 13:20:45 Rereading DIR_CONFIG initiated by afd@x.x.x.x [udc] 13 13:20:45 There is no change in the HOST_CONFIG file. 13 13:20:45 Rereading DIR_CONFIG(s)... 13 13:20:46 Stopped dir_check (1.4.5-0.3.beta) 13 13:20:46 Found 868 directory entries with 5436 recipients in 2483 destinations. 13 13:20:46 Found 374 hosts in HOST_CONFIG. 13 13:20:46 Done with rereading DIR_CONFIG file. 13 13:20:46 3 directories not in the same filesystem as AFD. (create_db.c 1235) 13 13:20:46 Found 296 rename rule headers with 2596 rules. 13 13:20:46 Starting dir_check (1.4.5-0.3.beta) 13 14:00:00 Removed 5057 archives with 66651 files. 13 15:00:00 Removed 5284 archives with 69156 files. 13 16:00:00 Removed 6252 archives with 75648 files. 13 17:00:00 Removed 5337 archives with 67556 files. Log levels: - Information - Configuration - Warning - Error - Fatal - Offline - Debug - Trace <#> - Other information RECEIVE_LOG - Information what happens on input is logged in here and looks as follows: 17 13:06:17 faxe : Received 4 files with 42034 bytes. 17 13:06:17 afsv : Received 3 files with 486 bytes. 17 13:06:17 afsvmrz : Received 24 files with 1397162 bytes. 17 13:06:17 radarrefle: Received 7 files with 208606 bytes. 17 13:06:17 radarhdf5 : Received 3 files with 107720 bytes. 17 13:06:17 radarrefle: [18328] bzip2 -d rab02-tt_10169-20120917130539-ros---buf.bz2 17 13:06:17 radarhdf5 : [18330] bzip2 -d raa05-h5_10338-201209171305-han---hd5.bz2 17 13:06:17 radarvolum: Received 22 files with 383749 bytes. 17 13:06:17 radarvolum: [18333] bzip2 -d ras08-vscvol01_z_10-20120917130601-fld-10440--buf.bz2 17 13:06:17 radarvolun: Received 6 files with 1001656 bytes. 17 13:06:17 radarvolum: [18333] Exec time: 0.010s TRANSFER_LOG - Everything what happens during transmission is shown in this file: 17 13:06:12 sflxs267[0]: 413.221 KiB (423138 bytes) send in 6 file(s). [BURST] 17 13:06:12 sflxs384[0]: 413.221 KiB (423138 bytes) send in 6 file(s). [BURST] 17 13:06:12 sflxs349[0]: 413.221 KiB (423138 bytes) send in 6 file(s). [BURST] 17 13:06:12 jwsrpd01[0]: 2.504 KiB (2564 bytes) send in 1 file(s). [BURST] 17 13:06:12 zpce [1]: 498 bytes send in 6 file(s). [BURST] 17 13:06:12 PCmet2 [0]: 2.889 KiB (2958 bytes) send in 1 file(s). [BURST] 17 13:06:12 wiis-s1 [0]: 498 bytes send in 6 file(s). [BURST] 17 13:06:12 local [0]: File `/home1/afdftp/in/radar-volumen/odc/.opera' did already exist, removed it and linked again. #a1c59306 (sf_loc.c 613) 17 13:06:12 local [0]: 20.898 KiB (21400 bytes) moved in 3 file(s). [BURST] 17 13:06:12 R-zpcw [0]: No files found (0). 17 13:06:12 R-zpcw [0]: 226 Directory send OK. 17 13:06:12 RadQS_7 [0]: 413.221 KiB (423138 bytes) send in 6 file(s). [BURST] 17 13:06:12 wiis-s2 [0]: 498 bytes send in 6 file(s). [BURST] 17 13:06:12 BfS-SZ_2[0]: ftp_connect(): Failed to connect() to x.x.x.x : Connection timed out #bdaf1e66 (ftpcmd.c 393) 17 13:06:12 BfS-SZ_2[0]: FTP passive connection to `x.x.x.x' at port 21 failed (-1). #bdaf1e66 (sf_ftp.c 404) 17 13:06:13 product2[0]: 2.059 MiB (2159158 bytes) copied in 1 file(s). [BURST] 17 13:06:13 dupl-n [0]: Deleted 1 duplicate file(s) (2159158 bytes). 17 13:06:13 product2[0]: 94.505 KiB (96773 bytes) copied in 8 file(s). [BURST] 17 13:06:13 local [0]: 357.398 KiB (365976 bytes) moved in 2 file(s). [BURST] 17 13:06:13 local [1]: 63.650 KiB (65178 bytes) moved in 1 file(s). [BURST] The following log files are also ASCII but are more cryptic, detailed information of the meaning are in the documentation (see http://www.dwd.de/AFD/html-en/log.html). INPUT_LOG - Each file that enters AFD is logged here. PRODUCTION_LOG - Every file that is changed by AFD is logged here, also what was done with the file and how it changed (size, number, name). OUTPUT_LOG - Each individual send will be logged here. DELETE_LOG - All deleted files will be listed here together with the reason why and who deleted it. DAEMON_LOG.init_afd - Everything that might be written to STDOUT and/or STDERR is written to this file. - Log rotation The logs are rotated automatically by AFD itself, either by date or size. The number at the end of the filename is the log number where zero is always the current log file. The higher the log number the older will be the log file. In $AFD_WORK_DIR/etc/AFD_CONFIG one can configure when a log file is rotated and how many logs are kept. For example if one wants that the EVENT_LOG is rotated after it's size reaches 3 MiB and wants to keep 4 logs, the following entries are needed: MAX_EVE_LOGFILE_SIZE 3145728 MAX_EVENT_LOG_FILES 4 - ALDA, tool to analyze the log data Although there are graphical tools that display the cryptic output of INPUT_LOG, DISTRIBUTION_LOG, PRODUCTION_LOG, OUTPUT_LOG and DELETE_LOG, there is also a command line tool that prints this output in any form that the user wants. This tool is called alda (AFD Log Data Analyzer). To give a list of all file names that have entered AFD just issue the following command: alda -f -L I -o "%IF" To also show the size in bytes: alda -f -L I -o "%IF %ISB" To print the size not as decimal values but hexadecimal do: alda -f -L I -o "%IF %xISB" Now show the date when the filename entered AFD: alda -f -L I -o "%ITX %ITd.%ITm.%ITY %IF %ISB" To print all input file names and their size for a given time frame: alda -f -L I -t 08181913-08181914 -o "%ITX %ITd.%ITm.%ITY %IF %ISB" Search only for a certain input directory: alda -f -L I -d /home/afd/daten/intern/satbild -o "%IN %IF" Search for several input directories: alda -f -L I -d /home/afd/daten/intern/satbild,/home/afd/daten/extern/flora -o "%IN %IF" - Exercise Using alda, search for the file name that entered AFD with the file name 'alice'.