Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

Dynamic informations Linux, stranger output.

Open marcelo-0511 opened this issue 5 years ago • 6 comments

Hello, Good Morning

I was trying to get informations form a sophos devices, like CPU and Memory utilizations with powershell, but the output is outing with stranger characters, you can see above:

image

I Tried like that:

image

And like that:

image

And it is a normal shell output:

image

marcelo-0511 avatar Aug 19 '20 10:08 marcelo-0511

Those look like your terminal is using color for the text and other chars to highlight, bold ..etc that with Posh-SSH you are just getting the raw shell output.

On Aug 19, 2020, at 6:07 AM, marcelo-0511 [email protected] wrote:

Hello, Good Morning

I was trying to get informations form a sophos devices, like CPU and Memory utilizations with powershell, but the output is outing with stranger characters, you can see above:

https://user-images.githubusercontent.com/67024069/90621458-23f3d280-e1ea-11ea-9825-9842ffebb9bb.png I Tried like that:

https://user-images.githubusercontent.com/67024069/90621672-6b7a5e80-e1ea-11ea-87b6-7e97763c1f83.png And like that:

https://user-images.githubusercontent.com/67024069/90621733-7d5c0180-e1ea-11ea-9532-936b52256e86.png And it is a normal shell output:

https://user-images.githubusercontent.com/67024069/90621781-906ed180-e1ea-11ea-8c0c-4b9c187661d4.png — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7IHSREHHOMRRO25STOUDSBOP5FANCNFSM4QEYN3MQ.

darkoperator avatar Aug 19 '20 10:08 darkoperator

I wonder if the output would look better if you were running through the new Windows Terminal? It has better support for VT codes and so it might display cleaner. Of course, you have to have a fairly recent build of Windows to be able to install it. https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?rtc=1&activetab=pivot:overviewtab

https://github.com/microsoft/terminal

Michael M. Minor

On Wed, Aug 19, 2020 at 6:32 AM Carlos Perez [email protected] wrote:

Those look like your terminal is using color for the text and other chars to highlight, bold ..etc that with Posh-SSH you are just getting the raw shell output.

On Aug 19, 2020, at 6:07 AM, marcelo-0511 [email protected] wrote:

Hello, Good Morning

I was trying to get informations form a sophos devices, like CPU and Memory utilizations with powershell, but the output is outing with stranger characters, you can see above:

< https://user-images.githubusercontent.com/67024069/90621458-23f3d280-e1ea-11ea-9825-9842ffebb9bb.png

I Tried like that:

< https://user-images.githubusercontent.com/67024069/90621672-6b7a5e80-e1ea-11ea-87b6-7e97763c1f83.png

And like that:

< https://user-images.githubusercontent.com/67024069/90621733-7d5c0180-e1ea-11ea-9532-936b52256e86.png

And it is a normal shell output:

< https://user-images.githubusercontent.com/67024069/90621781-906ed180-e1ea-11ea-8c0c-4b9c187661d4.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/darkoperator/Posh-SSH/issues/342>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAD7IHSREHHOMRRO25STOUDSBOP5FANCNFSM4QEYN3MQ .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/342#issuecomment-676110727, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACTBQG4KQTMBAMBNNM4USODSBOS4PANCNFSM4QEYN3MQ .

MikeMM70 avatar Aug 19 '20 13:08 MikeMM70

Hello, Thanks for your reply @MikeMM70 and @darkoperator, but i was using Mobaxterm.

In putty output is equal moba(without text formatting)

Putty Output:

image

Posh-SSH Output: image image

marcelo-0511 avatar Aug 19 '20 21:08 marcelo-0511

You know why does "top" command output in Posh-SSH o show thats "[m [m"?

marcelo-0511 avatar Aug 19 '20 22:08 marcelo-0511

It is not PS but the terminal that does not how to interpret the characters for colors and other formatting, If you use the beta terminal from the ms store that one actually supports it

On Aug 19, 2020, at 6:00 PM, marcelo-0511 [email protected] wrote:

You know why does "top" command output in Posh-SSH o show thats "[m [m"?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/342#issuecomment-676740607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7IHQSXW7D6MTJ7MLZQVDSBRDPLANCNFSM4QEYN3MQ.

darkoperator avatar Aug 20 '20 00:08 darkoperator

Marcelo-0511, I didn't write my response clearly so I believe you misunderstood. The new Windows Terminal would be for running your Powershell session in (replacement for conhost.exe), not to replace Putty or Mobaxterm. Windows Terminal would probably display the output of your script more accurately since it has much-improved support for the VT formatting codes that it appears your script is returning.

Michael M. Minor

On Wed, Aug 19, 2020 at 8:19 PM Carlos Perez [email protected] wrote:

It is not PS but the terminal that does not how to interpret the characters for colors and other formatting, If you use the beta terminal from the ms store that one actually supports it

On Aug 19, 2020, at 6:00 PM, marcelo-0511 [email protected] wrote:

You know why does "top" command output in Posh-SSH o show thats "[m [m"?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/darkoperator/Posh-SSH/issues/342#issuecomment-676740607>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAD7IHQSXW7D6MTJ7MLZQVDSBRDPLANCNFSM4QEYN3MQ .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/342#issuecomment-676825008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACTBQG3NBKR3KDRG63T3OMLSBRTXTANCNFSM4QEYN3MQ .

MikeMM70 avatar Aug 20 '20 14:08 MikeMM70