Date: Fri, 18 Aug 2006 17:33:46 +0400 (MSD) From: Yar Tikhiy <yar@comp.chem.msu.su> To: FreeBSD-gnats-submit@FreeBSD.org Cc: gad@FreeBSD.org Subject: bin/102232: Defects in -O option to ps(1) Message-ID: <200608181333.k7IDXkZm026571@jujik.ramtel.ru> Resent-Message-ID: <200608181340.k7IDeDn8047017@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 102232 >Category: bin >Synopsis: Defects in -O option to ps(1) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 18 13:40:13 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Yar Tikhiy >Release: FreeBSD 7.0-CURRENT i386 >Organization: None >Environment: FreeBSD-CURRENT >Description: 1. Multiple -O options to ps(1) result in ill-looking output. Using multiple -O options can be necessary if one wants to supply blank column titles for the columns added. (Why not?) Ability to supply multiple -O options to ps(1) would be consistent with that for multiple -o options. 2. Using -O along with flags changing the default columns, e.g., -u, produces ill-looking output. >How-To-Repeat: %ps -O jid -O rss PID JID TT STAT TIME COMMAND RSS 768 0 p0 Ss 0:00.64 -csh (csh) 4044 1405 0 p0 R+ 0:00.01 ps -O jid -O rss 1012 1007 0 p1 Is 0:00.05 -csh (csh) 2944 %ps -u -O jid USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND PID JID TT STAT TIME COMMAND yar 768 0.0 3.5 6116 4044 p0 Ss 3:37PM 0:00.64 -csh (csh) 768 0 p0 Ss 0:00.64 -csh (csh) yar 1406 0.0 0.9 5228 1012 p0 R+ 5:19PM 0:00.01 ps -u -O jid 1406 0 p0 R+ 0:00.01 ps -u -O jid yar 1007 0.0 2.5 4744 2944 p1 Is 4:21PM 0:00.05 -csh (csh) 1007 0 p1 Is 0:00.05 -csh (csh) >Fix: Have ps(1) construct 3 internal lists of keywords to display instead of the current single list: leading, user-supplied, and trailing. Options like -u would switch the 1st and 3rd lists then. Option -o would set the 1st and 3rd lists to nil once before filling the 2nd one. Option -O would just fill the 2nd list. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608181333.k7IDXkZm026571>