2.11BSD TOP and long usernames

112 views
Skip to first unread message

Heinz-Bernd Eggenstein

unread,
May 6, 2025, 2:52:44 PM5/6/25
to [PiDP-11]
Hi all,

The top code has seen quite a bit of patching lately, e.g. to deal with long host names corrupting the table structure. But I think there is a similar problem with "long" user names.

The current version (as of patch 490) prints user names using a "%-7s" format string, so left aligned filled with spaces to a width of at least 7 characters (but not truncating the string).
So even usernames with length 8 will break the table structure. 

The next table column to the right is that for the scheduling priority which gets 5 characters which seems excessive, the ps command uses a width of 4 only (including a space for column separation in both cases).

So could we perhaps extend the uname column to 8 characters and shorten the PRI column to 4?
We could then truncate user names that are longer than 8 characters to 7 followed by a "+" as is done in many modern versions of top and ps ?
Something along the enclosed patch perhaps?
Cheers
HBE


top.patch

Steve Gibson

unread,
May 6, 2025, 4:08:09 PM5/6/25
to Heinz-Bernd Eggenstein, [PiDP-11]
I believe you can submit the bug report, and probably your patch, to bu...@2bsd.com using the template found at /usr/share/misc/bugformat.

There is also a 'sendbug' script on the 2.11BSD system that will fire up the default editor with the template loaded and once it is filled out will presumably mail it to bu...@2bsd.com. But I don't know if that is likely to work with all that's involved in sending email these days. Might be easier to just copy/paste the template into your regular email client.

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-11/cbcf6f22-d4cd-48f6-b5b8-004a833919a4n%40googlegroups.com.


--
Steve Gibson
  :___;
{ o , o }
| ) ___ )
 - " - " -

Heinz-Bernd Eggenstein

unread,
May 6, 2025, 4:25:06 PM5/6/25
to [PiDP-11]
Yeah I didn't try to get sending email from within 2.11BSD on the PiDP11 work, but it's on my list :-) . I wanted others to check this first, e.g, I'm a bit unsure what the minimum and maximum values from the PRI(ority) field are.

Cheers
HBE

Johnny Billquist

unread,
May 6, 2025, 4:44:51 PM5/6/25
to pid...@googlegroups.com
Nah. I'll pick it up and get it in there.

Johnny

On 2025-05-06 22:07, Steve Gibson wrote:
> I believe you can submit the bug report, and probably your patch, to
> bu...@2bsd.com <mailto:bu...@2bsd.com> using the template found at /usr/
> share/misc/bugformat.
>
> There is also a 'sendbug' script on the 2.11BSD system that will fire up
> the default editor with the template loaded and once it is filled out
> will presumably mail it to bu...@2bsd.com <mailto:bu...@2bsd.com>. But I
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> pidp-11/cbcf6f22-d4cd-48f6-b5b8-004a833919a4n%40googlegroups.com
> <https://groups.google.com/d/msgid/pidp-11/cbcf6f22-d4cd-48f6-
> b5b8-004a833919a4n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
>
>
> --
> Steve Gibson
>   :___;
> { o , o }
> | ) ___ )
>  - " - " -
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pidp-11/
> CAExQuDiFrij7cA3AwEPrH81oQruWnnCATLjvsLoYPSdjFHpioQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pidp-11/
> CAExQuDiFrij7cA3AwEPrH81oQruWnnCATLjvsLoYPSdjFHpioQ%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

Heinz-Bernd Eggenstein

unread,
May 6, 2025, 5:05:12 PM5/6/25
to [PiDP-11]
Cool, thanks! I guess this can wait until there are other issues fixed to form a critical mass for a new patch.

Cheers
HBE

Heinz-Bernd Eggenstein

unread,
May 12, 2025, 4:14:43 PM5/12/25
to Johnny Billquist, pid...@googlegroups.com
Ohhhhh sh*t, there was an embarrassing typo in my patch. Sorry I
wasn't quite myself lately (one of my two cats and dear friend for 16
years just had to be sent over the rainbow bridge),

So here is what I think might work, but someone really needs to have a
2nd look at it. I still see some corruption of the top display
especially under heavy load (as some stray numbers in the bottom right
corner), but I think this has nothing to do with my patch but must be
a preexisting problem.
> To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/pidp-11/c84ac7bd-7d47-4c8b-9da9-aa53df6ce29d%40softjar.se.
top.patch
Reply all
Reply to author
Forward
0 new messages