1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- diff -up procps-3.2.7/top.c.p14 procps-3.2.7/top.c
- --- procps-3.2.7/top.c.p14 2008-09-01 11:36:55.000000000 +0200
- +++ procps-3.2.7/top.c 2008-09-01 11:36:55.000000000 +0200
- @@ -120,6 +120,8 @@ static int No_ksyms = -1, // set t
- Loops = -1, // number of iterations, -1 loops forever
- Secure_mode = 0; // set if some functionality restricted
-
- +static int VIRT_vmsize = 0; //use vm_size for VIRT
- +
- /* Some cap's stuff to reduce runtime calls --
- to accomodate 'Batch' mode, they begin life as empty strings */
- static char Cap_clr_eol [CAPBUFSIZ],
- @@ -1674,6 +1676,9 @@ static void before (char *me)
- Fieldstab[P_PPD].fmts = pid_fmt;
- Fieldstab[P_PPD].head = " PPID" + 10 - pid_digits;
- }
- +
- + if (( getenv("STATSIZE")) && ( atoi(getenv("STATSIZE")) == 1 ))
- + VIRT_vmsize = 1;
- }
-
-
- @@ -2207,6 +2212,7 @@ static void reframewins (void)
- }
- if (!Frames_libflags) Frames_libflags = L_DEFAULT;
- if (selection_type=='p') Frames_libflags |= PROC_PID;
- + if (VIRT_vmsize) Frames_libflags |= L_status;
- }
-
-
- @@ -3186,7 +3192,10 @@ static void task_show (const WIN_t *q, c
- MKCOL(p->ruser);
- break;
- case P_VRT:
- - MKCOL(scale_num(PAGES_TO_KB(p->size), w, s));
- + if (VIRT_vmsize)
- + MKCOL(scale_num(PAGES_TO_KB(p->vm_size), w, s));
- + else
- + MKCOL(scale_num(PAGES_TO_KB(p->size), w, s));
- break;
- case P_WCH:
- if (No_ksyms) {
- diff -up procps-3.2.7/top.1.p14 procps-3.2.7/top.1
- --- procps-3.2.7/top.1.p14 2006-06-19 06:33:51.000000000 +0200
- +++ procps-3.2.7/top.1 2008-09-01 11:36:55.000000000 +0200
- @@ -401,7 +401,8 @@ A task's currently used share of availab
- o:\fB VIRT\fR \*(EM Virtual Image (kb)
- The total amount of \*(MV used by the task.
- It includes all code, data and shared libraries plus pages that have been
- -swapped out.
- +swapped out. (Note: you can define the STATSIZE=1 environment variable and the VIRT
- +will be calculated from the /proc/#/state VmSize field.)
-
- VIRT = SWAP + RES.
-
|