Network Management

NCM does not save results of the script

The output of the command script is empty

First published date

10/26/2021 2:31 PM

Last published date

10/26/2021 2:31 PM

Overview

This article provides the solution to the issue which results in an empty output of the script executed by NCM on some devices while on other models, the same script, generates an output that is saved. You may notice in Session Traces that the device generates results but they are omitted by NCM.

Product section

Network Configuration Manager

Cause

This behaviour is related to the way NCM responds to the blank line device may send back to keep the session going while processing the command as some devices may need a longer time to do so. This will result in the timeout value being reduced by half (introduced to improve script execution performance) and NCM will send the next command, usually exit.
 
TimerTick: blankline - waited more than half response timeout - Sending Next Command

Resolution

To address this issue first you will need to notice (while inspecting session traces) what is the interval between the command being sent to the device and the next command NCM sends, for example:
 
[... 14:17:46.582] <-- show interface counters errors
[..]
[... 14:18:18.613] TimerTick: blankline - waited more than half response timeout - Sending Next Command
[... 14:18:18.613] SendNextCommand Done: disconnecting 

In the above, the time between these commands is roughly 30 seconds. If you have set the timeout to 60 seconds the special blank line logic would reduce it to 30 seconds, chance the behaviour we are observing.

To make sure NCM will save the output of such script you will need to set larger timeout values, for example:

- increase the prompt timeout to 120 seconds
- increase the connection timeout to 150 seconds

and check if NCM will gather the output from the device. Then you can experiment in setting smaller timeouts to optimize these values.