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).

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 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).

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

Reset to the factory default settings. Restart the device after the second confirmation prompt.

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.

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.

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).

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 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).

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

Reset to the factory default settings. Restart the device after the second confirmation prompt.

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.

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.