From: Job Snijders Subject: Re: firefox compat for ps To: Ted Unangst Cc: tech@openbsd.org Date: Sun, 23 Mar 2025 09:28:13 +0000 Did you consider cranking it up to 7 digits (to better accommodate chubby instances of for example chromium, mount_mfs, and mutt)? Anyway, 6 already seems to improve readability. OK job@ On Sat, Mar 22, 2025 at 01:11:20PM -0400, Ted Unangst wrote: > Whenever I run ps aux, as I like to do, I notice there's some funny "l"s on lines by themselves. Turns out this is overflow from the line above, which has become 81 chars long because the VSZ and RSS columns have overflowed their prescribed widths. > > Efforts to make firefox compatible with ps have failed, so I am instead proposing to make ps compatible with firefox. This patch reserves an extra digit for each column. Alas, we're not all running vaxen anymore and such six digit processes are becoming more common. > > This eats two characters off the end of the command, though in practice this seems acceptable. Short names like ksh are still there, and long names like /usr/local/lib remain equally opaque. (Without -c.) > > Index: keyword.c > =================================================================== > RCS file: /home/cvs/src/bin/ps/keyword.c,v > diff -u -p -r1.53 keyword.c > --- keyword.c 10 Oct 2024 10:24:14 -0000 1.53 > +++ keyword.c 21 Mar 2025 18:47:42 -0000 > @@ -152,7 +152,7 @@ VAR var[] = { > /* XXX */ > {"rgroup", "RGROUP", NULL, LJUST, rgname, USERLEN}, > {"rlink", "RLINK", NULL, 0, pvar, 8, 0, POFF(p_back), UINT64, "llx"}, > - {"rss", "RSS", NULL, 0, p_rssize, 5}, > + {"rss", "RSS", NULL, 0, p_rssize, 6}, > {"rssize", "", "rsz"}, > {"rsz", "RSZ", NULL, 0, rssize, 4}, > {"rtable", "RTABLE", NULL, 0, pvar, 0, 0, POFF(p_rtableid), INT32, "d"}, > @@ -187,7 +187,7 @@ VAR var[] = { > {"user", "USER", NULL, LJUST, euname, USERLEN}, > {"usrpri", "", "upr"}, > {"vsize", "", "vsz"}, > - {"vsz", "VSZ", NULL, 0, vsize, 5}, > + {"vsz", "VSZ", NULL, 0, vsize, 6}, > {"wchan", "WCHAN", NULL, LJUST, wchan, WCHANLEN}, > {"xstat", "XSTAT", NULL, 0, pvar, 4, 0, POFF(p_xstat), UINT16, "x"}, > {""}, >