From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 18 13:40:15 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEFC716A4E0 for ; Fri, 18 Aug 2006 13:40:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D38743D49 for ; Fri, 18 Aug 2006 13:40:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7IDeEOt047023 for ; Fri, 18 Aug 2006 13:40:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7IDeDn8047017; Fri, 18 Aug 2006 13:40:14 GMT (envelope-from gnats) Resent-Date: Fri, 18 Aug 2006 13:40:14 GMT Resent-Message-Id: <200608181340.k7IDeDn8047017@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yar Tikhiy Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CA0B16A4E6; Fri, 18 Aug 2006 13:33:49 +0000 (UTC) (envelope-from yar@jujik.ramtel.ru) Received: from jujik.ramtel.ru (jujik.ramtel.ru [81.19.64.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94A1F43D46; Fri, 18 Aug 2006 13:33:48 +0000 (GMT) (envelope-from yar@jujik.ramtel.ru) Received: from jujik.ramtel.ru (localhost [127.0.0.1]) by jujik.ramtel.ru (8.13.7/8.13.7) with ESMTP id k7IDXkl0026572; Fri, 18 Aug 2006 17:33:46 +0400 (MSD) (envelope-from yar@jujik.ramtel.ru) Received: (from yar@localhost) by jujik.ramtel.ru (8.13.7/8.13.7/Submit) id k7IDXkZm026571; Fri, 18 Aug 2006 17:33:46 +0400 (MSD) (envelope-from yar) Message-Id: <200608181333.k7IDXkZm026571@jujik.ramtel.ru> Date: Fri, 18 Aug 2006 17:33:46 +0400 (MSD) From: Yar Tikhiy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: gad@FreeBSD.org Subject: bin/102232: Defects in -O option to ps(1) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2006 13:40:15 -0000 >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: