Commit Graph

246 Commits

Author SHA1 Message Date
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
Jim Warner
ede5d99f6c ps: exploit library changes to cgroup & supgid
Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-08-29 17:26:43 +10:00
Jim Warner
f4b6de1136 ps: restore missing space when environment is displayed
This commit restores the missing space between command
lines and the environment when the later is being
displayed.  Below is a brief history of that elusive
character.

commit bb4f08ba29
Date:   Thu Aug 11 07:42:14 2011 +1000
   The ps program was altered for improved args/comm
   compliance.  At this time, the needed space was
   present due to a buglet in the new library
   read_unvectored function used by fill_cmdline_cvt.

commit a5881b5a4e
Date:   Thu Dec 8 10:19:38 2011 -0600
   The trailing space was eliminated so that the
   file2strvec and fill_cmdline_cvt returned
   command lines contained no trailing space.

   However, this created a buglet when control group
   hierarchies were displayed and the final cgroup
   was empty.

   This is also where the undetected ps buglet was
   created.

commit c3a1239efe
Date:   Sun Dec 11 12:00:50 2011 -0600
   The control group anomaly was fixed but the impact
   on ps args/environ was still not detected.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-08-29 17:24:54 +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
Jan Görig
cdeb9a071a ps: fix cpu utilization sorting
The sniplet below resulted not to be sorted correctly.

for i in $(seq 1 50); do ls -R /usr &>/dev/null 2>&1 & done
    sleep 1; ps -e --sort=pcpu -o pcpu,comm=; pkill ls

Issue is present since older versions of procps (3.2.7/3.2.8).

Reference: http://www.freelists.org/post/procps/top-incorrect-sort,2
Reported-by: Jaromir Capik <jcapik@redhat.com>
Backported-by: Sami Kerola <kerolasa@iki.fi>
2012-04-25 09:34:06 +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
Sami Kerola
52269d22f3 all: check stdout and stderr status at exit
If stream status is not checked at the end of execution below problem
would not report error, or non-zero exit code.  The uptime is just an
example same was true with all commands of the project.

$ uptime >&- ; echo $?
uptime: write error: Bad file descriptor
1
$ uptime >/dev/full ; echo $?
uptime: write error: No space left on device
1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-23 15:57:53 +01: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
0f6b289212 license: update FSF addresses
The license files are synchronized with the versions from GNU web
site.

http://www.gnu.org/licenses/gpl-2.0.html
http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html

Signed-off-by: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-03-04 08:04:24 +11:00
Sami Kerola
ce61089059 docs: clarification to license headers in files
Add license header to all files.  The summary of licensing is below,
taken from Craig Small's email which is referred in commit message
tail.

sysctl and pgrep are GPL 2+
The rest is LGPL 2.1+

Reference: http://www.freelists.org/post/procps/Incorrect-FSF-address-in-the-license-files,8
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=797962
CC: Craig Small <csmall@enc.com.au>
CC: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:41:11 +11:00
Sami Kerola
60ea600599 ps: fix compiler warnings
common.h:23:19: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
global.c:499:3: warning: ISO C does not support the '%Ld' gnu_printf format [-Wformat]
output.c:134:1: warning: 'sr_cstime' defined but not used [-Wunused-function]
output.c:816:3: warning: ISO C does not support the '%Lu' gnu_printf format [-Wformat]
output.c:816:3: warning: ISO C does not support the '%Lu' gnu_printf format [-Wformat]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:36:29 +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
Craig Small
502a79e02f Merge remote-tracking branch 'sami/to-craig' into sami-merge
Conflicts:
	pgrep.c
	w.c
2012-03-03 13:56:32 +11:00
Craig Small
563dd2c5f1 Fix string literals in fprintf and friends
Both these are from [-Werror=format-security]
sig.c:262:5: error: format not a string literal and no format arguments
global.c:517:3: error: format not a string literal and no format arguments
2012-03-03 12:05:07 +11:00
Craig Small
a15520db8c ps abort causes problems in testsuite
Under certain circumstances, using abort() when either make check
or make distcheck puts ps into an infinite loop around the
function catastrophic_failure() in ps and the C library raise
and abort functions.

Using exit removes this problem and does almost the same thing.
2012-03-03 11:49:48 +11:00
Mike Frysinger
9c32fdbec3 ps: include error.h
This code currently uses error_at_line() from error.h, so pull it in.
Long term, this might get moved to c.h as a local helper on err.h,
but I have no idea.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-24 08:55:05 +01:00
Sami Kerola
79ceb30b5c ps: unify cases and remove trailing dots in messages
Strings with lower caps & no trailing dots have greater change to
have multiple occurences, meaning less effort for translators, than
strings with them.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-15 20:52:58 +01:00
Sami Kerola
5c9ec043cd docs: remove old information from HACKING
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-13 22:42:38 +01:00
Sami Kerola
809906b6a7 ps: add catastrophic_failure()
The catastrophic_failure function tries to make bug reporting useful
by telling in which line error occured, and drops core.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-13 22:42:38 +01:00
Mike Fleetwood
2bac5334b0 ps: display the nice value for processes with the SCHED_BATCH scheduler policy
Ps command does not display the nice value for processes with the SCHED_BATCH
scheduler policy, only for SCHED_OTHER.

Boinc (http://boinc.berkeley.edu/) client runs project processing jobs on
Linux using SCHED_BATCH scheduler policy and nice value 19.  The nice value
is not displayable by ps.

Steps to Reproduce:
1. Run process using SCHED_BATCH scheduler policy with nice value.
    ./test-schedbatch 18 &
2. Display process details:
    ps -o pid,ppid,user,comm,cls,nice

Results before:
[mike@rockover c]$ ps -o pid,ppid,user,comm,cls,nice
  PID  PPID USER     COMMAND         CLS  NI
18205  2540 mike     bash             TS   0
20552 18205 mike     test-schedbatch   B   -
20553 18205 mike     ps               TS   0
[mike@rockover c]$ awk '{printf "%5d %-17s %1d %2d\n", $1, $2, $41, $19}'
/proc/20552/stat
20552 (test-schedbatch) 3 18

Results after this patch:
[mike@rockover c]$ ps -o pid,ppid,user,comm,cls,nice
  PID  PPID USER     COMMAND         CLS  NI
18205  2540 mike     bash             TS   0
20552 18205 mike     test-schedbatch   B  18
20553 18205 mike     ps               TS   0

Additional info: Here is the fragment from the sched_setscheduler(2) manual
page on the subject:

   SCHED_BATCH: Scheduling batch processes
       (Since  Linux 2.6.16.)  SCHED_BATCH can only be used at static
       priority 0.  This policy is similar to SCHED_OTHER in that it
       schedules the process according to its dynamic priority (based on the
       nice value).  The difference is that this policy will cause the
       scheduler to always assume that the process is CPU-intensive.
       Consequently, the scheduler will apply a small scheduling penalty with
       respect to wakeup behaviour, so that this process is mildly disfavored
       in scheduling decisions.

       This policy is useful for workloads that are noninteractive, but do
       not want to lower their nice value, and for workloads that want a
       determin- istic scheduling policy without interactivity causing extra
       preemptions (between the workload's tasks).

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=741090
Acked-by: Jaromir Capik <jcapik@redhat.com>
Acked-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
2012-01-09 21:37:41 +01:00
Sami Kerola
5ccb0951c1 ps: corrections to messages
Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
2012-01-06 00:17:50 +11:00
Jim Warner
dd194da7ec ps: change PACKAGE_BUGREPORT to procps@freelists.org 2012-01-05 09:56:05 +11:00
Jim Warner
893b1b81a8 ps: update url for BUILD_WITH_WHINE error message 2012-01-05 09:56:05 +11:00
Jim Warner
3388f65c03 build-sys: correct all Makefile.am files for LOCALEDIR, etc
Some of the latest changes to Makefile.am files are missing.

This patch restores the LOCALEDIR variable, among others,
and dispenses with the include directives in the ps/ and top/
subdirectories since they're no longer needed.
2012-01-04 08:58:54 +11:00
Jim Warner
b139890758 ps: update man document for redesigned help provisions 2012-01-04 08:58:53 +11:00
Jim Warner
4fb48c0bdb ps: generalize help text logic, add related translator hints
This commit represents an experiment in nls help text support.

The word --help itself been made translatable along with the
help section names and their abbreviations.  Thus, the work of
the translators will ultimately alter program run-time behavior.

Perhaps someday all "long" options can behave in a similar way
which could offer a considerable benefit to other languages.
Instead of translationg just option descriptions, the long
forms of those options could also be transalated.

This commit also:
 . includes the section abbreviations in --help output
 . isolates all --help support in the ps/help.c module
 . provides (hopefully) meaningful Translator guidance
 . removes --help support from the ps/common.h header
 . removes --help support from the ps/parser.c module
 . eliminates tabs in line with the style of other ps modules
 . eliminates the need for the include/c.h header file
2012-01-04 08:58:53 +11:00
Jim Warner
b8c3288594 ps: exclude debugging only code from participation in nls support
This commit is prmarily concerned with elimnating deugging only
code from the nls template file.

It also eliminates any remaing useless trailing whitespace.
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
Jim Warner
fe20653a4e ps: trade cumbersome GNU attributes with less wordy alternatives 2012-01-04 08:58:52 +11:00
Craig Small
76b3e91e6a Made the c and nls include explicit
These two includes need the path otherwise the make distcheck fails.
I suspect its actually a ps/Makefile.am problem
2012-01-02 17:46:17 +11:00
Sami Kerola
c3405fab1a translations: group usage texts
Reference: http://www.freelists.org/post/procps/backporting,5
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-02 16:29:03 +11:00
Craig Small
a99002e3fe Merge branch 'master' into nls
Conflicts:
	configure.ac
	pmap.c
	ps/Makefile.am
2011-12-26 09:11:27 +11:00
Craig Small
2983b30523 Renaming libprocfs to libprocps
The library used to be called libprocps but it was renamed to make sure
there was only one. However the formatting of the library SONAME has
changed so there cannot be any confusion.

libprocps makes it clear that its a library from this project and not a
set of functions directly on the filesystem.
2011-12-23 09:18:43 +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
0022b6ec5d nls: improve translations and provide translator help comments
Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Sami Kerola
c862a4caa5 nls: add functions which take translations to be used
Add the following three functions to most of the commands.

setlocale (LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);

Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:53 +01:00
Sami Kerola
305b36e5b1 build-sys: remove non-existing files from Makefile.am
The f23390043bece9f2d4870e5b3a187896e2c7d23f removed few files,
which still exist in Makefile.am making `make dist' to fail. This
patch fixes the isue.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:51 +01:00
Sami Kerola
9057b18a32 libproc-ng & ps: fix warning reported by smatch
proc/ksym.c +279 read_file(54) info: redundant null check on buf calling free()
proc/ksym.c +330 parse_ksyms(41) info: redundant null check on ksyms_data calling free()
proc/ksym.c +332 parse_ksyms(43) info: redundant null check on ksyms_index calling free()
proc/ksym.c +451 sysmap_mmap(110) info: redundant null check on sysmap_index calling free()
proc/procps.h:74:5: warning: undefined preprocessor identifier 'SHARED'
proc/slab.c +145 parse_slabinfo20(24) error: potential null derefence 'prev'.
proc/slab.c +222 parse_slabinfo11(21) error: potential null derefence 'prev'.
ps/stacktrace.c +131 debug(6) error: snprintf() is printing too much 99 vs 16

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:50 +01:00
Sami Kerola
c1fa3bfce8 misc: compiler warning fixes
Fix few compiler warnings. Some of these warnings appeared multiple
times, and the listing bellow is more about which sort of errors
where fixed.

devname.c:87:12: warning: comparison of integers of different signs: 'int' and 'unsigned long'
output.c:389:36: warning: passing 'char **const' to parameter of type 'const char *const restrict *' discards qualifiers in nested pointer types
output.c:611:31: warning: comparison of integers of different signs: 'const unsigned long' and 'int'
stacktrace.c:33:37: warning: unused parameter 'signum'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:50 +01:00
Sami Kerola
4bd36d1483 ps: add gettext support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:45 +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
2865ded64e Removed xalloc type functions from library
These xalloc functions are a private function for the library. If using
programs need them, then they should make their own error reporting or
use a common file.
2011-12-20 22:56:17 +11: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
Jessica McKellar
9ecd3c8414 ps: add sorting to %mem for ps
A patch from Debian.

Bug-Debian: http://bugs.debian.org/599043
Backported-by: Sami Kerola <kerolasa@iki.fi>
2011-12-18 22:48:38 +11:00
Alfredo Esteban
daf4014205 ps: --sort does not work with time argument
A patch from Debian.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508435
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508435
Backported-by: Sami Kerola <kerolasa@iki.fi>
2011-12-18 22:29:12 +11:00
unknown
fe82a3246a ps: add build option to disable ps option warning
Slackware seems to have this patch, while it is not in use(?) Well,
the upstream procps-ng allows one to disable warnings if that is
wanted. After all having this sort of 'feature' does not cost much,
while lacking it might annoy someone.

A patch from Slackware.

Reference: http://www.ftp.be/packages/slackware/slackware_source/a/procps/procps.nowarning.diff.gz
Backported-by: Sami Kerola <kerolasa@iki.fi>

Conflicts:

	proc/ksym.c
2011-12-18 10:53:44 +11:00
Craig Small
38763ede40 Rename library and use proper versioning
Previously the version of libproc always tracked the version of procps.
This doesn't work when other non-procps programs link to the library as
they are always playing catch up.

This change makes the library version independent of the procps version.
It will only be incremented when needed.
2011-12-17 22:35:05 +11:00
Jim Warner
229be7b160 ps: exploit enhanced library memory allocation provisions
There were numerous ps memory allocation inconsistencies.
Some were checked for failure and others were not.

The program was modified to utilize the library memory
rouines which are consistent in dealing with errors.

(a few changes simply removed trailing whitespace)
2011-12-11 22:29:25 +11:00
Jim Warner
ba13a76422 redhat analysis: ps/sortformat 2011-10-15 08:26:28 +02:00
Jim Warner
0e663aacbc redhat analysis: ps/display 2011-10-15 08:26:28 +02:00
Jim Warner
6317f8e685 redhat analysis: ps/parser 2011-10-15 08:26:27 +02:00
Craig Small
b9a408372e Merge branch 'master', remote-tracking branch 'sami/ng' 2011-10-01 23:23:30 +10:00
Jim Warner
b7638e7ae9 build-sys: rename libproc to libprog-ng
The library file version string is taken from configure.ac AC_INIT.

Reference: http://www.freelists.org/archive/procps/09-2011

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Craig Small <csmall-procps@enc.com.au>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-23 22:07:15 +02: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
bb4f08ba29 refined library i/f and improved performance
Library changes
   readproc
    . added readeither to more efficiently
      fill both process and thread proc_t
    . added readproctab3, uses readeither
    . included task path support in:
        fill_cgroup_cvt, fill_cmdline_cvt,
        read_unvectored
    . QUICK_THREADS #define allows copying
      process info vs. repeatedly reading
    . simple_nexttid no longer values ppid
    . path var made non-static in readtask
    . documented 'proc_data_t' in .h file
    . tweaked some c comments & formatting
   library.map
    . added new readeither, readproctab3
 Program changes
   ps
    . exploits readproctab3 where possible
    . improved args/comm compliance
   top
    . exploits readeither
2011-08-11 07:42:14 +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
Sami Kerola
06d491f9e4 build-sys: take autotools in use again
This will revert change at Oct 2002 when autotools support was
removed.

Unlike before the package developers are expected to use
./autogen.sh to generate ./configure script, and run make after
that. The build system is also able to create, with make dist, a
tar ball release which compiles correctly, and has files which
seemed to be important to have.

The patch removes few unnecessary files, but no everything. Files
procps.lsm and procps.spec in git repository are useless as is,
but I left them lying around for someone who can make more
justified call about removal of them.

Last, but not least package version number is set 3.3.0 to
distinct this procps from the sourceforge's upstream procps.
Please notice that libproc relese is kept as 3.2.8.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-04 17:22:44 +02:00
Jim Warner
7b0fc19e9d enhanced libproc cgroup/cmdline support, exploited by top
Library Changes
. added PROC_EDITCMDLCVT flag
. added an internal (static) fill_cmdline_cvt function:
  - reads and "escapes" /proc/#/cmdline
  - returns result as a single string in a single vector
  - callers are guaranteed a cmdline (no more NULL)
. added vectorize_this_str function, exploited by
  fill_cgroup_cvt, fill_cmdline_cvt
. generalized read_cmdline function as read_unvectored, now
  exploited by fill_cgroup_cvt, fill_cmdline_cvt, read_cmdline
  ( cgroup and cmdline no longer need be converted to string )
  ( vectors before being transformed to final representation )
. fixed bug regarding skipped group numbers (when enabled)
. escape_str made responsible for all single byte translation
  with distinction between control chars + other unprintable
. added escaped_copy function for already escaped strings
. reorganized parts of proc_t to restore formatting standards
  ( displacement changes shouldn't matter with new version # )
. former ZAP_SUSEONLY #define now OOMEM_ENABLE
. added to library.map: escaped_copy; read_cmdline

Top Program Changes
. exploited the new PROC_EDITCMDLCVT provision
. eliminated now obsolete #include "proc/escape.h"
. changed the P_WCH display format if no kernel symbol table
. fixed very old bug in lflgs for out-of-view sort fields
. former ZAP_SUSEONLY #define now OOMEM_ENABLE

Ps Program Changes
. exploited the new PROC_EDITCMDLCVT provision
. exploited the new escaped_copy function
. consolidated pr_args and pr_comm into pr_argcom

Signed-off-by: Jan Görig <jgorig@redhat.com>
2011-05-18 10:33:44 +02:00
Jan Görig
8621387c77 Updated ps to use new cgroup interface 2011-05-05 12:20:30 +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
887c1b95c5 Removed .cvsignore files 2011-02-10 13:40:29 +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
59679bc2a2 Rewritten cgroup support and suppressed root cgroup
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=593267
Signed-off-by: Jan Görig <jgorig@redhat.com>
2011-02-10 13:40:29 +01:00
Jan Görig
4d3c19af52 Read the system boot time from /proc instead of computing
Read the time of system boot from /proc/stat (entry: btime) instead
of computing it as the difference between the current time and the
uptime. This is the only way to get a consistent result which won't
possibly change from one run to the next.

The problems with the original code were:
* Both the current time and the uptime are rounded down to the second,
  but the system doesn't boot on an integer second value so they do not
  tick at the same moment. Thus, the rounding errors can cause a one
  second difference from one run to the next.
* We can't read the uptime and the current time at the exact same moment
  anyway, so the time difference we compute is bound to be inaccurate.
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=222251
Author: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Craig Small <csmall@debian.org>
2010-12-16 10:30:39 +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
b0210803bf update /dev/tty* info to May 2009 devices.txt 2009-05-03 06:39:33 +00:00
albert
7dd414ac1b new /proc/meminfo fields 2008-03-24 04:41:26 +00:00
albert
94b2a2e910 SCHED_* stuff up to #9 2007-05-05 18:42:16 +00: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
albert
5b13bb93c7 new foreign-OS research noted 2006-06-18 20:55:02 +00:00
albert
20fba946af SCHED_BATCH 2006-01-22 08:00:03 +00:00
albert
3ced977cf2 turn off new SE Linux code for now 2005-10-30 03:44:26 +00:00
albert
f642672fcc spelling fixes #334684 2005-10-30 03:02:48 +00:00
albert
ca1a277318 man page more detailed #334682 2005-10-30 02:52:46 +00:00
albert
8df9f2ee02 SE Linux alias translation code (broken) 2005-10-30 02:45:45 +00:00
albert
f7603be903 oops, IRIX personality fix 2005-10-30 00:27:45 +00:00
albert
b2ca4a892a IRIX personality PRI 2005-10-30 00:26:34 +00:00
albert
7767733812 dietlibc needs termios.h for struct winsize -- thanks Thomas Ogrisegg 2005-10-30 00:04:21 +00:00
albert
f9d99085e7 crazy Debian GNU/kFreeBSD guy wanted this 2005-01-27 04:08:10 +00:00
albert
37b9b9a235 valgrind freaked out on some weird old code 2005-01-24 03:37:41 +00:00
albert
31fca6bb2d fix built-in test code 2005-01-10 21:32:49 +00:00
albert
8b29cc8a5d fix wchan alignment problem -- snprintf can return more than written 2005-01-10 21:29:53 +00:00
albert
39b6574fb3 add comment about an ugly hack 2005-01-06 00:17:59 +00:00
albert
95cc4c37bb variable-width %CPU,PPID,PID 2005-01-06 00:13:12 +00:00
albert
55aee6a969 SIGTSTP not a bug 2005-01-05 20:34:51 +00:00
albert
2e78a17eda security labels can contain any printable ASCII 2005-01-05 20:09:03 +00:00
albert
dfd72b363c use .opt macro all over 2004-12-02 17:53:33 +00:00
albert
f2dab95a92 not being unnessisarily cruel to non-roff parsers, move macros out of .SH NAME area 2004-12-02 17:37:58 +00:00
albert
c961f2604a leftovers in the 3.2.4 release 2004-11-04 20:50:59 +00:00
albert
6c949eddbe SubDomain Linux Security Module needs ^ and / characters -- Steve Beattie 2004-10-20 03:34:23 +00:00
albert
6ec1cff342 ps: built-in test code, etc. 2004-10-12 00:12:25 +00:00
albert
0586dc8b6d fix warnings; put CFLAGS on lib link command 2004-09-23 13:41:33 +00:00
albert
59fc9dd711 %cpu and other changes 2004-09-12 15:43:48 +00:00
albert
af2077f22d new /proc/vmstat fields 2004-08-27 14:23:36 +00:00
albert
4acae28535 misc 2004-08-18 02:22:13 +00:00
albert
ef0b63de31 string.h and maybe a release 2004-08-10 04:30:27 +00:00