diagnose : debug application hasync
 
debug application hasync
Use this command to set the verbosity level and type of debug logs for HA synchronization.
Before you will be able to see any debug logs, you must first enable debug log output using the command diagnose debug.
To use this command, your administrator account’s access control profile requires only r permission in any profile area.
Syntax
diagnose debug application hasync [{-1 | 0 | 1 | 2 | 4 | 8}]
Variable
Description
Default
hasync [{-1 | 0 | 1 | 2 | 4 | 8}]
Optionally, type the number indicating the verbosity level and type of debugging messages to output to the CLI display after the command executes.
-1 — Display all messages.
 0 — Do not display messages.
 1 — Display application messages such as MD5 checksums for the configuration, and confirmation that the standby appliance received the synchronized data.
 2 — Display network transmission messages, such as ARP broadcasts and bridge down/up status changes.
 4 — Display packet transmission messages.
 8 — Display messages about configuration file (fwb_system.conf) merges.
If you omit the number, the CLI displays the current verbosity level:
hasync debug level is 0
0
Example
This example enables diagnostic debug logging in general, then specifically enables packet transmission logging of the HA synchronization daemon, hasyncd.
diagnose debug enable
diagnose debug application hasync level 4
The CLI displays output such as the following until the command is terminated:
FortiWeb # (ha_sync.c : 624) : No element in ha send queue
(ha_send_queue.c : 184) : add request to ha sendqueue success
(ha_send_queue.c : 184) : add request to ha sendqueue success
(ha_send_queue.c : 242) : read send request from local, len = 447
(ha_send_queue.c : 242) : read send request from local, len = 450
(ha_sync.c : 637) : Got an element from ha send queue
(ha_sync.c : 454) : msglen : 23, msgbuf : config system dns
end
 
(ha_sync_send.c : 475) : total cnt : 1, cur cnt : 0
(ha_sync_send.c : 357) : send buf len = 171
(ha_sync_send.c : 383) : sent conf(0) return 171 bytes
(ha_sync_send.c : 406) : Send conf success from [hbdev], and got reply
(ha_sync.c : 637) : Got an element from ha send queue
(ha_sync.c : 454) : msglen : 26, msgbuf : config system global
end
 
(ha_sync_send.c : 475) : total cnt : 1, cur cnt : 0
(ha_sync_send.c : 357) : send buf len = 174
(ha_sync_send.c : 383) : sent conf(0) return 174 bytes
(ha_sync_send.c : 406) : Send conf success from [hbdev], and got reply
(ha_sync.c : 624) : No element in ha send queue
(ha_sync.c : 624) : No element in ha send queue
(ha_sync.c : 624) : No element in ha send queue
(ha_send_queue.c : 184) : add request to ha sendqueue success
(ha_send_queue.c : 242) : read send request from local, len = 424
(ha_sync.c : 637) : Got an element from ha send queue
(ha_sync_send.c : 475) : total cnt : 1, cur cnt : 0
(ha_sync_send.c : 357) : send buf len = 178
(ha_sync_send.c : 383) : sent conf(0) return 178 bytes
(ha_sync_send.c : 406) : Send conf success from [hbdev], and got reply
(ha_sync.c : 624) : No element in ha send queue
(ha_sync.c : 624) : No element in ha send queue
(ha_sync_recv.c : 362) : Got an valid packet, len = 180
(ha_sync_recv.c : 759) : Enter Fun : sync_recv_msg
(ha_sync_recv.c : 248) : Enter Fun : _sync_packet_check_msg, buflen = 180
(ha_sync_recv.c : 262) : msg body ssid : AC6C02
(ha_sync_recv.c : 285) : add new pkt_ss_id to last_pkt_ss_id[8]
(ha_sync_recv.c : 780) : We recved an valid SYNC_MSG(29) packet
(ha_send_queue.c : 184) : add request to ha sendqueue success
(ha_send_queue.c : 242) : read send request from local, len = 440
(ha_send_queue.c : 184) : add request to ha sendqueue success
(ha_send_queue.c : 242) : read send request from local, len = 424
(ha_sync.c : 637) : Got an element from ha send queue
(ha_sync.c : 454) : msglen : 16, msgbuf : 2â¢O
(ha_sync_send.c : 475) : total cnt : 1, cur cnt : 0
(ha_sync_send.c : 357) : send buf len = 164
(ha_sync_send.c : 383) : sent conf(0) return 164 bytes
(ha_sync_send.c : 406) : Send conf success from [hbdev], and got reply
(ha_sync.c : 637) : Got an element from ha send queue
(ha_sync_send.c : 475) : total cnt : 1, cur cnt : 0
(ha_sync_send.c : 357) : send buf len = 178
(ha_sync_send.c : 383) : sent conf(0) return 178 bytes
(ha_sync_send.c : 406) : Send conf success from [hbdev], and got reply
The results indicate that, initially, the MD5 configuration hash did not indicate any configuration changes (No element in ha send queue). But then an administrator changed the configuration, perhaps through the web UI, and the appliance detected changes to its DNS (msgbuf : config system dns) and global (msgbuf : config system global) settings. The active appliance then sent the changes to the standby appliance (Send conf success from [hbdev], and got reply); causes of success or failure is detailed by other debugging messages, such as the number of items in the synchronization queue (total cnt : 1, cur cnt : 0), and the number of bytes transferred from the synchronization buffer (send buf len = 178).
Related topics
diagnose debug
diagnose debug console timestamp
diagnose debug info
diagnose debug reset
diagnose debug upload