Commit Graph

64 Commits

Author SHA1 Message Date
Jan Görig
f43de0df19 Added 'vm_swap' variable nullifying.
Thanks to KOSAKI Motohiro.

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=532668
2011-06-02 12:22:31 +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
Jim Warner
57031319d6 cgroup support migrated to libproc, plus miscellaneous re-formatting
This source patchset addresses the following:
Library Extension (readproc)
 . added PROC_EDITCGRPCVT flag
 . added an internal (static) fill_cgroup_cvt function:
   . reads AND parses /proc/#/cgroup
   . returns result as a single string in a single vector
   . thus no changes to proc_t structure or free memory logic
Program Enhancements (top)
 . removed parse_cgroup logic in favor of libproc
 . eliminated cgroup sort recurring overhead
 . converted WCHAN field to variable width
 . generalized variable width field logic in task_show
 . real-time notation under P col more distinctive as 'rt'
Program Cosmetic (top)
 . CGROUP now known as CGROUPS (plural)
 . moved jan's attribution from top.c to 'Notes' in top.h
 . numerous comments tweaked
Document Enhancements (top)
 . documented CGROUPS field (required renumbering all fields)
 . adapted narratives for the 3 current variable width fields
 . expanded real-time scheduling notes, 'RT' now shown as 'rt'

Signed-off-by: Jan Görig <jgorig@redhat.com>
2011-05-05 12:12:27 +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
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
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
albert
5f570a84f1 per-process swap info available on Linux 2.6.34 2010-05-18 07:02:03 +00:00
albert
5c591b836f fix "ps sm" bug involving 1-thread-proc optimization 2006-06-17 04:14:57 +00:00
albert
6a304370f8 ps: fix crash related to realloc -- thanks David Houlder 2005-09-12 03:25:01 +00:00
albert
37b9b9a235 valgrind freaked out on some weird old code 2005-01-24 03:37:41 +00:00
albert
c961f2604a leftovers in the 3.2.4 release 2004-11-04 20:50:59 +00:00
albert
266d5b708a wchan for multithreaded process is now ~0ull or "*" 2004-07-21 21:17:35 +00:00
albert
f1db79c042 better handling of long usernames 2004-07-20 23:31:12 +00:00
albert
3f603adbae remove some table inconsistencies and rename it_real_value 2004-04-17 03:13:56 +00:00
albert
d526282deb nswap data dead since 2.4.xx kernels 2004-04-13 03:56:52 +00:00
albert
1e1218cca8 pmap stack detection 2004-01-26 20:01:56 +00:00
albert
c36c11c6b2 NSA SELinux for Linux 2.6.xx 2003-12-24 04:18:24 +00:00
albert
7046b34f42 thread-related hacks 2003-12-13 16:51:40 +00:00
albert
e583724fff H m -m -L -T are all working 2003-10-21 00:51:36 +00:00
albert
7dfe80961a sorted threads might work 2003-10-19 23:37:47 +00:00
albert
e180e4875f more goodies 2003-10-16 03:30:41 +00:00
albert
71312f1516 more per-process stuff 2003-09-29 04:09:52 +00:00
albert
ac6260bc23 hard disk about to die 2003-09-28 02:45:05 +00:00
albert
c462dcfad5 ps thread support 2003-09-20 08:29:55 +00:00
albert
4456afd68a EVIL_GROUPING_HACK 2003-09-18 02:18:43 +00:00
albert
8b04273f89 EVIL_PROC_HACK 2003-09-17 21:58:32 +00:00
albert
0db94e6a1a GPLONLY_ and PID-related stuff 2003-07-03 05:20:19 +00:00
albert
1dc1b63d34 man page stuff 2003-06-30 03:30:35 +00:00
albert
331b547426 message: mount -t proc none /proc 2003-05-31 15:18:13 +00:00
albert
044e7004c4 label-to-label offset exceeds 2 GB ??? 2003-05-30 03:13:32 +00:00
albert
cc5c6955be warning directs users to the FAQ 2003-02-18 03:51:03 +00:00
albert
4a54e25aca 2.5.61 2003-02-17 00:57:15 +00:00
albert
f082411c7d misc 2003-02-12 08:15:53 +00:00
albert
ebc5354699 KLONG 2003-01-16 08:03:40 +00:00
albert
256e1f767c new gcc+ld+gas features 2003-01-15 10:52:39 +00:00
albert
33a8de391e read_cmdline should close files -- thanks Jim 2002-12-28 09:37:42 +00:00
albert
aef6890de1 allocate mem 1st 2002-12-21 11:27:47 +00:00
albert
d8367cbb3e still sig11 w/ "ps f" 2002-12-21 10:34:50 +00:00
albert
1158fdd1b1 checkpoint 2002-12-21 06:22:00 +00:00
albert
3e67b58ec2 satisfy GPL section 2a and LGPL section 2b name+date requirement 2002-12-15 00:30:17 +00:00
albert
5087f3dbf6 big header clean-up 2002-12-09 07:00:07 +00:00
albert
4382008ad0 likely to help 2002-12-08 23:53:05 +00:00
albert
ab8b5f314d enable PROC_FILLSTAT 2002-12-08 18:51:56 +00:00
albert
041bf4ebba stop chopping cmd off short 2002-12-07 08:34:03 +00:00
albert
d42a6ee787 likely mistake 2002-12-04 04:04:19 +00:00
albert
029864fe4f fix warnings 2002-12-03 09:18:27 +00:00
albert
7ac9a0e1f5 present for Jim 2002-12-03 09:07:59 +00:00
albert
bd1a19b577 c99 2002-11-25 10:16:33 +00:00
albert
dc792e9d58 remove Rik library support 2002-10-22 18:12:27 +00:00