Auxiliary commands
Auxiliary commands do not connect to any FortiGate, instead those commands perform same local action(s).
These commands are actually subcommands of flhcli aux command and you can run it without any futher
parameter to get a list of currently supported auxiliary commands.
To run for example hwinfo auxiliary command, execute flhcli aux hwinfo. You can add some futher
parameters. Parameter -h is used as usual to get help about the possible parameters.
hwinfo
Takes the XML output generated by standard hwinfo command and creates HTML page with CPU layout information
and functions assigned by FortiOS to specific CPUs.
Optional parameters
- --sourceFilename of the XML file to convert. If not specified it will read from standard input.
- 
--outputFilename of the HTML file to create. If not specified it will write to standard output.
- 
--mergeMerge the data from--sourceparameter with the embedded data for some of the other standard devices. See hwinfo merge section for more information.
- --no-sourceDo not read any source file (not even from standard input). This is commonly used together with- --mergeparameter to create an HTML file only with devices already embedded.
Merge
There are already some XML data collected and embedded at compile time into this tool. 
When --merge parameter is used, such devices are merged with the one from --source parameter. 
Together with --no-source the --merge parameter can be used to generate HTML file containing only
devices already included.
Resulting file is standalone HTML file with select box to choose between different FortiGate models. This file can be sent by email, any instant messenger or stored on any webserver. However, Internet access is still required while reading the file, because some external scripts are used (jQuery + fonts).
Example
To get XML hardware info file from your current default device and generate single-device HTML file:
flhcli hwinfo --output mydevice.xml
[2020-10-19 22:36:01 +0200] Selected device "1500D" xx.x.xx.xx:22 (maximum 4 simultaneous connections)
[2020-10-19 22:36:01 +0200] Getting device info
[2020-10-19 22:36:01 +0200] Getting CPU layout
[2020-10-19 22:36:01 +0200] Getting memory
[2020-10-19 22:36:01 +0200] Getting slow path and nTurbo path
[2020-10-19 22:36:01 +0200] Getting nTurbo driver data
[2020-10-19 22:36:01 +0200] Getting PCI devices
[2020-10-19 22:36:01 +0200] Generating XML output
flhcli aux hwinfo --source mydevice.xml --output mydevice.html
[2020-10-19 22:36:07 +0200] Generating HTML table for current source
On Linux or MacOS these two commands can be run simultaneously and the XML data can be exchanged via pipe:
flhcli hwinfo | flhcli aux hwinfo --output mydevice.html
To merge the current default device hardware data with embedded devices and write the output to devices.html you can use:
flhcli aux hwinfo --source mydevice.xml --merge --output devices.html
[2020-10-19 22:41:26 +0200] Generating HTML table for current source
[2020-10-19 22:41:26 +0200] Merging internal XML definition "1000D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "300D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3401E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3810D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "800D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "1500D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "2200E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "2500E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "400E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "500D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "7000E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3200D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3815D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "5001D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "5001E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "2000E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3700D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3960E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "3980E.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "600D.xml"
[2020-10-19 22:41:26 +0200] Merging internal XML definition "6300F.xml"
Be aware that list of embdedded devices can change in the future.
