From nobody Wed Nov 24 16:11:20 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3502218900EA; Wed, 24 Nov 2021 16:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzmGJ6nNRz3lQV; Wed, 24 Nov 2021 16:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8D844AF4; Wed, 24 Nov 2021 16:11:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AOGBKhY001769; Wed, 24 Nov 2021 16:11:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOGBKhv001768; Wed, 24 Nov 2021 16:11:20 GMT (envelope-from git) Date: Wed, 24 Nov 2021 16:11:20 GMT Message-Id: <202111241611.1AOGBKhv001768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: cd66a1b1c8c5 - stable/13 - top.1: Sort options alphabetically List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd66a1b1c8c5afb995e13534e4c818a5df78013e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637770281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vca5WgUMD3B9RmZ6oqY1NsrgJ66b/Ir9mOMgprYPeFQ=; b=ou0m72xxHeIUKMHqWiLi/CvUQdJ6U0WnDKMDMHU4sbfU+goqlFkpEGL+GGfTIzO/IgGHQ2 LLCLgYf2jZ6ljdbB2di5x4G/Lnm6O17Z5lSrpsRv+TMYjXE5dJN8uIJahYZqc+HniCrx62 MHM7/xxJqP06e/HIg8W1Y7C81Jg6WsG1UwshiDJFqqCmadtlKrdnmrHjfJCSWqh9qhS5f2 ilXh/Z3QIuzU2BrBkaqbs7gSnFBzVYGgbEtflws3KUiWjr84fHjsl5JRf0Y3Y9bodxm6BO 4Ymvnil0ihlzBhg7+xB9YWWxL7L1vzApv6/c5tqGT49NobXl710B/HrVznUnFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637770281; a=rsa-sha256; cv=none; b=uaERJpfciqH3vDwVFcKxQJxAPtMEBfaP1abC+7EnziMkoAen1GPMHsRtbq4LPMDGDfaC4T PMryA3tWzSYcQhzsbB9zXuRdMt+/tG/tUwjirlssYzrkxD3Zz9UclbFFITI5l6XlWZhrva p8TYIlFvqgoU7L4qzDi/zH2diYlQL20gC/HYu9pvY4y+NjWr71RVf4hxKkpojvppDcVMB6 F8yF0pXfQfMltdMG2hQJlY5kILG+RTuPSdX8xZDyxE+jANwvkqZkKy6iY+kky29QnLTq7X ciNLa8Yh27v3HbRlmN+8r4sIkyziPxnkOZ4pGuSKv78b4pe644cTNlsNLPc2CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cd66a1b1c8c5afb995e13534e4c818a5df78013e commit cd66a1b1c8c5afb995e13534e4c818a5df78013e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-18 13:11:23 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-24 16:07:02 +0000 top.1: Sort options alphabetically While here, add a short sentence introducing the options. MFC after: 3 days (cherry picked from commit 112539041590259a9d1e34999a80dc607c69f4db) --- usr.bin/top/top.1 | 155 +++++++++++++++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 42282bebdafe..f435cfe5e206 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -7,14 +7,14 @@ .Nd display and update information about the top cpu processes .Sh SYNOPSIS .Nm -.Op Fl CHIPSTabijnpqtuvxz -.Op Fl J Ar jail -.Op Fl U Ar uid +.Op Fl abCHIijnPpqSTtuvxz .Op Fl d Ar count +.Op Fl J Ar jail .Op Fl m Ar cpu|io -.Op Fl s Ar time .Op Fl o Ar field .Op Fl p Ar pid +.Op Fl s Ar time +.Op Fl U Ar uid .Op Ar number .Sh DESCRIPTION .Nm @@ -43,22 +43,9 @@ If the output of .Nm is redirected to a file, it acts as if it were being run on a dumb terminal. -.Bl -tag -width indent -compact -.It Fl C -Toggle CPU display mode. -By default top displays the weighted CPU percentage in the WCPU column -(this is the same value that -.Xr ps 1 -displays as CPU). -Each time -.Fl C -flag is passed it toggles between \*(lqraw cpu\*(rq mode -and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or -the \*(lqWCPU\*(rq column respectively. -.It Fl S -Show system processes in the display. -Normally, system processes such as the pager and the swapper are not shown. -This option makes them visible. +.Pp +The options are as follows: +.Bl -tag -width indent .It Fl a Display command names derived from the argv[] vector, rather than real executable name. @@ -75,9 +62,34 @@ In this mode, all input from the terminal is ignored. Interrupt characters (such as ^C and ^\e) still have an effect. This is the default on a dumb terminal, or when the output is not a terminal. +.It Fl C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.Xr ps 1 +displays as CPU). +Each time +.Fl C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.It Fl d Ar count +Show only +.Ar count +displays, then exit. +A display is considered to be one update of the +screen. +The default is 1 for dumb terminals. +Note that for +.Ar count += 1 +no information is available about the percentage of time spent by the CPU in every state. .It Fl H Display each thread for a multithreaded process individually. By default a single summary line is displayed for each process. +.It Fl I +Do not display idle processes. +By default, top displays both active and idle processes. .It Fl i Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately @@ -90,19 +102,23 @@ screen will immediately be updated, even if the command was not understood. This mode is the default when standard output is an intelligent terminal. -.It Fl I -Do not display idle processes. -By default, top displays both active and idle processes. +.It Fl J Ar jail +Show only those processes owned by +.Ar jail . +This may be either the +.Ar jid +or +.Ar name +of the jail. +Use +0 +to limit to host processes. +Using this option implies +.Fl j . .It Fl j Display the .Xr jail 8 ID. -.It Fl T -Toggle displaying thread ID (tid) instead of process id (pid). -.It Fl t -Do not display the -.Nm -process itself. .It Fl m Ar display Display either 'cpu' or 'io' statistics. Default is 'cpu'. @@ -110,8 +126,19 @@ Default is 'cpu'. Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq mode. +.It Fl o Ar field +Sort the process display area on the specified field. +The field name +is the name of the column as seen in the output, but in lower case: +\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, +\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, +\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, +\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. .It Fl P Display per-cpu CPU usage statistics. +.It Fl p Ar pid +Show only the process +.Ar pid . .It Fl q Renice .Nm @@ -119,6 +146,26 @@ to -20 so that it will run faster. This can be used when the system is being very sluggish to improve the possibility of discovering the problem. This option can only be used by root. +.It Fl S +Show system processes in the display. +Normally, system processes such as the pager and the swapper are not shown. +This option makes them visible. +.It Fl s Ar time +Set the delay between screen updates to +.Ar time +seconds, which may be fractional. +The default delay between updates is 1 second. +.It Fl T +Toggle displaying thread ID (tid) instead of process id (pid). +.It Fl t +Do not display the +.Nm +process itself. +.It Fl U Ar username +Show only those processes owned by +.Ar username . +This option currently only accepts usernames and will not understand +uid numbers. .It Fl u Do not map uid numbers to usernames. Normally, @@ -133,52 +180,6 @@ Write version number information to stderr then exit immediately. Display approximate swap usage for each process. .It Fl z Do not display the system idle process. -.It Fl d Ar count -Show only -.Ar count -displays, then exit. -A display is considered to be one update of the -screen. -The default is 1 for dumb terminals. -Note that for -.Ar count -= 1 -no information is available about the percentage of time spent by the CPU in every state. -.It Fl s Ar time -Set the delay between screen updates to -.Ar time -seconds, which may be fractional. -The default delay between updates is 1 second. -.It Fl o Ar field -Sort the process display area on the specified field. -The field name -is the name of the column as seen in the output, but in lower case: -\*(lqcpu\*(lq, \*(rqsize\*(lq, \*(rqres\*(lq, \*(rqtime\*(lq, -\*(rqpri\*(lq, \*(rqthreads\*(lq, \*(lqtotal\*(lq, \*(rqread\*(lq, -\*(rqwrite\*(lq, \*(rqfault\*(lq, \*(rqvcsw\*(lq, \*(rqivcsw\*(lq, -\*(lqjid\*(lq, \*(rqswap\*(lq or \*(rqpid\*(lq. -.It Fl p Ar pid -Show only the process -.Ar pid . -.It Fl J Ar jail -Show only those processes owned by -.Ar jail . -This may be either the -.Ar jid -or -.Ar name -of the jail. -Use -0 -to limit to host processes. -Using this option implies -.Fl j . -.Pp -.It Fl U Ar username -Show only those processes owned by -.Ar username . -This option currently only accepts usernames and will not understand -uid numbers. .El .Pp Both @@ -238,9 +239,7 @@ Quit .Nm .It d Change the number of displays to show (prompt for new number). -Remember that the next display counts as one, so typing -.It d1 -will make +Remember that the next display counts as one, so typing 'd1' will make .Nm show one final display and then immediately exit. .It /