You’ll get the banner if it thinks it’s an interactive session.

Roughly vppctl does this (I am paraphrasing):

is_interactive = isatty(STDIN);
…
if (is_interactive) TERM = “vppctl”;
…
open telnet session to the CLI socket; pass the terminal information

Then in VPP:

is_interactive = (strcmp(TERM, “vppctl”) != 0);
…
if (is_interactive) emit_banner();

The passing of the terminal options in the TELNET protocol is bounded by a 
timer (1 second); if for whatever reason that information arrives late, VPP 
will make assumptions; typically that the terminal is of the ‘dumb’ type rather 
than non-interactive.

Does this correlate to what you are observing? Does the output you see make use 
of ANSI color? That would be another clue, the ‘dumb’ terminal doesn’t use 
color.

Chris.


From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Chinmaya Aggarwal
Sent: Tuesday, May 26, 2020 08:19
To: vpp-dev@lists.fd.io
Subject: [EXTERNAL] Re: [vpp-dev] VPP sequential policy command execution 
giving error

Further adding to observations regarding above issue, we have created a script 
that has only vpp commands running sequentially having a constant delay between 
the execution of each commands. On running the script, we again see VPP shell 
output as shown below :-
    _______    _        _   _____  ___
 __/ __/ _ \  (_)__    | | / / _ \/ _ \
 _/ _// // / / / _ \   | |/ / ___/ ___/
 /_/ /____(_)_/\___/   |___/_/  /_/
We executed the script with delay of 10ms, 50ms and 100ms. In most of the 
cases, we get no output from vppctl command but in some random times, we get 
the vpp shell as output of the command.

Please suggest, in what scenarios does the vpp return this kind of output?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16494): https://lists.fd.io/g/vpp-dev/message/16494
Mute This Topic: https://lists.fd.io/mt/74477335/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to