Skip to content

Increase CMD column width to 15 characters for full thread names#381

Open
re2zero wants to merge 1 commit into
Atoptool:masterfrom
re2zero:fix/cmd-column-width-15-chars
Open

Increase CMD column width to 15 characters for full thread names#381
re2zero wants to merge 1 commit into
Atoptool:masterfrom
re2zero:fix/cmd-column-width-15-chars

Conversation

@re2zero
Copy link
Copy Markdown

@re2zero re2zero commented May 27, 2026

Summary

According to pthread_setname_np(3), thread names can be up to 15 characters (16 bytes including the null terminator). The CMD column in atop was previously limited to 14 characters, which caused the last character of thread names to be truncated.

This change increases the CMD column width from 14 to 15 characters to display full thread names.

Changes

  • Increased buffer size in procprt_CMD_a() from 15 to 16 bytes
  • Increased buffer size in procprt_CMD_e() from 15 to 16 bytes (and helpbuf from 15 to 17)
  • Updated format strings from %-14.14s to %-15.15s
  • Updated procprt_CMD struct: column header width and width field from 14 to 15

Test Plan

  • Build passes without compilation errors
  • Code follows existing project style

Fixes #321

According to pthread_setname_np(3), thread names can be up to 15
characters (16 bytes including null terminator). The CMD column was
previously limited to 14 characters, causing the last character of
thread names to be truncated.

This change increases the CMD column width from 14 to 15 characters
to display full thread names.

Fixes Atoptool#321
@re2zero re2zero marked this pull request as ready for review May 28, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread names are missing the last character because the CMD column is only 14 characters wide

1 participant