Fortinet black logo

Handbook

Tools

Tools

This section describes the following troubleshooting tools:

execute commands

You can use the command-line interface (CLI) execute commands to run diagnostic utilities, such as nslookup, ping, and traceroute.

Execute Commands

Description

backup

Backup:

  • system configuration
  • Domain Blocklist
  • IPv4 Blocklist
  • diagnostics information
  • mysql database

to a tftp server

backupextdisk

Backup FortiDDoS information to external USB disk

bypass-traffic

Enable or Disable internal bypass data traffic

checklogdisk

Find and correct errors on the log disk

cleanup-db-transaction-log

Cleanup database transaction log files

date

Set system date and time

domain-blocklist (6.2.0)

Domain-blocklist related operations such as upload/download domain-blocklist file, append/delete/search/merge domain-blocklist, and reset

factoryreset

Reset system to factory default

formatextdisk

Format external USB disk

formatlogdisk

Format log disk to fix specific logging issues. The requirement to formatlogdisk should be a very rare occurrence unless suggested by FortiCare TAC or a Release Note after upgrade.

formatlogdisk deletes all the data, including MySQL database (attack log, event log) and RRDs (graphs) as well as the Boot Alternate Firmware partition. This does not delete the system configuration.

Before using formatlogdisk, use the RRD (Round-Robin-Database) diagnostic and repair commands in this section to check and repair the RRDs. These commands will not cause a reboot.

Note: formatlogdisk can take a significant amount of time — up to 15 minutes, depending on the model and will be in a reboot condition (GUI/CLI offline and interfaces in fail-open if enabled/supported). While executing formatlogdisk the system will fail-open/bypass supported traffic ports.

fortiguard-database-update

Update fortiguard-database

Note: this command does not work for VMs. In order to force a FortiGuard update on a VM, enter the shell and enter:

killall updated

This will force an update.

generate-traffic-stats

SPP generate traffic statistics

global-rrd-reset

Reset global RRDs in case of Interface and other global related chart mismatch

ipv4-blocklist (6.2.0)

IPv4-blocklist related operations such as upload/download IPv4-blocklist file, append/delete/search/merge IPv4-blocklist, and reset

mountextdisk

Mount external USB disk

nslookup

Test DNS server to obtain domain name or IP address mapping

ping

Send ICMP ECHO_REQUEST to network hosts with IPv4 address: ping <host name | host ipv4>

ping-option

ping option settings

ping6

Send ICMP6_ECHO_REQUEST to network hosts with IPv6 address: ping6 <host ipv6>

ping6-option

ping6 option settings

reboot

Reboot the system

recover-gui

Restarts all processes that may affect GUI operation. No impact on system operation.

reload

Reloads all appliance processes. Note that this will not reboot the system but will restart all NICs causing the taggle down and up.

repair-database-tables

Repair database tables

reset ipv4-blocklist domain-blocklist

Clear/delete:

  • IPv4 Blocklist
  • Domain Blocklist

restapi-restart

GUI may freeze at login. Use this command to restart the REST-API process, refresh the GUI. You may need to login again.

This does not affect any other system processes and does not reboot the system.

restore

Restore image or configuration from tftp or ftp server

restoreextdisk

Restore from external USB disk

rrd-reset

Reset all global and SPP RRDs

shutdown

Shutdown appliance

spp-factory-reset

Reset the threshold configuration and clear

traffic history for an SPP

spp-rrd-reset

Reset RRDs of a specific SPP in case of SPP related chart mismatch

telnet

Simple telnet client

telnettest

Test if we can telnet to a server

thresholds-emergency-setup

SPP emergency setup thresholds to adjust only certain key thresholds based on empirical knowledge

thresholds-factory-defaults

Reset the threshold configuration for an SPP

traceroute

Display possible routes (paths) to destination host

unmountextdisk

Unmount external USB disk

vmware

Upload license file from tftp server only for VM

diagnose commands

You can use the CLI diagnose commands to gather diagnostic information that can be useful to Fortinet Customer Care when diagnosing any issues with your system.

Diagnose Commands

Description

blocklisted ip list Displays the entire list of uploaded IP addresses for Global Protection > Blocklist > Blocklisted IPv4 tab
blocklisted domain list Displays the entire list of uploaded domains for Global Protection > Blocklist > Blocklisted Domains tab
dataplane

Additional options:

blocklisted-domain

Blocklisted Domains

blocklisted-ip

Blocklisted IPv4 addresses

dns-cache-table {summary | filter}

Detailed information about contents of DNS cache

dns-dqrm-table {summary | filter}

Detailed information about contents of DNS DQRM table

dns-lq-table {summary | filter}

Detailed information about contents of DNS LQ table

dns-profile

Configuration information for each DNS profile (listed in order)

dns-ttl-table {summary | filter}

Detailed information about contents of DNS TTL table

domain-reputation

Memory and usage of FortiGuard Domain Reputation table

dst-table {summary | filter}

Detailed information about contents of the system Destination table

dtls-profile

Configuration information for each DTLS profile (listed in order)

geo-ip {null | ip address}

Detailed information about the capacity and usage of the Geo-IP table | Geo-IP information for an IP address

http-profile

Configuration information for each HTTP profile (listed in order)

icmp-profile

Configuration information for each ICMP profile (listed in order)

interface

Status of all system interfaces

interface-hardware

Detailed information on configuration and traffic for all system interfaces

interface-inline-status

Operational status of each system port (not inline/bypass status which is get system bypass-status)

ip-profile

Configuration information for each IP profile (listed in order)

ip-reputation

Memory and usage of FortiGuard IP Reputation table

lip-table {summary | filter}

Detailed information about contents of the system Legitimate (non-spoofed) IP table

ntp-profile

Configuration information for each NTP profile (listed in order)

occupancy

Real-time numeric and % occupancy of many system tables

session {summary | filter}

Detailed information about contents of the system session table

spp {spp name}

Detailed configuration, traffic and drop information for the named SPP

src-table

Detailed information about contents of the system source table

ssltls-profile

Configuration information for each SSL/TLS profile (listed in order)

tcp-profile

Configuration information for each TCP profile (listed in order)

debug

Additional options:

application (EXPERT USE ONLY)

set/get debug level for daemons

cli (EXPERT USE ONLY)

set/get debug level for CLI and CMDB

crashlog {clear | get} (Use with care)

clear/get crashlog

dataplane (EXPERT USE ONLY)

dataplane

disable (EXPERT USE ONLY)

disable debug output

enable (EXPERT USE ONLY)

enable debug output

kernel (EXPERT USE ONLY)

set/get debug level for kernel

mysql-log {get} (EXPERT USE ONLY)

get mysql error log

nginx-log {get} (EXPERT USE ONLY)

get nginx error log

rrd_cmd_check

Perform RRD commands check. Will show errors only.

rrd_cmd_recreate

Re-create RRD commands – used for graphing

rrd_creation_status

Check RRD status for each SPP

rrd_files_check

Check RRD files count for each SPP

rrd_tune (not implemented)

Tune RRD database to eliminate drop count limit.

hardware

Additional options:

{get | set} (EXPERT USE ONLY)

Fortinet use only

Deviceinfo {nic | nic-detail}

List information for management ports

ioport (EXPERT USE ONLY)

Read data from a management port

pciconfig (EXPERT USE ONLY)

List information on PCI buses and connected devices

sysinfo {cpu | interrupts | iomem | ioports | memory | mtrr | slab | stream | df} (EXPERT USE ONLY)

List system hardware information

netlink

Provides various lists of primarily management port routing information

sniffer

Sniffer commands for management ports

system

Additional options:

(top}

{disk} (EXPERT USE ONLY)

Lists top FortiDDoS processes – not the same as Linus top which should not be used – see above.

Fortinet use only

Special Fortinet Support commands

The commands described in this section are useful when you are troubleshooting an issue with the help of Fortinet Technical Support. Your Fortinet contact might ask you to run these commands to gather data they need to troubleshoot system issues.

execute backup diag_info

This command exports diagnostic information to a remote TFTP server. The following information is exported:

  • System status
  • Current configuration
  • Hardware register values
  • Event and DDoS attack log database

Use the following command syntax:

# execute backup diag_info tftp <tftp_server_ipaddress>

The filename generated stems from the appliance serial number and date. For example, diag_info-FIVM08TM20090022-2015-03-07-16-57.tgz.

The archive includes four files with filenames similar to the following:

back_status-FIVM08TM20090022-2015-03-07-16-57

back_cfg-FIVM08TM20090022-2015-03-07-16-57

back_hw_reg-FIVM08TM20090022-2015-03-07-16-57

back_logs-FIVM08TM20090022-2015-03-07-16-57.tgz

The logs archive includes four files with filenames similar to the following:

elog@002e0000000001.MAI

elog@002e0000000001.MAD

dlog.MAI

dlog.MAD

get commands

Get Commands

Description

system performance

Displays real-time CPU and Memory % usage, matching GUI Dashboard > Status: System Resources panel.

Note: Standard Linux top command will not display correct system usage with DPDK processors.

Example:

CPU Usage(in percentage): 28

Memory Usage(in percentage): 30

Uptime: 1 days 12 hours 35 minutes

system status

Provides the following information (example):

Version:            FortiDDoS-1500F v6.4.0,build0764,220805
IP Reputation DB:   00001.00020 - 2013-01-22 10:52:12
Domain Reputation DB: 00005.858 - 2020-12-14
Serial-Number:      FI1K5FTE21000001
BIOS version:       00010003
Log disk:           Capacity 62 GB, Used 965 MB ( 1.50%), Free 61 GB
RRD disk:           Capacity 369 GB, Used 242 GB (65.57%), Free 127 GB
Hostname:           FI1K5FTE21000001
HA configured mode: standalone
HA effective mode:  standalone
Distribution:       International
License Type:       -
Uptime:             1 days  12 hours  33 minutes
Last reboot:        Mon Aug 08 18:14:46 2022 PDT
System time:        Wed Aug 10 06:48:45 2022 PDT

system sensors

Provides hardware operating sensor information for CPUs, system and PSUs.

transceiver status

Provides vendor, part number, serial number, voltage and optical power information from internal and pluggable SFPs if supported by the vendor.

transceiver status portx

Provides more detailed transceiver information for optical power, bias voltage, etc., if supported by the vendor.

Tools

This section describes the following troubleshooting tools:

execute commands

You can use the command-line interface (CLI) execute commands to run diagnostic utilities, such as nslookup, ping, and traceroute.

Execute Commands

Description

backup

Backup:

  • system configuration
  • Domain Blocklist
  • IPv4 Blocklist
  • diagnostics information
  • mysql database

to a tftp server

backupextdisk

Backup FortiDDoS information to external USB disk

bypass-traffic

Enable or Disable internal bypass data traffic

checklogdisk

Find and correct errors on the log disk

cleanup-db-transaction-log

Cleanup database transaction log files

date

Set system date and time

domain-blocklist (6.2.0)

Domain-blocklist related operations such as upload/download domain-blocklist file, append/delete/search/merge domain-blocklist, and reset

factoryreset

Reset system to factory default

formatextdisk

Format external USB disk

formatlogdisk

Format log disk to fix specific logging issues. The requirement to formatlogdisk should be a very rare occurrence unless suggested by FortiCare TAC or a Release Note after upgrade.

formatlogdisk deletes all the data, including MySQL database (attack log, event log) and RRDs (graphs) as well as the Boot Alternate Firmware partition. This does not delete the system configuration.

Before using formatlogdisk, use the RRD (Round-Robin-Database) diagnostic and repair commands in this section to check and repair the RRDs. These commands will not cause a reboot.

Note: formatlogdisk can take a significant amount of time — up to 15 minutes, depending on the model and will be in a reboot condition (GUI/CLI offline and interfaces in fail-open if enabled/supported). While executing formatlogdisk the system will fail-open/bypass supported traffic ports.

fortiguard-database-update

Update fortiguard-database

Note: this command does not work for VMs. In order to force a FortiGuard update on a VM, enter the shell and enter:

killall updated

This will force an update.

generate-traffic-stats

SPP generate traffic statistics

global-rrd-reset

Reset global RRDs in case of Interface and other global related chart mismatch

ipv4-blocklist (6.2.0)

IPv4-blocklist related operations such as upload/download IPv4-blocklist file, append/delete/search/merge IPv4-blocklist, and reset

mountextdisk

Mount external USB disk

nslookup

Test DNS server to obtain domain name or IP address mapping

ping

Send ICMP ECHO_REQUEST to network hosts with IPv4 address: ping <host name | host ipv4>

ping-option

ping option settings

ping6

Send ICMP6_ECHO_REQUEST to network hosts with IPv6 address: ping6 <host ipv6>

ping6-option

ping6 option settings

reboot

Reboot the system

recover-gui

Restarts all processes that may affect GUI operation. No impact on system operation.

reload

Reloads all appliance processes. Note that this will not reboot the system but will restart all NICs causing the taggle down and up.

repair-database-tables

Repair database tables

reset ipv4-blocklist domain-blocklist

Clear/delete:

  • IPv4 Blocklist
  • Domain Blocklist

restapi-restart

GUI may freeze at login. Use this command to restart the REST-API process, refresh the GUI. You may need to login again.

This does not affect any other system processes and does not reboot the system.

restore

Restore image or configuration from tftp or ftp server

restoreextdisk

Restore from external USB disk

rrd-reset

Reset all global and SPP RRDs

shutdown

Shutdown appliance

spp-factory-reset

Reset the threshold configuration and clear

traffic history for an SPP

spp-rrd-reset

Reset RRDs of a specific SPP in case of SPP related chart mismatch

telnet

Simple telnet client

telnettest

Test if we can telnet to a server

thresholds-emergency-setup

SPP emergency setup thresholds to adjust only certain key thresholds based on empirical knowledge

thresholds-factory-defaults

Reset the threshold configuration for an SPP

traceroute

Display possible routes (paths) to destination host

unmountextdisk

Unmount external USB disk

vmware

Upload license file from tftp server only for VM

diagnose commands

You can use the CLI diagnose commands to gather diagnostic information that can be useful to Fortinet Customer Care when diagnosing any issues with your system.

Diagnose Commands

Description

blocklisted ip list Displays the entire list of uploaded IP addresses for Global Protection > Blocklist > Blocklisted IPv4 tab
blocklisted domain list Displays the entire list of uploaded domains for Global Protection > Blocklist > Blocklisted Domains tab
dataplane

Additional options:

blocklisted-domain

Blocklisted Domains

blocklisted-ip

Blocklisted IPv4 addresses

dns-cache-table {summary | filter}

Detailed information about contents of DNS cache

dns-dqrm-table {summary | filter}

Detailed information about contents of DNS DQRM table

dns-lq-table {summary | filter}

Detailed information about contents of DNS LQ table

dns-profile

Configuration information for each DNS profile (listed in order)

dns-ttl-table {summary | filter}

Detailed information about contents of DNS TTL table

domain-reputation

Memory and usage of FortiGuard Domain Reputation table

dst-table {summary | filter}

Detailed information about contents of the system Destination table

dtls-profile

Configuration information for each DTLS profile (listed in order)

geo-ip {null | ip address}

Detailed information about the capacity and usage of the Geo-IP table | Geo-IP information for an IP address

http-profile

Configuration information for each HTTP profile (listed in order)

icmp-profile

Configuration information for each ICMP profile (listed in order)

interface

Status of all system interfaces

interface-hardware

Detailed information on configuration and traffic for all system interfaces

interface-inline-status

Operational status of each system port (not inline/bypass status which is get system bypass-status)

ip-profile

Configuration information for each IP profile (listed in order)

ip-reputation

Memory and usage of FortiGuard IP Reputation table

lip-table {summary | filter}

Detailed information about contents of the system Legitimate (non-spoofed) IP table

ntp-profile

Configuration information for each NTP profile (listed in order)

occupancy

Real-time numeric and % occupancy of many system tables

session {summary | filter}

Detailed information about contents of the system session table

spp {spp name}

Detailed configuration, traffic and drop information for the named SPP

src-table

Detailed information about contents of the system source table

ssltls-profile

Configuration information for each SSL/TLS profile (listed in order)

tcp-profile

Configuration information for each TCP profile (listed in order)

debug

Additional options:

application (EXPERT USE ONLY)

set/get debug level for daemons

cli (EXPERT USE ONLY)

set/get debug level for CLI and CMDB

crashlog {clear | get} (Use with care)

clear/get crashlog

dataplane (EXPERT USE ONLY)

dataplane

disable (EXPERT USE ONLY)

disable debug output

enable (EXPERT USE ONLY)

enable debug output

kernel (EXPERT USE ONLY)

set/get debug level for kernel

mysql-log {get} (EXPERT USE ONLY)

get mysql error log

nginx-log {get} (EXPERT USE ONLY)

get nginx error log

rrd_cmd_check

Perform RRD commands check. Will show errors only.

rrd_cmd_recreate

Re-create RRD commands – used for graphing

rrd_creation_status

Check RRD status for each SPP

rrd_files_check

Check RRD files count for each SPP

rrd_tune (not implemented)

Tune RRD database to eliminate drop count limit.

hardware

Additional options:

{get | set} (EXPERT USE ONLY)

Fortinet use only

Deviceinfo {nic | nic-detail}

List information for management ports

ioport (EXPERT USE ONLY)

Read data from a management port

pciconfig (EXPERT USE ONLY)

List information on PCI buses and connected devices

sysinfo {cpu | interrupts | iomem | ioports | memory | mtrr | slab | stream | df} (EXPERT USE ONLY)

List system hardware information

netlink

Provides various lists of primarily management port routing information

sniffer

Sniffer commands for management ports

system

Additional options:

(top}

{disk} (EXPERT USE ONLY)

Lists top FortiDDoS processes – not the same as Linus top which should not be used – see above.

Fortinet use only

Special Fortinet Support commands

The commands described in this section are useful when you are troubleshooting an issue with the help of Fortinet Technical Support. Your Fortinet contact might ask you to run these commands to gather data they need to troubleshoot system issues.

execute backup diag_info

This command exports diagnostic information to a remote TFTP server. The following information is exported:

  • System status
  • Current configuration
  • Hardware register values
  • Event and DDoS attack log database

Use the following command syntax:

# execute backup diag_info tftp <tftp_server_ipaddress>

The filename generated stems from the appliance serial number and date. For example, diag_info-FIVM08TM20090022-2015-03-07-16-57.tgz.

The archive includes four files with filenames similar to the following:

back_status-FIVM08TM20090022-2015-03-07-16-57

back_cfg-FIVM08TM20090022-2015-03-07-16-57

back_hw_reg-FIVM08TM20090022-2015-03-07-16-57

back_logs-FIVM08TM20090022-2015-03-07-16-57.tgz

The logs archive includes four files with filenames similar to the following:

elog@002e0000000001.MAI

elog@002e0000000001.MAD

dlog.MAI

dlog.MAD

get commands

Get Commands

Description

system performance

Displays real-time CPU and Memory % usage, matching GUI Dashboard > Status: System Resources panel.

Note: Standard Linux top command will not display correct system usage with DPDK processors.

Example:

CPU Usage(in percentage): 28

Memory Usage(in percentage): 30

Uptime: 1 days 12 hours 35 minutes

system status

Provides the following information (example):

Version:            FortiDDoS-1500F v6.4.0,build0764,220805
IP Reputation DB:   00001.00020 - 2013-01-22 10:52:12
Domain Reputation DB: 00005.858 - 2020-12-14
Serial-Number:      FI1K5FTE21000001
BIOS version:       00010003
Log disk:           Capacity 62 GB, Used 965 MB ( 1.50%), Free 61 GB
RRD disk:           Capacity 369 GB, Used 242 GB (65.57%), Free 127 GB
Hostname:           FI1K5FTE21000001
HA configured mode: standalone
HA effective mode:  standalone
Distribution:       International
License Type:       -
Uptime:             1 days  12 hours  33 minutes
Last reboot:        Mon Aug 08 18:14:46 2022 PDT
System time:        Wed Aug 10 06:48:45 2022 PDT

system sensors

Provides hardware operating sensor information for CPUs, system and PSUs.

transceiver status

Provides vendor, part number, serial number, voltage and optical power information from internal and pluggable SFPs if supported by the vendor.

transceiver status portx

Provides more detailed transceiver information for optical power, bias voltage, etc., if supported by the vendor.