Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"dotnet-dump ps" truncates commandline arguments at 60 positions #4443

Open
monty241 opened this issue Jan 2, 2024 · 2 comments
Open

"dotnet-dump ps" truncates commandline arguments at 60 positions #4443

monty241 opened this issue Jan 2, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@monty241
Copy link

monty241 commented Jan 2, 2024

Description

Executing dotnet-dump ps on Linux, there can be commandline arguments exceeding 60 positions. However, only the last 60 are shown in the table.

Sample:

dotnet-dump ps

   1246  dotnet  /usr/local/aspnetcore7012/dotnet  tnet /usr/local/abc-123456.abcde/ABCDEFGHI.Abcde.Online.dll
   1248  dotnet  /usr/local/aspnetcore7012/dotnet  t /usr/local/abcde-123456.abcde/ABCDEFGHI.Abcde.Online.dll
   1249  dotnet  /usr/local/aspnetcore7012/dotnet  in/dotnet /usr/local/abcde.ABCDEFGHI.com/ABCDEFGHI.Abcde.dll

Version: 8.0.452401+966acd12b91675a4d06a7572ff47c587f827beaf

@monty241 monty241 added the bug Something isn't working label Jan 2, 2024
@mikem8361 mikem8361 self-assigned this Jan 2, 2024
@mikem8361 mikem8361 added this to the 9.0.0 milestone Jan 2, 2024
@tommcdon tommcdon added enhancement New feature or request and removed bug Something isn't working labels Jan 4, 2024
@tommcdon
Copy link
Member

tommcdon commented Jan 4, 2024

Hi @monty241 thanks for reporting this issue! We'd like to learn more about what expectations there are for the UI. With some experimentation, we can see that dotnet-dump ps scales the width of the columns based off of the width of the console. Would you prefer different options on how process name and argument widths are calculated, screen wrapping, or different defaults?

C:\Users\tommcdon>dotnet-dump ps
 12764  dotnet               m Files\dotnet\dotnet.exe  ost\ms-dotnettools.csharp
 13096  PhoneExperienceHost  e\PhoneExperienceHost.exe  ver:Background -Embedding
 16088  pwsh                 les\PowerShell\7\pwsh.exe  gration.ps1\" } catch {}"
 16468  rzls                 win32-x64\.razor\rzls.exe  alStudio.DevKit.Razor.dll


C:\Users\tommcdon>dotnet-dump ps
 12764  dotnet               C:\Program Files\dotnet\dotnet.exe                           \logs\20240104T145552\window1\exthost\ms-dotnettools.csharp
 13096  PhoneExperienceHost  ne_1.23102.126.0_x64__8wekyb3d8bbwe\PhoneExperienceHost.exe  e\PhoneExperienceHost.exe" -ComServer:Background -Embedding
 16088  pwsh                 C:\Program Files\PowerShell\7\pwsh.exe                       b\terminal\browser\media\shellIntegration.ps1\" } catch {}"
 16468  rzls                 ions\ms-dotnettools.csharp-2.14.8-win32-x64\.razor\rzls.exe  x64\.razortelemetry\Microsoft.VisualStudio.DevKit.Razor.dll


C:\Users\tommcdon>dotnet-dump ps
 12764  dotnet               C:\Program Files\dotnet\dotnet.exe                                 g\Code\logs\20240104T145552\window1\exthost\ms-dotnettools.csharp
 13096  PhoneExperienceHost  ourPhone_1.23102.126.0_x64__8wekyb3d8bbwe\PhoneExperienceHost.exe  3d8bbwe\PhoneExperienceHost.exe" -ComServer:Background -Embedding
 16088  pwsh                 C:\Program Files\PowerShell\7\pwsh.exe                             contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}"
 16468  rzls                 extensions\ms-dotnettools.csharp-2.14.8-win32-x64\.razor\rzls.exe  win32-x64\.razortelemetry\Microsoft.VisualStudio.DevKit.Razor.dll

@monty241
Copy link
Author

monty241 commented Jan 5, 2024

Thx for response.

The use was on Linux, so for easiest adoptation it would be align with traditional ps statement on Linux, such as:

user@xxx:/PWD# ps -ef|grep dotnet
user        1247       1 99 07:40 ?        1-12:56:26 /usr/bin/dotnet /usr/local/acme.cloud/Acme.dll
user        1248       1  9 07:40 ?        00:27:29 /usr/bin/dotnet /usr/local/acme.com/Acme.dll
user        1249       1  0 07:40 ?        00:02:00 /usr/bin/dotnet /usr/local/acme.com/Acme.dll
user        1250       1  1 07:40 ?        00:03:48 /usr/bin/dotnet /usr/local/acme.com/Acme.dll
user        1251       1  1 07:40 ?        00:03:53 /usr/bin/dotnet /usr/local/acme.nl/Acme.dll
user       38586       1 13 11:48 ?        00:07:17 /usr/bin/dotnet /usr/local/acme.cloud/Acme.dll

On Linux, no truncation takes place.

But any option which avoids silent truncation would be considered by me an improvement.

As a fallback option, displaying ellipsis ('...') when truncation applies would be of assistance and guide the sysadmin to the fact part of the text is missing. This can be done at start or end, but maybe best in the middle since that typically provides the most little added value, such as:

abcdef...xyz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants