Skip to main content
MigenaM
Staff
Staff
March 19, 2025

Troubleshooting Tip: Troubleshooting the error 'Can not use grep command in conserve mode.' while executing 'diagnose test update info contract | grep registration'

  • March 19, 2025
  • 0 replies
  • 731 views
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]

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

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!