Commit Graph

73 Commits

Author SHA1 Message Date
Jim Warner
6658492df6 ps: exploited that newly added field 'executable path'
Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-06-26 21:25:18 +10:00
Sébastien Bigaret
5329984b2e ps: add times & cputimes format specifiers: cumulative CPU time in seconds
These format specifiers are to time & cputime what etimes is to etime.

Signed-off-by: Sébastien Bigaret <sebastien.bigaret@telecom-bretagne.eu>

References:
 procps-ng/procps!43
2018-03-02 22:19:40 +11:00
Jim Warner
22887a61e1 ps: changed to exploit a newly added UID used at login
This patch represents a newlib adaptation of the merge
request offered by Jan Rybar that is referenced below.

Reference(s):
https://gitlab.com/procps-ng/procps/merge_requests/57
https://bugzilla.redhat.com/show_bug.cgi?id=1518986

Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-02-19 20:33:59 +11:00
Craig Small
91df65b9e7 docs: Document I idle state in ps and top
Linux 4.2 provided a new process state of I which is used for an idle
kernel thread. This new state means that kernel threads do not
contribute to the loadavg as they are no longer state D or S but I.

While both ps and top displayed this state, it wasn't documented in
either manual page until now.

References:
 https://bugs.debian.org/886967
 https://www.quora.com/What-does-mean-Linux-process-state-I-in-the-top-output
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80ed87c8a9ca0cad7ca66cf3bbdfb17559a66dcf
2018-01-13 11:25:59 +11:00
Jim Warner
fd95a61652 ps: have now added the NUMA node field display support
Reference(s):
https://gitlab.com/procps-ng/procps/issues/58

Signed-off-by: Jim Warner <james.warner@comcast.net>
2017-05-22 21:38:10 +10:00
Martin Polednik
b3e8581a30 ps: recognize SCHED_DEADLINE 2016-11-21 21:56:37 +11:00
Jim Warner
66c4024d75 ps: respond to loss of that PIDS_WCHAN_ADDR enumerator
No longer will ps print nwchan as 'ffffff', '-' or '1'
since the proc/PID/stat wchan field didn't represent a
real address anyway. Rather, the field will henceforth
output a dash ('-'), the ps customary 'not available'.

That man document was also tweaked to better represent
actual behavior. An asterisk ('*') was never shown for
threaded tasks and that dash ('-') usually didn't mean
running tasks (sometimes associated with permissions).

Signed-off-by: Jim Warner <james.warner@comcast.net>
2016-10-16 08:23:38 +11:00
Craig Small
03b148d517 ps: display control group name
The cgroup field while shown as a vector is a concatenated
string, so alot of the complexity of sorting and displaying
has gone.

This change simplifies the cgroup sorting and adds display
and sorting for the name attribute of the cgroup, if found.

Signed-off-by: Craig Small <csmall@enc.com.au>

Ported-by: Jim Warner <james.warner@comcast.net>
From original:
commit 0ee090ae16
2015-10-14 21:34:37 +11:00
Jim Warner
3600f652e8 documentation: fix man pages due to refactor for wchan
This patch will bring three of our man pages into line
with the recent refactor of the libprocps wchan logic.

[ and also eliminates more damn eol whitespace which ]
[ snuck in our repo with the commit referenced below ]

Reference(s):
http://www.freelists.org/post/procps/WCHAN,11
commit cf4788c28d

Signed-off-by: Jim Warner <james.warner@comcast.net>
2015-06-19 19:09:21 +10:00
Jim Warner
6577371919 ps: update man document to support LXC container names
Signed-off-by: Jim Warner <james.warner@comcast.net>
2015-06-14 15:36:06 +10:00
Peggy Russell
cf4788c28d ps.1: usernames are truncated
ps now truncates usernames and doesn't change them to uids.
Man page is now updated with the correct information

Signed-off-by: Craig Small <csmall@enc.com.au>
2015-06-13 16:54:23 +10:00
Jim Warner
d187304854 ps: clarify which options depend on systemd in man doc
Signed-off-by: Jim Warner <james.warner@comcast.net>
2014-07-17 13:31:06 +02:00
Jaromir Capik
e751606fcc ps: add -q/q/--quick-pid option
This commit introduces a new option q/-q/--quick-pid
to the 'ps' command. The option does a similar job
to the p/-p/--pid option (i.e. selection of PIDs
listed in the comma separated list that follows
the option), but the new option is optimized
for speed.
In cases where users only need to specify a list
of PIDs to be shown and don't need other selection
options, forest type output and sorting options,
the new option is recommended as it decreases
the initial processing delay by avoiding reading
the necessary information from all the processes
running on the system and by simplifying
the internal filtering logic.
2014-07-10 21:24:19 +02:00
Jaromir Capik
411d218793 docs: distinguish between T/t in the ps.1 manual 2014-07-02 16:23:30 +02:00
Jim Warner
9e4986f4ea ps: correct some man document deficiencies/aberrations
. a 'space' misinterpreted as the continuation request
. continuation character, resulting in a concatenation
. 2 missing fields inadvertently omitted from man page

Reference(s):
. bug report regarding missing fields
https://bugs.launchpad.net/ubuntu/+source/procps/+bug/115016

Signed-off-by: Jim Warner <james.warner@comcast.net>
2014-05-28 06:53:19 +10:00
Jim Warner
ada443268e misc: fix man doc spelling and grammar for translation
Signed-off-by: Jim Warner <james.warner@comcast.net>
2014-04-28 20:56:48 +02:00
Lukas Nykryn
d66ed3350e ps: possibility to display slice unit for a process
Library systemd-login offers possibility to display
name of a systemd slice unit for specific pid.

This patch adds output option "slice" which will
show name of systemd slice unit.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-10-16 15:18:08 +02:00
Craig Small
dd6f24dbed Merge commit 'refs/merge-requests/13' of git://gitorious.org/procps/procps into merge-requests/13
Conflicts:
	pgrep.c
	ps/output.c
	ps/ps.1
2013-09-11 21:34:05 +10:00
Václav Pavlín
39c6de4c87 ps: remove sd_ prefix from systemd output options
ps : This patch removes sd_ prefix from recently added systemd output options
to let them look more tied with the system.

Patch does not change behaviour of these options, only modifies their
representation to user.
2013-05-22 14:55:40 +02:00
Lukas Nykryn
7b50c2e918 ps: possibility to display seat for a process
Library systemd-login offers possibility to display
name of seat for a session on multi-seat systems.

This patch adds output option "sd_seat" which will
show name of seat or "-", when name of seat can not
be determined, but "seat0" should always exist.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
38e8087d55 ps: possibility to display systemd user unit for a process
Library systemd-login offers possibility to display
name of systemd user unit for specific pid. Note that not all
processes are part of a user unit.

This patch adds output option "sd_uunit" which will
show name of user unit or "-", when process does not belong
to any user unit. This is similar to "sd_unit" but applies
to user units instead of system units.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
4c1536d5f1 ps: possibility to display machine name for a process
Library systemd-login offers possibility to display
the name of the VM or container which process belongs to.

This patch adds output option "sd_machine" which will
show machine name or "-" when the name can not be determined.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
785776c10d ps: possibility to display uid of session owner for a process
Library systemd-login offers possibility to display the Unix
user identifier of the owner of the session of a process.
This information will also be displayed for user processes which
are shared between multiple login sessions of the same user,
where sd_session will be blank.

This patch adds output option "sd_ouid" which will show
user UID or "-", when there is no owner for a process.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
716d96b8eb ps: possibility to display login session for a process
Library systemd-login offers possibility to display name
of login session for specific pid.
Note that not all processes are part of a login session
(e.g. system service processes, user processes that are shared
between multiple sessions of the same user, or kernel threads).

This patch adds output option "sd_session" which will
show name of session or "-", when process does not belong
to any session.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
7ab5d33c5c ps: possibility to display systemd unit for a process
Library systemd-login offers possibility to display
name of a systemd unit file for specific pid. Note that
not all processes are part of a system unit/service
(e.g. user processes, or kernel threads).

This patch adds output option "sd_unit" which will
show name of systemd unit or "-", when process does not
belong to any unit.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Aristeu Rozanski
a01ee3c0b3 procps: add support for linux namespaces
Each process in Linux has a /proc/<pid>/ns directory which contains
symbolic links to pipes that identify which namespaces that process
belongs to. This patch adds support for ps to display that information
optionally.

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
2013-04-16 15:05:21 -04:00
Jim Warner
fe75e26ab6 miscellaneous: clean up trailing whitespace throughout
The entire tree's polluted with inappropriate trailing
whitespace. This commit rids our environment of all of
those useless keystrokes. Unfortunately, it sure ain't
a permanent solution and requires every contributor to
instruct their editor(s) to prevent or eliminate them.

Plus it's strongly recommended we all insert something
like what's shown below to our '.gitconfig' file so as
to provide at least some warnings when we try to apply
any patches (git am) that do contain the #@!%& things!

References(s):
~/.gitconfig excerpt ---------------------------------
[core]
  whitespace = trailing-space, space-before-tab, blank-at-eof
[apply]
  whitespace = warn
--------------------------------- ~/.gitconfig excerpt

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-03-14 12:36:47 +01:00
Andreas Bießmann
15030a87a6 ps.1: fix --group description
The --group switch tells about parameter 'grplist' but detailed description
names it 'grouplist'.
This patch changes 'grouplist' to 'grplist'.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Craig Small <csmall@enc.com.au>
2013-01-24 21:33:24 +11:00
David Prévot
84c89e06af ps.1: format fix in notes
The “.I\-aux” syntax is broken (missing space): as a result, the hyphen
doesn't show up in the man page. Furthermore, according to man(1)
conventions, and in consistency with the rest of the manpage, it should
be bold instead of italic, the attached patch fixes this issue.

Signed-off-by: Craig Small <csmall@enc.com.au>
2013-01-01 13:12:25 +11:00
Jaromir Capik
8e867659e6 SELinux spelling (rhbz#859900)
We got a bug report, that our project doesn't spell "SELinux"
consistently/correctly. I've fixed that and the patch is attached.

Signed-off-by: Craig Small <csmall@enc.com.au>
2012-09-27 21:46:46 +10:00
Craig Small
dc1531b211 Removed bogus bogus -aux message
This message has been here for ages and either people ignore it because
they are so used to using -aux or never see it.  It was here before 2005
and really 7 years is enought time to people to change their ways.

The notice is now removed, people who make usenames like "x" deserve all
the punishment they can get.

Bug-Debian: http://bugs.debian.org/670592
2012-05-22 20:50:34 +10:00
Jim Warner
421b08a4df all: fix misspellings in docs and program comments
We might as well join the coreutils and util-linux
projects in correcting our own typos.

The following was left unchanged:
   top/top.c[1797]: thru -> "through"

references:
http://lists.gnu.org/archive/html/coreutils/2012-04/msg00057.html
http://marc.info/?l=util-linux-ng&m=133518057419736&w=2

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-04-25 13:46:02 +10:00
Sami Kerola
47100a8125 docs: fix manual page warnings
All warnings where about unnecessary quoting.  The scriptlet
below will tell what was wrong.

for I in ./top/top.1 ./ps/ps.1 ./*.[0-9]; do
    echo "== $I warnings =="
    man --warnings=all $I > /dev/null
done

This should probably be turned to 'make check' script.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-16 12:55:53 +02:00
Jim Warner
42380330d7 misc: update remaining memory references to IEC standard
This commit brings the few remaining occurances
of kB, etc. into line with the IEC binary naming
standard.

Comments containing any such references have been
left unchanged.

Reference(s):
commit 2fc3f15770

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-03-16 07:06:58 +11:00
Jaromir Capik
99c99baebc docs: typo in ps.1 manual [rpmlint]
Signed-off-by: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:18:27 +11:00
Jim Warner
b139890758 ps: update man document for redesigned help provisions 2012-01-04 08:58:53 +11:00
Jim Warner
71b72b36ce ps: minor reformatting and trailing whitespace elimination
This patch mostly reorganizes include files and eliminates
some useless trailing whitespace.

It also adopts the standard procps-ng unconditional approach
to nls initialization.
2012-01-04 08:58:53 +11:00
Sami Kerola
003d388922 docs: clean up ps.1 manual page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Sami Kerola
db6aea7d3f ps: new usage function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Craig Small
0c82b0ceda ps: rename SZ to SIZE
Means we do not follow SCO but less confusion.

A patch from Debian.

Bug-Debian: http://bugs.debian.org/541061
Backported-by: Sami Kerola <kerolasa@iki.fi>
2011-12-18 22:50:12 +11:00
Craig Small
b9a408372e Merge branch 'master', remote-tracking branch 'sami/ng' 2011-10-01 23:23:30 +10:00
Craig Small
e4c45d6984 added ps etimes, miscellaneous top enhancements
ps program
 . etimes added for ELAPSED expressed in seconds
 . time_t used in place of former unsigned long

top program
 . corrected scroll message bug when 'x' toggle on
 . fixed forest view potential missing libflags bug
 . improved 'k' default signal invocation logic
 . enhanced logic for %CPU maximums displayed
 . made signal handling more robust and efficient
2011-09-12 22:18:23 +10:00
Craig Small
0e6ac0db3e added tgid support plus miscellaneous cleanup
ps
   . added tgid support
   . made process/task naming consistent
 top
   . added tgid support
   . standardized pid related width logic
 documents
   . added tgid to ps & top man documents
 library
   . fixed OOMEM_ENABLE readtask bug
   . corrected header typo for tgid
2011-08-17 21:01:35 +10:00
Craig Small
3ef4823f90 supgid/supgrp support, improved library interface
Library changes
   readproc
    . added support for supplementary groups
    . eliminated 2 potential mem leak sources
       . shortcut used for multi-threaded str
         vectors & ptrs was obsoleted
       . freeing of proc_t related dynamic
         memory now rests with the library
    . standardized/normalized many c comments
   sysinfo
    . corrected note regarding glibc & cpuinfo
   library.map
    . made the visible freeproc accessable
 Program changes
   pmap
    . initialized buffer for new readproc i/f
    . eliminated now obsolete free() call
   ps
    . added width aware supgrp support
    . initialized buffers for new readproc i/f
    . eliminated now obsolete free() calls
   top
    . added supgrp support as variable width
    . eliminated now obsolete free() calls
    . expoilted library freeproc function
    . corrected -h|v args text & spacing
    . updated some c comments
 Documentation changes
   ps.1
    . added supgid and supgrp
   top.1
    . added supgid and supgrp
    . addition of above required renumbering
      many fields in section 3a. DESCRIPTIONS
2011-08-01 21:28:46 +10:00
Sami Kerola
71d10d3a49 name change: procps -> procps-ng
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-04 20:50:12 +02:00
Jan Görig
24a97a22d2 ps.1 manual page fixes
Merged changes from Debian and RHEL. Some minor fixes added.

Authors: Craig Small <csmall@debian.org>, Jari Aalto <jari.aalto@cante.net>,
         David Prévot <david@tilapin.org>, Daniel Novotny
2011-02-24 14:23:31 +01:00
Jan Görig
e47f54c569 Merged changes from procps-3.2.8 not present in CVS 2011-02-10 13:40:29 +01:00
Jan Görig
af25453d9a ps displays cgroup
Author: Swann Perarnau <swann.perarnau@imag.fr>
Bug-Debian: http://bugs.debian.org/469669
Reviewed-by: Craig Small <csmall@debian.org>
2010-12-16 10:23:49 +01:00
albert
8dcea80764 ps: man page less ambiguous 2006-12-17 18:47:18 +00:00
albert
9049ffef32 ps man page 2006-09-10 06:25:56 +00:00