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
This commit is contained in:
Craig Small
2011-08-01 21:28:46 +10:00
parent 3f59ff5a16
commit 3ef4823f90
11 changed files with 306 additions and 217 deletions

46
top.1
View File

@@ -435,7 +435,7 @@ Many different hierarchies of cgroups can exist simultaneously on a system
and each hierarchy is attached to one or more subsystems.
A subsystem represents a single resource.
\*(NT The 'CGROUPS' field/column, unlike most columns, is not fixed-width.
\*(NT The 'CGROUPS' field, unlike most columns, is not fixed-width.
When displayed, it plus any other variable width columns will be allocated
all remaining screen width (up to the maximum \*(WX characters).
@@ -461,7 +461,7 @@ fit in this field's current width.
That width depends upon other fields selected, their order and the current
screen width.
\*(NT The 'COMMAND' field/column, unlike most columns, is not fixed-width.
\*(NT The 'COMMAND' field, unlike most columns, is not fixed-width.
When displayed, it plus any other variable width columns will be allocated
all remaining screen width (up to the maximum \*(WX characters).
@@ -621,15 +621,35 @@ login shell.
The\fI saved\fR user ID.
.TP 4
27.\fB SUSER \*(Em Saved User Name \fR
27.\fB SUPGIDS \*(Em Supplementary Group IDs \fR
The IDs of any supplementary group(s) established at login or
inherited from a task's parent.
They are displayed in a comma delimited list.
\*(NT The 'SUPGIDS' field, unlike most columns, is not fixed-width.
When displayed, it plus any other variable width columns will be allocated
all remaining screen width (up to the maximum \*(WX characters).
.TP 4
28.\fB SUPGRPS \*(Em Supplementary Group Names \fR
The names of any supplementary group(s) established at login or
inherited from a task's parent.
They are displayed in a comma delimited list.
\*(NT The 'SUPGRPS' field, unlike most columns, is not fixed-width.
When displayed, it plus any other variable width columns will be allocated
all remaining screen width (up to the maximum \*(WX characters).
.TP 4
29.\fB SUSER \*(Em Saved User Name \fR
The\fI saved\fR user name.
.TP 4
28.\fB SWAP \*(Em Swapped Size (kb) \fR
30.\fB SWAP \*(Em Swapped Size (kb) \fR
The non-resident portion of a task's address space.
.TP 4
29.\fB TIME \*(Em \*(PU Time \fR
31.\fB TIME \*(Em \*(PU Time \fR
Total \*(PU time the task has used since it started.
When 'Cumulative mode' is \*O, each process is listed with the \*(Pu
time that it and its dead children have used.
@@ -637,19 +657,19 @@ You toggle 'Cumulative mode' with 'S', which is both a \*(CO and an \*(CI.
\*(XC 'S' \*(CI for additional information regarding this mode.
.TP 4
30.\fB TIME+ \*(Em \*(PU Time, hundredths \fR
32.\fB TIME+ \*(Em \*(PU Time, hundredths \fR
The same as 'TIME', but reflecting more granularity through hundredths
of a second.
.TP 4
31.\fB TPGID \*(Em Tty Process Group Id \fR
33.\fB TPGID \*(Em Tty Process Group Id \fR
The process group ID of the foreground process for the connected tty,
or -1 if a process is not connected to a terminal.
By convention, this value equals the process ID (\*(Xa PID) of the
the process group leader (\*(Xa PGRP).
.TP 4
32.\fB TTY \*(Em Controlling Tty \fR
34.\fB TTY \*(Em Controlling Tty \fR
The name of the controlling terminal.
This is usually the device (serial port, pty, etc.) from which the
process was started, and which it uses for input or output.
@@ -657,21 +677,21 @@ However, a task need not be associated with a terminal, in which case
you'll see '?' displayed.
.TP 4
33.\fB UID \*(Em User Id \fR
35.\fB UID \*(Em User Id \fR
The\fI effective\fR user ID of the task's owner.
.TP 4
34.\fB USER \*(Em User Name \fR
36.\fB USER \*(Em User Name \fR
The\fI effective\fR user name of the task's owner.
.TP 4
35.\fB VIRT \*(Em Virtual Memory Size (kb) \fR
37.\fB VIRT \*(Em Virtual Memory Size (kb) \fR
The total amount of \*(MV used by the task.
It includes all code, data and shared libraries plus pages that have been
swapped out and pages that have been mapped but not used.
.TP 4
36.\fB WCHAN \*(Em Sleeping in Function \fR
38.\fB WCHAN \*(Em Sleeping in Function \fR
Depending on the availability of the kernel link map ('System.map'), this
field will show the name or the address of the kernel function in which the
task is currently sleeping.
@@ -682,7 +702,7 @@ By displaying this field, \*(We's own working set could be increased by over
Should that occur, your only means of reducing that overhead will be to stop
and restart \*(We.
\*(NT The 'WCHAN' field/column, unlike most columns, is not fixed-width.
\*(NT The 'WCHAN' field, unlike most columns, is not fixed-width.
When displayed, it plus any other variable width columns will be allocated
all remaining screen width (up to the maximum \*(WX characters).