Actually, I missed one detail, if you tell vppctl to run a command using its command line arguments, it will always assume non-interactive.
The only way you’ll see the banner, then, is if the 1s session startup timer expires and it makes assumptions. In those cases that you see the output, does the script you run stall for a second? Chris. From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Chris Luke Sent: Tuesday, May 26, 2020 09:40 To: Chinmaya Aggarwal <chinmaya.agar...@hsc.com>; vpp-dev@lists.fd.io Subject: Re: [EXTERNAL] Re: [vpp-dev] VPP sequential policy command execution giving error 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<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Chinmaya Aggarwal Sent: Tuesday, May 26, 2020 08:19 To: vpp-dev@lists.fd.io<mailto: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 (#16496): https://lists.fd.io/g/vpp-dev/message/16496 Mute This Topic: https://lists.fd.io/mt/74477804/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-