Fortinet white logo
Fortinet white logo

User Guide

Command Line Interface (CLI) Reference

Command Line Interface (CLI) Reference

The following commands are supported for FortiAIOps.

Configuration Commands

The following commands are available to configure FortiAIOps.

Command

Parameters

Description

config system interface

edit <interface port>

Edit the interface port and enter the port setting mode in the CLI.

?

Displays the various parameters available for this command.

abort

Aborts the port setting mode and exits.

next

Returns to the interface configuration mode.

set mode <static|DHCP>

Configure the port IP address mode; static or DHCP.

set ip <IP/netmask>

Configure the port IP address (static).

set allowaccess <ssh|https|http|ping>

Configure the admin access type; SSH, THHP, HTTPS, Ping, or SNMP.

get

Obtain the system information.

show

Displays the current interface configuration details.

end

Exit the port configuration mode; the configuration changes then take effect.

config system

admin

Configures admin users.

edit admin - Edit admin user details.

set password - Set the admin user password.

dns

Configures DNS and enters the DNS configuration mode.

set primary - Configures the primary DNS server.

global

Configures global settings and enters the global configuration mode.

interface

Configures the system interface.

ntp

Configures system NTP information.

  • set ntpsync - Enable/disable the system time by synchronizing with the NTP server.

  • set ntpserver - Configure the IP address or hostname of the NTP servers (up to 10).

lldp-transmission

LLDP is enabled by default on all interfaces, global and per interface settings. Run the following commands to manage LLDP.

config system global
set lldp-transmission
enable <enable LLDP>
disable <disable LLDP>

Show Commands

The following commands can be used for viewing configuration information.

Command

Parameters

Description

show

Displays bootstrap configuration.

show full-configuration

Displays all configuration (includes defaults).

Diagnostic Commands

The following commands are used to diagnose and troubleshoot issues.

Command

Parameters

Description

diagnose

?

Displays the various parameters available for this command.

hardware ?

Displays the various parameters available for this command.

hardware deviceinfo disk

Displays information of all disks.

hardware deviceinfo nic

Display the available list of NICs.

hardware deviceinfo <nic name>

Displays information of a specific NIC.

hardware deviceinfo tpm

Displays Trusted Platform Module (TPM) module information.

hardware lspci

Displays the PCI parameters.

hardware lspci tree

Displays PCI bus tree.

hardware lspci verbose

Displays detailed information about all devices.

hardware sysinfo ?

Displays the various parameters available for this command.

hardware sysinfo cpu

Displays detailed information for all installed CPU(s).

hardware sysinfo interrupts

Displays details of system interruptions.

hardware sysinfo iomem

Displays the memory map of I/O ports.

hardware sysinfo ioports

Display the address list of I/O ports.

hardware sysinfo memory

Displays the system memory details.

hardware sysinfo mtrr

Displays the memory type range register.

hardware sysinfo slab

Displays the memory allocation information.

diagnose system

top all

Displays the top threads information.

top cpu

Displays processes with the highest CPU usage at the top of the list.

load

Displays system uptime and load information.

process <cpu | mem> <num>

Displays the processes sorted by specified criteria (default 10 processes).

fsck harddisk

Check and repair the file system, then reboot the system.

raid hwinfo

Displays raid controller information.

raid hwinfodetail

Displays detailed raid controller information.

raid migrate

Migrate to a new disk.

raid rebuild

Rebuild the existing disk.

disk attributes

Displays vendor specific Self-Monitoring, Analysis, and Reporting Technology (SMART) attributes.

disk errors

Displays SMART error logs.

disk health

Displays SMART health status.

disk info

Displays SMART information.

diagnose debug application location

0

Reset: Resets the logging level in the backend.

1

Error: Logs only critical failures or errors.

2

Warn: Logs errors and potential issues (warnings).

3

Info: Logs standard operational events.

4

Debug: Logs detailed information useful for troubleshooting specific bugs.

5

Trace: Traces the code execution path.

Management Commands

The following enable some management and other operations in FortiAIOps.

Command

Parameters

Description

execute

?

Displays the various parameters available for this command.

date <YYYY-MM-DD>

Set the date in the YYYY-MM-DD format.

time <HH:MM:SS>

Set the time in the HH:MM:SS format.

factoryreset reboot

Reset to the factory default settings and reboot the system.

factoryreset shutdown

Reset to the factory default settings and shutdown the system.

formatlogdisk

Format the log disk.

ping <destination>

Ping the host name or IPv4 address.

traceroute <destination>

Traceroute of the host name or IPV4 address.

reboot

Reboot the system.

shutdown

Shut down the device.

backup config ftp <path> <server fqdn|ipaddr>[:port] [ftp_user] [ftp_passwd]

Creates a remote backup of the configuration file from an FTP server.

backup config tftp <filename> <server fqdn|ipaddr>

Creates a remote backup of the configuration file from a TFTP server.

restore image ftp <filename string> <ftp server>[:port] [ftp_user] [ftp_passwd]

Restores the firmware image from an FTP server using specific details.

restore image tftp <filename string> <tftp server>

Restores the firmware image from a TFTP server.

dns-no-domain

The DNS No Domain events are disabled in FortiAIOps, by default. Run the following commands to enable these events.

execute dns-no-domain
disable <disable the events>
enable <enable the events>
status <show the current setting>

sensor list

Displays sensor list and status from IPMI.

format disk 0

Create RAID 0 and format disk.

format disk 1

Create RAID 1 and format disk.

format disk 5

Create RAID 5 and format disk.

format disk 10

Create RAID 10 and format disk.

System Information

The following commands information related to the system configurations.

Command

Parameters

Description

get system

?

Displays the various parameters available for this command.

status

Displays system status, such as, version, serial number, BIOS details, time stamp, hostname, and so on.

admin

Displays the configuration details of the admin users.

admin <username>

Displays the configuration details of a specific admin user.

dns

Displays the DNS configuration.

global

Displays the configuration details of global attributes.

interface

Displays the interface details, status, and IP address.

interface <port>

Displays the port details, status, and IP address.

ntp

Displays the configuration details and status of NTP server.

Diagnostic Tool Commands

Use the following command to run diagnostics using the CLI:

Command

Parameters

Description

execute diagnostics

all System

Executes all application and logs diagnostics.

download <ftp_server>[:port] [ftp_user] [ftp_passwd] [ftp_path]

Download diagnostics file from the local system to a remote destination.

Command Line Interface (CLI) Reference

Command Line Interface (CLI) Reference

The following commands are supported for FortiAIOps.

Configuration Commands

The following commands are available to configure FortiAIOps.

Command

Parameters

Description

config system interface

edit <interface port>

Edit the interface port and enter the port setting mode in the CLI.

?

Displays the various parameters available for this command.

abort

Aborts the port setting mode and exits.

next

Returns to the interface configuration mode.

set mode <static|DHCP>

Configure the port IP address mode; static or DHCP.

set ip <IP/netmask>

Configure the port IP address (static).

set allowaccess <ssh|https|http|ping>

Configure the admin access type; SSH, THHP, HTTPS, Ping, or SNMP.

get

Obtain the system information.

show

Displays the current interface configuration details.

end

Exit the port configuration mode; the configuration changes then take effect.

config system

admin

Configures admin users.

edit admin - Edit admin user details.

set password - Set the admin user password.

dns

Configures DNS and enters the DNS configuration mode.

set primary - Configures the primary DNS server.

global

Configures global settings and enters the global configuration mode.

interface

Configures the system interface.

ntp

Configures system NTP information.

  • set ntpsync - Enable/disable the system time by synchronizing with the NTP server.

  • set ntpserver - Configure the IP address or hostname of the NTP servers (up to 10).

lldp-transmission

LLDP is enabled by default on all interfaces, global and per interface settings. Run the following commands to manage LLDP.

config system global
set lldp-transmission
enable <enable LLDP>
disable <disable LLDP>

Show Commands

The following commands can be used for viewing configuration information.

Command

Parameters

Description

show

Displays bootstrap configuration.

show full-configuration

Displays all configuration (includes defaults).

Diagnostic Commands

The following commands are used to diagnose and troubleshoot issues.

Command

Parameters

Description

diagnose

?

Displays the various parameters available for this command.

hardware ?

Displays the various parameters available for this command.

hardware deviceinfo disk

Displays information of all disks.

hardware deviceinfo nic

Display the available list of NICs.

hardware deviceinfo <nic name>

Displays information of a specific NIC.

hardware deviceinfo tpm

Displays Trusted Platform Module (TPM) module information.

hardware lspci

Displays the PCI parameters.

hardware lspci tree

Displays PCI bus tree.

hardware lspci verbose

Displays detailed information about all devices.

hardware sysinfo ?

Displays the various parameters available for this command.

hardware sysinfo cpu

Displays detailed information for all installed CPU(s).

hardware sysinfo interrupts

Displays details of system interruptions.

hardware sysinfo iomem

Displays the memory map of I/O ports.

hardware sysinfo ioports

Display the address list of I/O ports.

hardware sysinfo memory

Displays the system memory details.

hardware sysinfo mtrr

Displays the memory type range register.

hardware sysinfo slab

Displays the memory allocation information.

diagnose system

top all

Displays the top threads information.

top cpu

Displays processes with the highest CPU usage at the top of the list.

load

Displays system uptime and load information.

process <cpu | mem> <num>

Displays the processes sorted by specified criteria (default 10 processes).

fsck harddisk

Check and repair the file system, then reboot the system.

raid hwinfo

Displays raid controller information.

raid hwinfodetail

Displays detailed raid controller information.

raid migrate

Migrate to a new disk.

raid rebuild

Rebuild the existing disk.

disk attributes

Displays vendor specific Self-Monitoring, Analysis, and Reporting Technology (SMART) attributes.

disk errors

Displays SMART error logs.

disk health

Displays SMART health status.

disk info

Displays SMART information.

diagnose debug application location

0

Reset: Resets the logging level in the backend.

1

Error: Logs only critical failures or errors.

2

Warn: Logs errors and potential issues (warnings).

3

Info: Logs standard operational events.

4

Debug: Logs detailed information useful for troubleshooting specific bugs.

5

Trace: Traces the code execution path.

Management Commands

The following enable some management and other operations in FortiAIOps.

Command

Parameters

Description

execute

?

Displays the various parameters available for this command.

date <YYYY-MM-DD>

Set the date in the YYYY-MM-DD format.

time <HH:MM:SS>

Set the time in the HH:MM:SS format.

factoryreset reboot

Reset to the factory default settings and reboot the system.

factoryreset shutdown

Reset to the factory default settings and shutdown the system.

formatlogdisk

Format the log disk.

ping <destination>

Ping the host name or IPv4 address.

traceroute <destination>

Traceroute of the host name or IPV4 address.

reboot

Reboot the system.

shutdown

Shut down the device.

backup config ftp <path> <server fqdn|ipaddr>[:port] [ftp_user] [ftp_passwd]

Creates a remote backup of the configuration file from an FTP server.

backup config tftp <filename> <server fqdn|ipaddr>

Creates a remote backup of the configuration file from a TFTP server.

restore image ftp <filename string> <ftp server>[:port] [ftp_user] [ftp_passwd]

Restores the firmware image from an FTP server using specific details.

restore image tftp <filename string> <tftp server>

Restores the firmware image from a TFTP server.

dns-no-domain

The DNS No Domain events are disabled in FortiAIOps, by default. Run the following commands to enable these events.

execute dns-no-domain
disable <disable the events>
enable <enable the events>
status <show the current setting>

sensor list

Displays sensor list and status from IPMI.

format disk 0

Create RAID 0 and format disk.

format disk 1

Create RAID 1 and format disk.

format disk 5

Create RAID 5 and format disk.

format disk 10

Create RAID 10 and format disk.

System Information

The following commands information related to the system configurations.

Command

Parameters

Description

get system

?

Displays the various parameters available for this command.

status

Displays system status, such as, version, serial number, BIOS details, time stamp, hostname, and so on.

admin

Displays the configuration details of the admin users.

admin <username>

Displays the configuration details of a specific admin user.

dns

Displays the DNS configuration.

global

Displays the configuration details of global attributes.

interface

Displays the interface details, status, and IP address.

interface <port>

Displays the port details, status, and IP address.

ntp

Displays the configuration details and status of NTP server.

Diagnostic Tool Commands

Use the following command to run diagnostics using the CLI:

Command

Parameters

Description

execute diagnostics

all System

Executes all application and logs diagnostics.

download <ftp_server>[:port] [ftp_user] [ftp_passwd] [ftp_path]

Download diagnostics file from the local system to a remote destination.