Troubleshooting : Tools : diagnose commands
 
diagnose commands
You can use the CLI diagnose commands to gather diagnostic information that can be useful to Fortinet Customer Care when diagnosing any issues with your system.
The following examples show the lists of diagnose commands:
FI800B3913000018 # diagnose
debug debug
hardware hardware
netlink netlink
sniffer sniffer
system system
 
FI-2KB3913000002 # diagnose debug
application set/get debug level for daemons
cli set/get debug level for CLI and CMDB
crashlog clear/get crashlog
disable disable debug output
enable enable debug output
kernel set/get debug level for kernel
mysql-log get mysql error log
nginx-log get nginx error log
rrd_cmd_check Perform RRD commands check
rrd_cmd_recreate Re-create RRD commands
rrd_tune Tune RRD database to eliminate dropcount limit.
 
FI800B3913000018 # diagnose hardware get
deviceinfo list device status and information
ioport read data from an I/O port
pciconfig list information on PCI buses and connected devices
sysinfo list system hardware information
tp2control read control registers from tp2
tp2reg read registers from tp2
tp2statistics read statistics registers from tp2
 
FI800B3913000018 # diagnose netlink
backlog set netlink backlog length
device display network devices statistic information
interface netlink interface
ip ip
ipv6 ipv6
neighbor netlink neighbor
neighbor6 netlink neighbor for ipv6
queue-len set netlink TX queue length
route netlink routing table
route6 netlink routing table
rtcache netlink realtime cache
tcp display tcp statistic information
udp display udp statistic information
 
FI800B3913000018 # diagnose sniffer packet mgmt2
interfaces=[mgmt2]
filters=[none]
pcap_lookupnet: mgmt2: no IPv4 address assigned
0.000000 172.30.144.11.62729 -> 172.30.153.113.22: ack 1556045916
0.000000 172.30.144.11.62729 -> 172.30.153.113.22: ack 1556046032
0.000000 172.30.153.17.68 -> 255.255.255.255.67: udp 300
 
FI800B3913000018 # diagnose system top
Run Time: 0 days, 23 hours and 12 minutes
0.6U, 1.7S, 119946561.8I; 7996T, 44F
tp2traffic 3501 R 9.4 1.3
mysqld 1351 S 0.0 6.4
flg_access 1354 S 0.0 1.6
tp2d 1358 S 0.0 1.6
flg_indexd 1352 S 0.0 1.7
tp2logd 1357 S 0.0 1.1
php-fpm 32341 S 0.0 2.1
php-fpm 20518 S 0.0 2.2
php-fpm 1600 S 0.0 2.2
cli 15253 S 0.0 1.6
php-fpm 1349 S 0.0 2.1
fddcli 14721 S 0.0 1.5
cmdbsvr 1297 S 0.0 1.5
cli 31603 R 0.0 1.6
sshd 15104 S 0.0 0.9
cli 1342 S 0.0 1.6
 
You can also use the tree command to display the list of commands:
FI-2KB3913000002 # tree diag
-- sniffer -- {packet(0)} -- arg ...
|- netlink -- {queue-len(0)} -- arg ...
|- {backlog(0)} -- arg ...
|- {route(0)} -- arg ...
|- {route6(0)} -- arg ...
|- {rtcache(0)} -- arg ...
|- {interface(0)} -- arg ...
|- {neighbor(0)} -- arg ...
|- {neighbor6(0)} -- arg ...
|- {tcp(0)}
|- {udp(0)}
|- {device(0)}
|- ip -- {flush(0)} -- arg ...
|- {list(0)} -- arg ...
|- {delete(0)} -- arg ...
+- {add(0)} -- arg ...
+- ipv6 -- {flush(0)} -- arg ...
|- {list(0)} -- arg ...
|- {delete(0)} -- arg ...
+- {add(0)} -- arg ...
|- debug -- {application(0)} -- info_centerd -- <level>
|- hasyncd -- arg ...
|- updated -- arg ...
|- miglogd -- <level>
|- cmdb_event -- <level>
|- sshd -- <level>
|- netd -- <level>
|- alertmaild -- <level>
|- tp2trafficd -- <level>
|- ntpd -- <level>
|- tp2rupd -- <level>
|- snmpd -- <level>
|- flg_indexd -- <level>
|- flg_reportd -- <level>
|- flg_accessd -- <level>
|- tp2oneclickd -- <level>
|- tp2d -- <level>
|- tp2init -- <level>
|- tp2logd -- <level>
|- tp2ird -- <level>
|- tp2threshd -- <level>
|- tp2portd -- <level>
|- tp2proxyd -- <level>
|- tp2stressd -- <level>
|- tp2diagd -- <level>
+- tp2dpcconfd -- <level>
|- {crashlog(0)} -- <level>
|- {cli(0)} -- <level>
|- {kernel(0)} -- <level>
|- {rrd_cmd_check(0)} -- arg ...
|- {rrd_cmd_recreate(0)} -- arg ...
|- {rrd_tune(0)} -- arg ...
|- {enable(0)}
|- {disable(0)}
|- {mysql-log(0)} -- <level>
|- {nginx-log(0)} -- <level>
+- {scramble(0)} -- <level>
|- hardware -- get -- {sysinfo(0)} -- arg ...
|- {deviceinfo(0)} -- arg ...
|- {biosinfo(0)}
|- {pciconfig(0)} -- arg ...
|- {ioport(0)} -- arg ...
|- {tp2reg(0)} -- arg ...
|- {tp2control(0)} -- arg ...
+- {tp2statistics(0)} -- arg ...
+- set -- {pciconfig(0)} -- arg ...
|- {ioport(0)} -- arg ...
|- {tp2reg(0)} -- arg ...
+- {tp2control(0)} -- arg ...
+- system -- {load(0)} -- arg ...
|- {top(0)} -- arg ...
|- {matrix(0)}
|- {scp(0)} -- arg ...
|- {slab(0)} -- arg ...
|- {shm(0)} -- arg ...
|- {sem(0)} -- arg ...
|- {cmdb(0)}
|- {ntp-status(0)}
|- {ha(0)} -- arg ...
|- {checkused(0)} -- arg ...
|- {fips(0)} -- arg ...
+- {file-system(0)} -- arg ...