Fortinet white logo
Fortinet white logo

CLI Reference

get

get

get commands display a part of your FortiMail unit’s configuration in the form of a list of settings and their values.

Unlike show, get displays all settings, even if they are still in their default state.

For example, you might get the current DNS settings:

FortiMail# get system dns

primary : 172.16.95.19

secondary : 0.0.0.0

private-ip-query : enable

cache : enable

Notice that the command displays the setting for the secondary DNS server, even though it has not been configured, or has been reverted to its default value.

Also unlike show, unless used from within an object or table, get requires that you specify the object or table whose settings you want to display.

For example, at the root prompt, this command would be valid:

FortiMail# get system dns

and this command would not:

FortiMail# get

Depending on whether or not you have specified an object, like show, get may display one of two different outputs: either the configuration that you have just entered but not yet saved, or the configuration as it currently exists on the disk, respectively.

For example, immediately after configuring the secondary DNS server setting but before saving it, get displays two different outputs (differences highlighted in bold):

FortiMail# config system dns

(dns)# set secondary 192.168.1.10

(dns)# get

primary : 172.16.95.19

secondary : 192.168.1.10

private-ip-query : enable

cache : enable

(dns)# get system dns

primary : 172.16.95.19

secondary : 0.0.0.0

private-ip-query : enable

cache : enable

The first output from get indicates the value that you have configured but not yet saved; the second output from get indicates the value that was last saved to disk.

If you were to now enter end, saving your setting to disk, get output for both syntactical forms would again match. However, if you were to enter abort at this point and discard your recently entered secondary DNS setting instead of saving it to disk, the FortiMail unit’s configuration would therefore match the second output, not the first.

If you have entered settings but cannot remember how they differ from the existing configuration, the two different forms of get, with and without the object name, can be a useful way to remind yourself.

Most get commands, such as get system dns, are used to display configured settings. You can find relevant information about such commands in the corresponding config commands in the config chapter.

Other get commands, such as system performance, are used to display system information that is not configurable. This chapter describes this type of get command.

This chapter describes the following commands:

system performance

system status

Although not explicitly shown in this section, for all config commands, there are related get and show & show full-configuration commands which display that part of the configuration. get and show commands use the same syntax as their related config command, unless otherwise mentioned. For syntax examples and descriptions of each configuration object, field, and option, see config.

get

get

get commands display a part of your FortiMail unit’s configuration in the form of a list of settings and their values.

Unlike show, get displays all settings, even if they are still in their default state.

For example, you might get the current DNS settings:

FortiMail# get system dns

primary : 172.16.95.19

secondary : 0.0.0.0

private-ip-query : enable

cache : enable

Notice that the command displays the setting for the secondary DNS server, even though it has not been configured, or has been reverted to its default value.

Also unlike show, unless used from within an object or table, get requires that you specify the object or table whose settings you want to display.

For example, at the root prompt, this command would be valid:

FortiMail# get system dns

and this command would not:

FortiMail# get

Depending on whether or not you have specified an object, like show, get may display one of two different outputs: either the configuration that you have just entered but not yet saved, or the configuration as it currently exists on the disk, respectively.

For example, immediately after configuring the secondary DNS server setting but before saving it, get displays two different outputs (differences highlighted in bold):

FortiMail# config system dns

(dns)# set secondary 192.168.1.10

(dns)# get

primary : 172.16.95.19

secondary : 192.168.1.10

private-ip-query : enable

cache : enable

(dns)# get system dns

primary : 172.16.95.19

secondary : 0.0.0.0

private-ip-query : enable

cache : enable

The first output from get indicates the value that you have configured but not yet saved; the second output from get indicates the value that was last saved to disk.

If you were to now enter end, saving your setting to disk, get output for both syntactical forms would again match. However, if you were to enter abort at this point and discard your recently entered secondary DNS setting instead of saving it to disk, the FortiMail unit’s configuration would therefore match the second output, not the first.

If you have entered settings but cannot remember how they differ from the existing configuration, the two different forms of get, with and without the object name, can be a useful way to remind yourself.

Most get commands, such as get system dns, are used to display configured settings. You can find relevant information about such commands in the corresponding config commands in the config chapter.

Other get commands, such as system performance, are used to display system information that is not configurable. This chapter describes this type of get command.

This chapter describes the following commands:

system performance

system status

Although not explicitly shown in this section, for all config commands, there are related get and show & show full-configuration commands which display that part of the configuration. get and show commands use the same syntax as their related config command, unless otherwise mentioned. For syntax examples and descriptions of each configuration object, field, and option, see config.