Commit Graph

728 Commits

Author SHA1 Message Date
Sami Kerola
d13fbc34a7 free: great modernization
Support long options, use program_invocation_short_name, print
version up on request, new giga & tera byte sizes switches, exit
when numeric arguments has garbage... and for rest see the diff.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-28 10:10:02 +02:00
Jan Görig
2a2fa20656 Fixed initialization and thread problems in top - changed by Jim 2011-04-18 16:06:54 +02:00
Werner Fink
aac0de8994 Initialize smp_num_cpus only if really required
Initialize smp_num_cpus only if really required

Signed-off-by: Werner Fink <werner@suse.de>
2011-04-15 15:53:20 +02:00
Werner Fink
e646984924 Add missed oom support to libproc
Add missed oom support to libproc
Signed-off-by: Werner Fink <werner@suse.de>
2011-04-15 15:52:40 +02:00
Craig Small
3ec6a27e8a cgroup support. rcfile errors default to fatal
This source patch addresses the following:
 Conceivable Buglets Avoided
  . added sanity checks for previous assumptions re: pid size, num cpus
  . changed response for rcfile errors to fatal, vs. silent default
 Enhancements
  . reorganized WIN_t struct for reduced padding and better readability
  . generalized code for multiple var-width cols (divorced from pflags)
  . absorbed jan gorig's cgroup patch, with attribution
 Cosmetic
  . reduced numerous #ifdef directives, especially in calibrate_fields
2011-04-15 09:24:29 +10:00
Craig Small
9bbaa0b3d2 several bug fixes, enhancements and formatting
The documentation portion of the patch addresses the following:
  README.top
    . corrected a minor typo
    . updated to reflect current patch level
  top.1
    . fixed potentially misinterpreted Me/ME strings
    . added '.Bd -literal' directives for indented fixed-width font
    . some comments changed from \# to .\" to avoid man2html problems

The source portion of the patch addresses the following:
  Buglets
    . header/task output length now consistent
    . fixed 2 obscure horizontal scrolling bugs
    . fixed potential bug regarding 'help' and 'current' window
    . messages and prompts are now also sensitive to terminal width
    . normalized buffer names/sizes now accommodate any SCREENMAX changes
  Features
    . made %CPU and 'i' mode handling more efficient
    . for input the Up/Dn arrows keys act as alternatives to Ins/Del keys
   . an optional USE_X_COLHDR define eliminates ALL 'x' toggle overhead
    . an optional ZAP_SUSEONLY define was added for Werner's modifications
  Cosmetic
    . defines and format for optional end-of-job reports standardized
2011-04-14 07:08:14 +10:00
Craig Small
fd62123562 New version of top from Jim 2011-03-31 22:15:12 +11:00
Jan Görig
ee5fd1dce1 top.1 manual page fixes
Changes from Debian and fixed escaping errors.

Author: Craig Small <csmall@debian.org>
2011-02-24 15:06:13 +01: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
039e2bb7df Manual pages fixes
Taken from Debian with small changes added

Authors: Craig Small <csmall@debian.org>, Brendan O'Dea <bod@debian.org>
2011-02-23 09:17:54 +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
8fde4af11d Call libproc constructors in strict order
Having one constructor depend on another means if the order
is reversed you get a different result.
Patched based on idea by Tom Evans.

Added new code to old_Hertz_hack by Werner Fink <werner@suse.de>

Bug-Debian: http://bugs.debian.org/460331
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=632236
Reviewed-by: Jan Görig <jgorig@redhat.com>
2011-01-19 12:50:26 +01:00
Werner Fink
4736dad559 Do not let sysctl abort due a missed file or directory under /proc.
Include signal.h for compiling w.

Signed-off-by: Werner Fink <werner@suse.de>
2011-01-19 12:26:01 +01:00
Werner Fink
9564bfc6f0 Fix potential bufferoverflow in pwdx
Fix potential bufferoverflow in pwdx
 Novell bugzilla entry 78074

Signed-off-by: Werner Fink <werner@suse.de>
2011-01-18 16:15:15 +01:00
Jan Görig
94866c88bf Fixed build with make 3.82
Bug-Debian: http://bugs.debian.org/603759
Signed-off-by: Jan Görig <jgorig@redhat.com>
2011-01-18 16:10:32 +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
9e6370a886 clear screen after fields selection
Author: Tomas Smetana <tsmetana@redhat.com>
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=440694
2010-12-16 10:25:36 +01:00
Jan Görig
356a1f9a37 fix the problem with truncated output lines to 2048 characters
Author: Karel Zak <kzak@redhat.com> and Olivier Fourdan <ofourdan@redhat.com>
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=134516
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=487700
2010-12-16 10:24:44 +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
Jan Görig
0232430bef Fix highlighting problem in top
Author: Paolo Pantaleo <paolopantaleo@gmail.com>
Bug-Debian: http://bugs.debian.org/351065
2010-12-16 10:21:47 +01:00
Jan Görig
8f466aa21d Headers for disk and slab info and getopt replacement
Author: Liu Xing <liuxing@cn.fujitsu.com>
Author: Michael Tokarev <mjt@corpit.ru>
Bug-Debian: http://bugs.debian.org/436805
Bug-Debian: http://bugs.debian.org/408088
2010-12-16 10:19:14 +01:00
Jan Görig
63b6a8fcbf Make w make better guesses for user process
Based on suggestion by Herbert Xu <herbert@gondor.apana.org.au>
Bug-Debian: http://bugs.debian.org/187808
Author: Craig Small <csmall@debian.org>
2010-12-16 10:15:35 +01:00
albert
5f570a84f1 per-process swap info available on Linux 2.6.34 2010-05-18 07:02:03 +00:00
albert
93fd4a460e not ppc64 2009-12-10 11:37:48 +00:00
albert
6154f23d5a src==dst is illegal, failing on ppc64 2009-12-09 09:28:22 +00:00
albert
b0210803bf update /dev/tty* info to May 2009 devices.txt 2009-05-03 06:39:33 +00:00
albert
fcc376b861 note UNIX standard self-conflict 2008-03-24 05:57:28 +00:00
albert
7dd414ac1b new /proc/meminfo fields 2008-03-24 04:41:26 +00:00
albert
c0f3df30ca watch: tolerate umlauts 2007-05-28 03:18:52 +00:00
albert
7ed102fd76 sysctl: fix crash -- thanks Steinar Gunderson #423704 2007-05-28 01:59:28 +00:00
albert
805d426d07 vmstat: use EXIT_FAILURE -- thanks Yoshio Nakamura #425492 2007-05-28 00:20:13 +00:00
albert
e5b2b8614d pgrep: usage error should exit with 2 2007-05-28 00:16:39 +00:00
albert
8e4bf3e115 top: normal exit code should be 0 2007-05-27 23:56:49 +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
a7f684e5b3 threadsafe-statics 2006-10-30 03:57:57 +00:00
albert
9049ffef32 ps man page 2006-09-10 06:25:56 +00:00
albert
0231385023 fix the low_density_names table, maybe 2006-07-09 06:58:39 +00:00
albert
86de01f3d0 Linux 2.6.17 tty devices. Lose support for original pty numbering. 2006-07-09 04:41:30 +00:00
albert
9278134e49 top: show CPU time stolen from a virtual machine 2006-06-25 02:15:36 +00:00
albert
1e73c7b8bc bit of top hacking 2006-06-25 01:14:24 +00:00
albert
a791f8034f sysctl: use - for stdin 2006-06-24 21:17:51 +00:00
albert
47d33e7ed4 g is criteria 2006-06-24 20:12:29 +00:00
albert
b4b97c71bf use ln_f, and update to version 3.2.7 2006-06-24 04:34:55 +00:00
albert
7e2f073fbd better -L support 2006-06-23 03:18:12 +00:00
albert
6baa2fd34e FreeBSD -F and -L options (but -L may be useless) with sucky error messages 2006-06-21 05:45:16 +00:00
albert
93ed75edc9 correct description of some currently-foreign options 2006-06-21 04:41:58 +00:00
albert
492acac001 pgrep cleanup 2006-06-21 04:18:02 +00:00