Fortinet white logo
Fortinet white logo

CLI Reference

hardware

hardware

Use these commands to display detailed device information about FortiMail hardware or, for FortiMail-VM, hypervisor driver software. This includes the CPU cores, memory, disk or RAID, network interface cards (NIC), Fortinet ASIC chips, and I/O buses.

You can also receive and send (read/write) low-level information to devices for troubleshooting purposes.

Syntax

diagnose hardware sysinfo

diagnose hardware deviceinfo nic

diagnose hardware deviceinfo nic-detail

diagnose hardware deviceinfo asic

diagnose hardware deviceinfo ide

diagnose hardware ioport byte <address_hex> [<data_hex>]

diagnose hardware ioport word <address_hex> [<data_hex>]

diagnose hardware ioport long <address_hex> [<data_hex>]

diagnose hardware pciconfig [option {v n t x H1}] [bus [[[<bus_hex>]:][<slot_hex>][.[<func_int>]]] [id [<vendor_hex>]:[<device_hex>]]]

diagnose hardware setpci [d[<vendor_hex>]:[<device_hex>] | s[[<bus_hex>]:][<slot_hex>][.[<func_int>]]] <register_hex>[.{B | W | L}] <data_str>

Variable

Description

Default

[[<bus_hex>]:]
[<slot_hex>]
[.[<func_int>]]

Enter the bus, slot, and/or function address, such as 00:1b:3 or :1b or :1b.4, to filter the list of PCI buses.

Valid ranges vary by which are currently used. For example, a specific FortiMail may now be using only the bus addresses 00, 13, and 1b. For a list of currently used addresses, enter:

diagnose hardware pciconfig

[<vendor_hex>]:[<device_hex>]

Enter the vendor and/or device identifier, such as 15ad:07b0, to filter the list of PCI devices.

<data_str>

Enter the data to send to the PCI device.

Valid length varies by whether the register is a byte, word, or long data type.

<register_hex>[.{B | W | L}]

Enter the hexadecimal register number (capability) of the PCI device, such as 2c. Optionally also suffix the data type (valid length of data) of the register, such as 4.b, where:

  • B — Byte.

  • W — Word.

  • L — Long.

byte <address_hex> [<data_hex>]

Enter the hexadecimal address of the input/output port, and the hexadecimal byte of data to send to it. To read a byte from the device, omit the data sent.

long <address_hex> [<data_hex>]

Enter the hexadecimal address of the input/output port, and the hexadecimal long of data to send to it. To read a long from the device, omit the data sent.

option {v n t x H1}

Select which PCI bus information display options to use:

  • v — Verbose.

  • n — Number of the vendor and device instead of looking it up in the PCI ID list.

  • t — Tree format that shows connections between the buses, bridges, and devices.

  • x — Hexadecimal dump of the standard part of the configuration space (varies by the bridge, but could be the first 64 or 128 bytes).

  • H1 — Hardware direct access.

pciconfig

Display a list of PCI buses, slots, functions, vendors, and devices.

For example, in this output:

1b:00.0 Class 0200: 15ad:07b0 (rev 01)
  • 1b — Bus

  • 00 — Slot

  • .0 — Function

  • 15ad — Vendor

  • 07b0 — Device

setpci

Set a register on one or more PCI devices.

To set registers on one device, start the next argument with d.

To set registers on multiple devices in the same or different slots, start the next argument with s.

word <address_hex> [<data_hex>]

Enter the hexadecimal address of the input/output port, and the hexadecimal word of data to send to it. To read a word from the device, omit the data sent.

Example

FortiMail # diagnose hardware deviceinfo nic

System Time:  2025-05-22 11:36:57 EDT (Uptime: 0d 21h 48m)
Interface: port1
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:03:00.0
 
Interface: port2
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:04:00.0
 
Interface: port3
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:0b:00.0
 
Interface: port4
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:0c:00.0
 
Interface: port5
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:13:00.0
 
Interface: port6
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:1b:00.0

FortiMail # diagnose hardware ioport byte FACE

System Time: 2025-05-22 11:59:24 EDT (Uptime: 0d 22h 10m)

inl(face)=ff

FortiMail # diagnose hardware pciconfig option t v bus

System Time:  2025-05-28 11:29:14 EDT (Uptime: 20d 0h 26m)
-[00]-+-00.0  8086:7190
      +-01.0-[01]--
      +-07.0  8086:7110
      +-07.1  8086:7111
      +-07.3  8086:7113
      +-07.7  15ad:0740
      +-0f.0  15ad:0405
      +-10.0  1000:0030
      +-11.0-[02]--
      +-15.0-[03]----00.0  15ad:07b0
      +-15.1-[04]----00.0  15ad:0779
      +-15.2-[05]--
      +-15.3-[06]--
      +-15.4-[07]--
      +-15.5-[08]--
      +-15.6-[09]--
      +-15.7-[0a]--
      +-16.0-[0b]--
      +-16.1-[0c]--
      +-16.2-[0d]--
      +-16.3-[0e]--
      +-16.4-[0f]--
      +-16.5-[10]--
      +-16.6-[11]--
      +-16.7-[12]--
      +-17.0-[13]--
      +-17.1-[14]--
      +-17.2-[15]--
      +-17.3-[16]--
      +-17.4-[17]--
      +-17.5-[18]--
      +-17.6-[19]--
      +-17.7-[1a]--
      +-18.0-[1b]--
      +-18.1-[1c]--
      +-18.2-[1d]--
      +-18.3-[1e]--
      +-18.4-[1f]--
      +-18.5-[20]--
      +-18.6-[21]--
      `-18.7-[22]--
...

Related topics

system interface

netlink

raid

system device

system disk

system file-system

system flash

system raid-status

hardware

hardware

Use these commands to display detailed device information about FortiMail hardware or, for FortiMail-VM, hypervisor driver software. This includes the CPU cores, memory, disk or RAID, network interface cards (NIC), Fortinet ASIC chips, and I/O buses.

You can also receive and send (read/write) low-level information to devices for troubleshooting purposes.

Syntax

diagnose hardware sysinfo

diagnose hardware deviceinfo nic

diagnose hardware deviceinfo nic-detail

diagnose hardware deviceinfo asic

diagnose hardware deviceinfo ide

diagnose hardware ioport byte <address_hex> [<data_hex>]

diagnose hardware ioport word <address_hex> [<data_hex>]

diagnose hardware ioport long <address_hex> [<data_hex>]

diagnose hardware pciconfig [option {v n t x H1}] [bus [[[<bus_hex>]:][<slot_hex>][.[<func_int>]]] [id [<vendor_hex>]:[<device_hex>]]]

diagnose hardware setpci [d[<vendor_hex>]:[<device_hex>] | s[[<bus_hex>]:][<slot_hex>][.[<func_int>]]] <register_hex>[.{B | W | L}] <data_str>

Variable

Description

Default

[[<bus_hex>]:]
[<slot_hex>]
[.[<func_int>]]

Enter the bus, slot, and/or function address, such as 00:1b:3 or :1b or :1b.4, to filter the list of PCI buses.

Valid ranges vary by which are currently used. For example, a specific FortiMail may now be using only the bus addresses 00, 13, and 1b. For a list of currently used addresses, enter:

diagnose hardware pciconfig

[<vendor_hex>]:[<device_hex>]

Enter the vendor and/or device identifier, such as 15ad:07b0, to filter the list of PCI devices.

<data_str>

Enter the data to send to the PCI device.

Valid length varies by whether the register is a byte, word, or long data type.

<register_hex>[.{B | W | L}]

Enter the hexadecimal register number (capability) of the PCI device, such as 2c. Optionally also suffix the data type (valid length of data) of the register, such as 4.b, where:

  • B — Byte.

  • W — Word.

  • L — Long.

byte <address_hex> [<data_hex>]

Enter the hexadecimal address of the input/output port, and the hexadecimal byte of data to send to it. To read a byte from the device, omit the data sent.

long <address_hex> [<data_hex>]

Enter the hexadecimal address of the input/output port, and the hexadecimal long of data to send to it. To read a long from the device, omit the data sent.

option {v n t x H1}

Select which PCI bus information display options to use:

  • v — Verbose.

  • n — Number of the vendor and device instead of looking it up in the PCI ID list.

  • t — Tree format that shows connections between the buses, bridges, and devices.

  • x — Hexadecimal dump of the standard part of the configuration space (varies by the bridge, but could be the first 64 or 128 bytes).

  • H1 — Hardware direct access.

pciconfig

Display a list of PCI buses, slots, functions, vendors, and devices.

For example, in this output:

1b:00.0 Class 0200: 15ad:07b0 (rev 01)
  • 1b — Bus

  • 00 — Slot

  • .0 — Function

  • 15ad — Vendor

  • 07b0 — Device

setpci

Set a register on one or more PCI devices.

To set registers on one device, start the next argument with d.

To set registers on multiple devices in the same or different slots, start the next argument with s.

word <address_hex> [<data_hex>]

Enter the hexadecimal address of the input/output port, and the hexadecimal word of data to send to it. To read a word from the device, omit the data sent.

Example

FortiMail # diagnose hardware deviceinfo nic

System Time:  2025-05-22 11:36:57 EDT (Uptime: 0d 21h 48m)
Interface: port1
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:03:00.0
 
Interface: port2
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:04:00.0
 
Interface: port3
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:0b:00.0
 
Interface: port4
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:0c:00.0
 
Interface: port5
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:13:00.0
 
Interface: port6
driver: vmxnet3
version: 1.5.0.0-k-NAPI
firmware-version:
bus-info: 0000:1b:00.0

FortiMail # diagnose hardware ioport byte FACE

System Time: 2025-05-22 11:59:24 EDT (Uptime: 0d 22h 10m)

inl(face)=ff

FortiMail # diagnose hardware pciconfig option t v bus

System Time:  2025-05-28 11:29:14 EDT (Uptime: 20d 0h 26m)
-[00]-+-00.0  8086:7190
      +-01.0-[01]--
      +-07.0  8086:7110
      +-07.1  8086:7111
      +-07.3  8086:7113
      +-07.7  15ad:0740
      +-0f.0  15ad:0405
      +-10.0  1000:0030
      +-11.0-[02]--
      +-15.0-[03]----00.0  15ad:07b0
      +-15.1-[04]----00.0  15ad:0779
      +-15.2-[05]--
      +-15.3-[06]--
      +-15.4-[07]--
      +-15.5-[08]--
      +-15.6-[09]--
      +-15.7-[0a]--
      +-16.0-[0b]--
      +-16.1-[0c]--
      +-16.2-[0d]--
      +-16.3-[0e]--
      +-16.4-[0f]--
      +-16.5-[10]--
      +-16.6-[11]--
      +-16.7-[12]--
      +-17.0-[13]--
      +-17.1-[14]--
      +-17.2-[15]--
      +-17.3-[16]--
      +-17.4-[17]--
      +-17.5-[18]--
      +-17.6-[19]--
      +-17.7-[1a]--
      +-18.0-[1b]--
      +-18.1-[1c]--
      +-18.2-[1d]--
      +-18.3-[1e]--
      +-18.4-[1f]--
      +-18.5-[20]--
      +-18.6-[21]--
      `-18.7-[22]--
...

Related topics

system interface

netlink

raid

system device

system disk

system file-system

system flash

system raid-status