Created on 11-26-2024 09:16 AM Edited on 11-28-2024 12:42 AM By Jean-Philippe_P
Description | This article describes how to obtain specifically the device's serial number from CLI. |
Scope | FortiGate v 6.X.X, 7.X.X, FortiMail. |
Solution |
For any purposes, it could be needed to know the serial number from a device via CLI.
If the command 'get system status' is typed, it brings information related to the device, for example: FGT # get system status
However, if the intention is to get only the serial number avoiding seeing the other information, it is necessary to use the 'grep' command on the 'get sys stat' outputs.
The following command 'get system status | grep -fi Serial' can be used to search case insensitive and to mark the found line. The grep parameter '-i' makes the search string case insensitive. The grep parameter '-f' will mark the found line with an ASCII arrow '<---'.
For example:
get system status | grep -fi Serial
Alternatively, the following command can be used if the marker arrow is not wanted.
get system status | grep Serial Serial-Number: FG200ETKxxxxxxxx
In a cluster environment the serial numbers of all cluster nodes can be seen with the command 'diagnose sys ha status'. Here again, the 'grep' command can be applied to search for the serial numbers by filtering the output for the string 'hostname='.
For example:
diagnose sys ha status | grep 'hostname=' FG6H0FTBxxxxxxxx: Secondary, serialno_prio=0, usr_priority=128, hostname=firewall03
Related article: |
I will share this content with my friends.
Thanks for your great content! :)
Highly enjoyable read. Shared it with my colleagues.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.