HTML Log for Execute Command stdout truncated

Hi all,

im using Execute Command and run this command on my remote host.

${stdout}    ${stderr}    ${rc} =   SSHLibrary . Execute Command   ${command}    return_stdout=True    return_stderr=True    return_rc=True

Executing command 'netstat -tulpen | grep -E 'cap|service-ui''

Now looking in the html report i see that stdout is truncated - because i see this:

03:21:25.795	INFO	Command exited with return code 0.	
03:21:25.795	INFO	${stdout} = tcp        0      0 0.0.0.0:4711            0.0.0.0:*               LISTEN      
1200       22314       804/cap         
tcp6       0      0 :::5959                 :::*                    LISTEN      ...	
03:21:25.795	INFO	${stderr} = 	
03:21:25.795	INFO	${rc} = 0

So there is a programm running on 5959 but i don’t see the name.

This also happens to other commands e.g. if i would execute “netstat -tulpen” without any grep then i will see a list of all listeners on tcp/udp which is a long list - but in stdout the output would also be truncated.

Is there a way how to extend the “stdout” ?

I can see a test in SSHLibrary for Execute command which checks for “huge output” see here line 76:

But what would be the stdout for the “cat file.txt” - and would it show the whole file in stdout in the html log?

Br,
Camil

Just found this:

I see that Dave has used “Log” to have the output in the html log.
So i will try to do the same and will add a variable for stdout and then pass this to “Log”.

Br,
Camil

1 Like

Hi Camil,

Wow I answered your question before I saw it :wink: if only I could perform that trick every time…

Dave.

2 Likes

Hi Dave,

it’s called the NEW “AI” which even works if you dont explicity ask for it :slight_smile:

Br,
Camil

1 Like