]> granicus.if.org Git - procps-ng/commitdiff
mention -a
authoralbert <>
Wed, 9 Oct 2002 04:28:48 +0000 (04:28 +0000)
committeralbert <>
Wed, 9 Oct 2002 04:28:48 +0000 (04:28 +0000)
oldtop.c
pgrep.c
proc/readproc.c
proc/readproc.h
top.c
vmstat.8
w.c

index 5593d671dead35f2a5cc253190123379cc7a6ca1..b9d8701a91520e98a2c8f3ef34031a7130a50cca 100644 (file)
--- a/oldtop.c
+++ b/oldtop.c
@@ -1186,7 +1186,7 @@ static void show_procs(void)
     static int first=0;
 
     if (first==0) {
-       proc_flags=PROC_FILLMEM|PROC_FILLCMD|PROC_FILLUSR|PROC_FILLSTATUS|PROC_FILLSTAT;
+       proc_flags=PROC_FILLMEM|PROC_FILLCOM|PROC_FILLUSR|PROC_FILLSTATUS|PROC_FILLSTAT;
        if (monpids_index)
            proc_flags |= PROC_PID;
        p_table=readproctab2(proc_flags, p_table, monpids);
diff --git a/pgrep.c b/pgrep.c
index 61cd6d4bc57cc38d3a51f661dbe7fe9bf0eedb62..9b3ad2f8022f1986f341085f1d36861847b031ae 100644 (file)
--- a/pgrep.c
+++ b/pgrep.c
@@ -409,7 +409,7 @@ do_openproc (void)
        int flags = PROC_FILLANY;
 
        if (opt_pattern || opt_full)
-               flags |= PROC_FILLCMD;
+               flags |= PROC_FILLCOM;
        if (opt_uid)
                flags |= PROC_FILLSTATUS;
        if (opt_euid && !opt_negate) {
index 353107256a696844f8f96f6fa782603b255e47bd..be7b8b24a424736eb7a34482a2b699e5161ffbd8 100644 (file)
@@ -394,17 +394,17 @@ next_proc:                                /* get next PID for consideration */
         }
     }
 
-    if (Do(FILLCMD))                           /* read+parse /proc/#/cmdline */
+    if (Do(FILLCOM) || Do(FILLARG))    /* read+parse /proc/#/cmdline */
        p->cmdline = file2strvec(path, "cmdline");
     else
         p->cmdline = NULL;
 
-    if (Do(FILLENV))                           /* read+parse /proc/#/environ */
+    if (Do(FILLENV))                   /* read+parse /proc/#/environ */
        p->environ = file2strvec(path, "environ");
     else
         p->environ = NULL;
     
-    if (p->state == 'Z')                       /* fixup cmd for zombies */
+    if (p->state == 'Z')               /* fixup cmd for zombies */
        strncat(p->cmd," <defunct>", sizeof p->cmd);
 
     return p;
@@ -494,7 +494,7 @@ next_proc:                          /* get next PID for consideration */
 /*        }*/
     }
 
-    if (Do(FILLCMD))                           /* read+parse /proc/#/cmdline */
+    if (Do(FILLCOM) || Do(FILLARG))    /* read+parse /proc/#/cmdline */
        p->cmdline = file2strvec(path, "cmdline");
     else
         p->cmdline = NULL;
@@ -504,7 +504,7 @@ next_proc:                          /* get next PID for consideration */
     else
         p->environ = NULL;
     
-    if (p->state == 'Z')                       /* fixup cmd for zombies */
+    if (p->state == 'Z')               /* fixup cmd for zombies */
        strncat(p->cmd," <defunct>", sizeof p->cmd);
 
     return p;
index 2cc3cb8a663fbbef3dbec4bdbe99dbe502b2f74a..383e3367457644b94ec487188d62c2615424ceda 100644 (file)
@@ -192,21 +192,22 @@ extern void freeproc(proc_t* p);
  * argument is the length of the list (currently only used for lists of user
  * id's since unsigned short[] supports no convenient termination sentinel.)
  */
+#define PROC_FILLMEM    0x001 /* read statm */
+#define PROC_FILLENV    0x002 /* alloc and fill in `environ' */
+#define PROC_FILLUSR    0x004 /* resolve user id number -> user name */
+#define PROC_FILLGRP    0x008 /* resolve group id number -> group name */
+#define PROC_FILLSTATUS 0x010 /* read status -- currently unconditional */
+#define PROC_FILLSTAT   0x020 /* read stat -- currently unconditional */
+#define PROC_FILLWCHAN  0x040 /* look up WCHAN name */
+#define PROC_FILLCOM    0x080 /* alloc and fill in `cmdline' */
+#define PROC_FILLARG    0x100 /* alloc and fill in `cmdline' */
+
+#define PROC_FILLBUG    ~0    /* No idea what we need */
 #define PROC_FILLANY    0x00 /* either stat or status will do */
-#define PROC_FILLMEM    0x01 /* read statm into the appropriate proc_t entries */
-#define PROC_FILLCMD    0x02 /* alloc and fill in `cmdline' part of proc_t */
-#define PROC_FILLENV    0x04 /* alloc and fill in `environ' part of proc_t */
-#define PROC_FILLUSR    0x08 /* resolve user id number -> user name */
-#define PROC_FILLGRP    0x10 /* resolve group id number -> group name */
-#define PROC_FILLSTATUS 0x20
-#define PROC_FILLSTAT   0x40
-#define PROC_FILLWCHAN  0x80
-#define PROC_FILLBUG    0xff    /* No idea what we need */
-
 
 /* Obsolete, consider only processes with one of the passed: */
-#define PROC_PID     0x0100  /* process id numbers ( 0   terminated) */
-#define PROC_TTY     0x0200  /* ctty device nos.   ( 0   terminated) */
-#define PROC_UID     0x0400  /* user id numbers    ( length needed ) */
+#define PROC_PID     0x1000  /* process id numbers ( 0   terminated) */
+#define PROC_TTY     0x2000  /* ctty device nos.   ( 0   terminated) */
+#define PROC_UID     0x4000  /* user id numbers    ( length needed ) */
 
 #endif
diff --git a/top.c b/top.c
index 797b0418a1c549e4b351a16a94d8e1ffd90ea9b9..737bcdc6c205f80db51352e7d3d9fe00fd18bae9 100644 (file)
--- a/top.c
+++ b/top.c
@@ -857,7 +857,7 @@ static proc_t **refreshprocs (proc_t **tbl)
 {
 #define PTRsz  sizeof(proc_t *)         /* eyeball candy */
 #define ENTsz  sizeof(proc_t)
-   static int flags = PROC_FILLMEM | PROC_FILLCMD | PROC_FILLUSR
+   static int flags = PROC_FILLMEM | PROC_FILLCOM | PROC_FILLUSR
                     | PROC_FILLGRP | PROC_FILLSTATUS | PROC_FILLSTAT;
    static unsigned savmax = 0;          /* first time, Bypass: (i)  */
    proc_t *ptsk = (proc_t *)-1;         /* first time, Force: (ii)  */
index 84dcf10067b75d354667a431aa904c843cd4ab1e..d44ec6ce62baa2d0ab762fa669d4f8f38419c27d 100644 (file)
--- a/vmstat.8
+++ b/vmstat.8
@@ -6,10 +6,12 @@ vmstat \- Report virtual memory statistics
 .SH SYNOPSIS
 .ft B
 .B vmstat
+.RB [ "\-a" ]
 .RB [ "\-n" ]
 .RI [ delay " [ " count ]]
 .br
-.BR vmstat [ "\-V" ]
+.B vmstat
+.RB [ "\-V" ]
 .SH DESCRIPTION
 \fBvmstat\fP reports information about processes, memory, paging,
 block IO, traps, and cpu activity.
@@ -19,7 +21,9 @@ reports give information on a sampling period of length \fIdelay\fP.
 The process and memory reports are instantaneous in either case.
 
 .SS Options
-The \fB-n\fP switch  causes the header to be displayed only once rather than periodically.
+The \fB-a\fP switch displays active/inactive memory, given a 2.5.41 kernel or better.
+.PP
+The \fB-n\fP switch causes the header to be displayed only once rather than periodically.
 .PP
 .I delay
 is the delay between updates in seconds.  If no delay is specified,
diff --git a/w.c b/w.c
index dfb7ee3bccb3bd5733e14a074084f48dd471beca..279de5fee9b17a406b0fb5cf61bad190f411f9c2 100644 (file)
--- a/w.c
+++ b/w.c
@@ -271,7 +271,7 @@ int main(int argc, char **argv) {
     if (maxcmd < 3)
        fprintf(stderr, "warning: screen width %d suboptimal.\n", win.ws_col);
 
-    procs = readproctab(PROC_FILLCMD | PROC_FILLUSR);
+    procs = readproctab(PROC_FILLCOM | PROC_FILLUSR);
 
     if (header) {                              /* print uptime and headers */
        print_uptime();