FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
MigenaM
Staff
Staff
Article Id 383125
Description This article describes how to get the contract information when the grep command does not work with the error 'Can not use grep command in conserve mode.'.
Scope FortiGate 40F.
Solution

While trying to get the contract information on low-memory devices such as FortiGate 40F, the following error might occur:

 

diagnose test update info contract | grep registration
Can not use grep command in conserve mode.

command parse error in the end
Command fail. Return code 5

 

When the device is suspected to have a conserve mode status, certain functions are limited. 

This is mostly related to the functions that require more processing power to be executed. 

In general, if a device has entered conserve mode, or the memory is low (especially on low-end devices), the functionality of the device is limited.

 

Since filtering the outputs with the 'grep' command will require more processing power, the usage of this command seems to be limited in this case. 

 

By default, the information that this command will generate will look something like this, as an example:

 

diagnose test update info contract | grep registration
Support contract: pending_registration=255 got_contract_info=1

 

In this case, as a workaround, to get the required information, the command can be executed as seen:

 

diagnose test update info contract

 

The contract information can still be found on the outputs of this command:

 

diagnose test update info contract
------------------------------------------------------------------
Support contract: pending_registration=255 got_contract_info=1
account_id=[TEST] company=[TEST] industry=[Technology]

------------------------------------------------------------------