rpms/procps/FC-5 procps-3.2.3-slabtop-man.patch, NONE, 1.1 procps-3.2.6-cpu-steal.patch, NONE, 1.1 procps-3.2.6-top-env-cpuloop.patch, NONE, 1.1 procps-3.2.6-top-env-vmsize.patch, NONE, 1.1 procps-3.2.5-top-remcpu.patch, 1.1, 1.2 procps.spec, 1.46, 1.47 procps-3.2.1-top-vmsize-env.patch, 1.2, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Apr 20 22:37:20 UTC 2006
- Previous message (by thread): rpms/kernel/devel patch-2.6.17-rc2-git3.bz2.sign, NONE, 1.1 .cvsignore, 1.410, 1.411 kernel-2.6.spec, 1.2142, 1.2143 sources, 1.352, 1.353 upstream, 1.323, 1.324 patch-2.6.17-rc2-git1.bz2.sign, 1.1, NONE
- Next message (by thread): rpms/avahi/devel avahi-0.6.9-bz189427.patch, NONE, 1.1 avahi.spec, 1.51, 1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: kzak
Update of /cvs/dist/rpms/procps/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv12798
Modified Files:
procps-3.2.5-top-remcpu.patch procps.spec
Added Files:
procps-3.2.3-slabtop-man.patch procps-3.2.6-cpu-steal.patch
procps-3.2.6-top-env-cpuloop.patch
procps-3.2.6-top-env-vmsize.patch
Removed Files:
procps-3.2.1-top-vmsize-env.patch
Log Message:
fc5 update
procps-3.2.3-slabtop-man.patch:
slabtop.1 | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
--- NEW FILE procps-3.2.3-slabtop-man.patch ---
--- procps-3.2.3/slabtop.1.slabman 2006-04-18 13:39:21.000000000 +0200
+++ procps-3.2.3/slabtop.1 2006-04-18 14:05:41.000000000 +0200
@@ -109,14 +109,16 @@
.IR /proc/slabinfo ).
Kernel 2.2 should be supported in the future.
+The slabtop statistic header is tracking how many bytes of slabs are being used
+and it not a measure of physical memory. The 'Slab' field in the /proc/meminfo
+file is tracking information about used slab physical memory.
+
.SH AUTHORS
Written by Chris Rivera and Robert Love.
.BR slabtop (1)
was inspired by Martin Bligh's perl script,
.BR vmtop .
+The procps package is maintained by Albert Cahalan <albert at users.sf.net>.
-The procps package is maintained by Robert Love and was created by Michael
-Johnson.
-
-Send bug reports to <procps-list at redhat.com>.
+Please send bug reports to <procps-feedback at lists.sf.net>.
procps-3.2.6-cpu-steal.patch:
proc/sysinfo.c | 4 ++--
proc/sysinfo.h | 2 +-
top.c | 23 ++++++++++++++++-------
top.h | 7 +++++--
vmstat.8 | 1 +
vmstat.c | 37 +++++++++++++++++++++----------------
6 files changed, 46 insertions(+), 28 deletions(-)
--- NEW FILE procps-3.2.6-cpu-steal.patch ---
CPU steal time is the time during which the virtual cpu had runnable tasks,
but was not scheduled to run itself. In effect, time during which the virtual
cpu was waiting on the physical processor. This is the CPU equivalent of
iowait time.
04/21/2006 -- Karel Zak <kzak at redhat.com>
--- procps-3.2.6/vmstat.8.steal 2006-04-20 23:40:45.000000000 +0200
+++ procps-3.2.6/vmstat.8 2006-04-20 23:46:38.000000000 +0200
@@ -114,6 +114,7 @@
sy: Time spent running kernel code. (system time)
id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
wa: Time spent waiting for IO. Prior to Linux 2.5.41, shown as zero.
+st: Time spent the virtual CPU waiting for physical CPU.
.PP
.SH FIELD DESCRIPTION FOR DISK MODE
--- procps-3.2.6/top.h.steal 2006-04-21 00:02:40.000000000 +0200
+++ procps-3.2.6/top.h 2006-04-21 00:01:47.000000000 +0200
@@ -216,8 +216,8 @@
// calculations. It exists primarily for SMP support but serves
// all environments.
typedef struct CPU_t {
- TIC_t u, n, s, i, w, x, y; // as represented in /proc/stat
- TIC_t u_sav, s_sav, n_sav, i_sav, w_sav, x_sav, y_sav; // in the order of our display
+ TIC_t u, n, s, i, w, x, y, z; // as represented in /proc/stat
+ TIC_t u_sav, s_sav, n_sav, i_sav, w_sav, x_sav, y_sav, z_sav; // in the order of our display
unsigned id; // the CPU ID number
} CPU_t;
@@ -394,6 +394,9 @@
" %#5.1f%% \02user,\03 %#5.1f%% \02system,\03 %#5.1f%% \02nice,\03 %#5.1f%% \02idle,\03 %#5.1f%% \02IO-wait\03\n"
#define STATES_line2x6 "%s\03" \
" %#4.1f%% \02us,\03 %#4.1f%% \02sy,\03 %#4.1f%% \02ni,\03 %#4.1f%% \02id,\03 %#4.1f%% \02wa,\03 %#4.1f%% \02hi,\03 %#4.1f%% \02si\03\n"
+#define STATES_line2x7 "%s\03" \
+ " %#4.1f%% \02us,\03 %#4.1f%% \02sy,\03 %#4.1f%% \02ni,\03 %#4.1f%% \02id,\03 %#4.1f%% \02wa,\03 %#4.1f%% \02hi,\03 %#4.1f%% \02si,\03 %#4.1f%% \02st\03\n"
+
#ifdef CASEUP_SUMMK
#define MEMORY_line1 "Mem: \03" \
" %8uK \02total,\03 %8uK \02used,\03 %8uK \02free,\03 %8uK \02buffers\03\n"
--- procps-3.2.6/top.c.steal 2006-04-20 23:47:27.000000000 +0200
+++ procps-3.2.6/top.c 2006-04-20 23:57:49.000000000 +0200
@@ -940,14 +940,16 @@
if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
- num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
+ num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
&cpus[cpu_max].u,
&cpus[cpu_max].n,
&cpus[cpu_max].s,
&cpus[cpu_max].i,
&cpus[cpu_max].w,
&cpus[cpu_max].x,
- &cpus[cpu_max].y
+ &cpus[cpu_max].y,
+ &cpus[Cpu_tot].z
);
if (num < 4)
std_err("failed /proc/stat read");
@@ -957,9 +959,10 @@
if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
cpus[i].x = 0; // FIXME: can't tell by kernel version number
cpus[i].y = 0; // FIXME: can't tell by kernel version number
- num = sscanf(buf, "cpu%u %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
+ cpus[i].y = 0; // FIXME: can't tell by kernel version number
+ num = sscanf(buf, "cpu%u %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
&cpus[i].id,
- &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y
+ &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
);
if (num < 4) {
Cpu_tot = i;
@@ -987,6 +990,7 @@
cpus[0].w = cpus[1].w;
cpus[0].x = cpus[1].x;
cpus[0].y = cpus[1].y;
+ cpus[0].z = cpus[1].z;
}
return cpus;
@@ -1626,6 +1630,8 @@
States_fmts = STATES_line2x5;
if (linux_version_code >= LINUX_VERSION(2, 6, 0)) // grrr... only some 2.6.0-testX :-(
States_fmts = STATES_line2x6;
+ if (linux_version_code >= LINUX_VERSION(2, 6, 7))
+ States_fmts = STATES_line2x7;
/* get virtual page size -- nearing huge! */
Page_size = getpagesize();
@@ -2897,7 +2903,7 @@
// we'll trim to zero if we get negative time ticks,
// which has happened with some SMP kernels (pre-2.4?)
#define TRIMz(x) ((tz = (SIC_t)(x)) < 0 ? 0 : tz)
- SIC_t u_frme, s_frme, n_frme, i_frme, w_frme, x_frme, y_frme, tot_frme, tz;
+ SIC_t u_frme, s_frme, n_frme, i_frme, w_frme, x_frme, y_frme, z_frme, tot_frme, tz;
float scale;
u_frme = cpu->u - cpu->u_sav;
@@ -2907,7 +2913,8 @@
w_frme = cpu->w - cpu->w_sav;
x_frme = cpu->x - cpu->x_sav;
y_frme = cpu->y - cpu->y_sav;
- tot_frme = u_frme + s_frme + n_frme + i_frme + w_frme + x_frme + y_frme;
+ z_frme = cpu->z - cpu->z_sav;
+ tot_frme = u_frme + s_frme + n_frme + i_frme + w_frme + x_frme + y_frme + z_frme;
if (tot_frme < 1) tot_frme = 1;
scale = 100.0 / (float)tot_frme;
@@ -2924,7 +2931,8 @@
(float)i_frme * scale,
(float)w_frme * scale,
(float)x_frme * scale,
- (float)y_frme * scale
+ (float)y_frme * scale,
+ (float)z_frme * scale
)
);
Msg_row += 1;
@@ -2937,6 +2945,7 @@
cpu->w_sav = cpu->w;
cpu->x_sav = cpu->x;
cpu->y_sav = cpu->y;
+ cpu->z_sav = cpu->z;
#undef TRIMz
}
--- procps-3.2.6/proc/sysinfo.c.steal 2006-04-20 18:22:38.000000000 +0200
+++ procps-3.2.6/proc/sysinfo.c 2006-04-20 18:36:43.000000000 +0200
@@ -361,7 +361,7 @@
/***********************************************************************/
-void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow, jiff *restrict cxxx, jiff *restrict cyyy,
+void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow, jiff *restrict cxxx, jiff *restrict cyyy, jiff *restrict czzz,
unsigned long *restrict pin, unsigned long *restrict pout, unsigned long *restrict s_in, unsigned long *restrict sout,
unsigned *restrict intr, unsigned *restrict ctxt,
unsigned int *restrict running, unsigned int *restrict blocked,
@@ -386,7 +386,7 @@
*cyyy = 0; /* not separated out until the 2.6.0-test4 kernel */
b = strstr(buff, "cpu ");
- if(b) sscanf(b, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", cuse, cice, csys, cide, ciow, cxxx, cyyy);
+ if(b) sscanf(b, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", cuse, cice, csys, cide, ciow, cxxx, cyyy, czzz);
b = strstr(buff, "page ");
if(b) sscanf(b, "page %lu %lu", pin, pout);
--- procps-3.2.6/proc/sysinfo.h.steal 2006-04-20 18:36:56.000000000 +0200
+++ procps-3.2.6/proc/sysinfo.h 2006-04-20 18:37:47.000000000 +0200
@@ -56,7 +56,7 @@
#define BUFFSIZE (64*1024)
typedef unsigned long long jiff;
-extern void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow, jiff *restrict cxxx, jiff *restrict cyyy,
+extern void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow, jiff *restrict cxxx, jiff *restrict cyyy, jiff *restrict czzz,
unsigned long *restrict pin, unsigned long *restrict pout, unsigned long *restrict s_in, unsigned long *restrict sout,
unsigned *restrict intr, unsigned *restrict ctxt,
unsigned int *restrict running, unsigned int *restrict blocked,
--- procps-3.2.6/vmstat.c.steal 2006-04-20 18:47:01.000000000 +0200
+++ procps-3.2.6/vmstat.c 2006-04-20 23:54:25.000000000 +0200
@@ -150,15 +150,15 @@
////////////////////////////////////////////////////////////////////////////
static void new_header(void){
- printf("procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----\n");
+ printf("procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------\n");
printf(
- "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %5s %2s %2s %2s %2s\n",
+ "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %5s %2s %2s %2s %2s %2s\n",
"r","b",
"swpd", "free", a_option?"inact":"buff", a_option?"active":"cache",
"si","so",
"bi","bo",
"in","cs",
- "us","sy","id","wa"
+ "us","sy","id","wa","st"
);
}
@@ -173,13 +173,13 @@
////////////////////////////////////////////////////////////////////////////
static void new_format(void) {
- const char format[]="%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %5u %2u %2u %2u %2u\n";
+ const char format[]="%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %5u %2u %2u %2u %2u %2u\n";
unsigned int tog=0; /* toggle switch for cleaner code */
unsigned int i;
unsigned int hz = Hertz;
unsigned int running,blocked,dummy_1,dummy_2;
- jiff cpu_use[2], cpu_nic[2], cpu_sys[2], cpu_idl[2], cpu_iow[2], cpu_xxx[2], cpu_yyy[2];
- jiff duse, dsys, didl, diow, Div, divo2;
+ jiff cpu_use[2], cpu_nic[2], cpu_sys[2], cpu_idl[2], cpu_iow[2], cpu_xxx[2], cpu_yyy[2], cpu_zzz[2];
+ jiff duse, dsys, didl, diow, dstl, Div, divo2;
unsigned long pgpgin[2], pgpgout[2], pswpin[2], pswpout[2];
unsigned int intr[2], ctxt[2];
unsigned int sleep_half;
@@ -190,7 +190,7 @@
new_header();
meminfo();
- getstat(cpu_use,cpu_nic,cpu_sys,cpu_idl,cpu_iow,cpu_xxx,cpu_yyy,
+ getstat(cpu_use,cpu_nic,cpu_sys,cpu_idl,cpu_iow,cpu_xxx,cpu_yyy,cpu_zzz,
pgpgin,pgpgout,pswpin,pswpout,
intr,ctxt,
&running,&blocked,
@@ -200,7 +200,8 @@
dsys= *cpu_sys + *cpu_xxx + *cpu_yyy;
didl= *cpu_idl;
diow= *cpu_iow;
- Div= duse+dsys+didl+diow;
+ dstl= *cpu_zzz;
+ Div= duse+dsys+didl+diow+dstl;
divo2= Div/2UL;
printf(format,
running, blocked,
@@ -216,7 +217,8 @@
(unsigned)( (100*duse + divo2) / Div ),
(unsigned)( (100*dsys + divo2) / Div ),
(unsigned)( (100*didl + divo2) / Div ),
- (unsigned)( (100*diow + divo2) / Div )
+ (unsigned)( (100*diow + divo2) / Div ),
+ (unsigned)( (100*dstl + divo2) / Div )
);
for(i=1;i<num_updates;i++) { /* \\\\\\\\\\\\\\\\\\\\ main loop ////////////////// */
@@ -226,7 +228,7 @@
meminfo();
- getstat(cpu_use+tog,cpu_nic+tog,cpu_sys+tog,cpu_idl+tog,cpu_iow+tog,cpu_xxx+tog,cpu_yyy+tog,
+ getstat(cpu_use+tog,cpu_nic+tog,cpu_sys+tog,cpu_idl+tog,cpu_iow+tog,cpu_xxx+tog,cpu_yyy+tog,cpu_zzz+tog,
pgpgin+tog,pgpgout+tog,pswpin+tog,pswpout+tog,
intr+tog,ctxt+tog,
&running,&blocked,
@@ -236,6 +238,7 @@
dsys= cpu_sys[tog]-cpu_sys[!tog] + cpu_xxx[tog]-cpu_xxx[!tog] + cpu_yyy[tog]-cpu_yyy[!tog];
didl= cpu_idl[tog]-cpu_idl[!tog];
diow= cpu_iow[tog]-cpu_iow[!tog];
+ dstl= cpu_zzz[tog]-cpu_zzz[!tog];
/* idle can run backwards for a moment -- kernel "feature" */
if(debt){
@@ -247,7 +250,7 @@
didl = 0;
}
- Div= duse+dsys+didl+diow;
+ Div= duse+dsys+didl+diow+dstl;
divo2= Div/2UL;
printf(format,
running, blocked,
@@ -263,7 +266,8 @@
(unsigned)( (100*duse+divo2)/Div ), /*us*/
(unsigned)( (100*dsys+divo2)/Div ), /*sy*/
(unsigned)( (100*didl+divo2)/Div ), /*id*/
- (unsigned)( (100*diow+divo2)/Div ) /*wa*/
+ (unsigned)( (100*diow+divo2)/Div ), /*wa*/
+ (unsigned)( (100*dstl+divo2)/Div ) /*st*/
);
}
}
@@ -504,13 +508,13 @@
static void sum_format(void) {
unsigned int running, blocked, btime, processes;
- jiff cpu_use, cpu_nic, cpu_sys, cpu_idl, cpu_iow, cpu_xxx, cpu_yyy;
+ jiff cpu_use, cpu_nic, cpu_sys, cpu_idl, cpu_iow, cpu_xxx, cpu_yyy, cpu_zzz;
unsigned long pgpgin, pgpgout, pswpin, pswpout;
unsigned int intr, ctxt;
meminfo();
- getstat(&cpu_use, &cpu_nic, &cpu_sys, &cpu_idl, &cpu_iow, &cpu_xxx, &cpu_yyy,
+ getstat(&cpu_use, &cpu_nic, &cpu_sys, &cpu_idl, &cpu_iow, &cpu_xxx, &cpu_yyy, &cpu_zzz,
&pgpgin, &pgpgout, &pswpin, &pswpout,
&intr, &ctxt,
&running, &blocked,
@@ -530,6 +534,7 @@
printf("%13Lu nice user cpu ticks\n", cpu_nic);
printf("%13Lu system cpu ticks\n", cpu_sys);
printf("%13Lu idle cpu ticks\n", cpu_idl);
+ printf("%13Lu steal cpu ticks\n", cpu_zzz);
printf("%13Lu IO-wait cpu ticks\n", cpu_iow);
printf("%13Lu IRQ cpu ticks\n", cpu_xxx);
printf("%13Lu softirq cpu ticks\n", cpu_yyy);
@@ -547,11 +552,11 @@
static void fork_format(void) {
unsigned int running, blocked, btime, processes;
- jiff cpu_use, cpu_nic, cpu_sys, cpu_idl, cpu_iow, cpu_xxx, cpu_yyy;
+ jiff cpu_use, cpu_nic, cpu_sys, cpu_idl, cpu_iow, cpu_xxx, cpu_yyy, cpu_zzz;
unsigned long pgpgin, pgpgout, pswpin, pswpout;
unsigned int intr, ctxt;
- getstat(&cpu_use, &cpu_nic, &cpu_sys, &cpu_idl, &cpu_iow, &cpu_xxx, &cpu_yyy,
+ getstat(&cpu_use, &cpu_nic, &cpu_sys, &cpu_idl, &cpu_iow, &cpu_xxx, &cpu_yyy, &cpu_zzz,
&pgpgin, &pgpgout, &pswpin, &pswpout,
&intr, &ctxt,
&running, &blocked,
procps-3.2.6-top-env-cpuloop.patch:
top.1 | 7 +++++++
top.c | 27 +++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
--- NEW FILE procps-3.2.6-top-env-cpuloop.patch ---
--- procps-3.2.6/top.c.env-cpuloop 2006-04-19 19:42:22.000000000 +0200
+++ procps-3.2.6/top.c 2006-04-19 19:44:07.000000000 +0200
@@ -121,6 +121,7 @@
Secure_mode = 0; // set if some functionality restricted
static int VIRT_vmsize = 0; //use vm_size for VIRT
+static int CPU_loop = 0; // wait for reliable CPU data
/* Some cap's stuff to reduce runtime calls --
to accomodate 'Batch' mode, they begin life as empty strings */
@@ -1672,6 +1673,8 @@
if (( getenv("STATSIZE")) && ( atoi(getenv("STATSIZE")) == 1 ))
VIRT_vmsize = 1;
+ if (( getenv("CPULOOP")) && ( atoi(getenv("CPULOOP")) == 1 ))
+ CPU_loop = 1;
}
@@ -2949,6 +2952,7 @@
{
static proc_t **p_table = NULL;
static CPU_t *smpcpu = NULL;
+ static int first = 0;
// whoa first time, gotta' prime the pump...
if (!p_table) {
@@ -2996,6 +3000,27 @@
smpcpu = cpus_refresh(smpcpu);
+ if (first==0 && CPU_loop)
+ {
+ int i;
+ CPU_t *cpu;
+ for (i = 0; i < Cpu_tot; i++) {
+ cpu = &smpcpu[i];
+ cpu->u_sav = cpu->u;
+ cpu->s_sav = cpu->s;
+ cpu->n_sav = cpu->n;
+ cpu->i_sav = cpu->i;
+ cpu->w_sav = cpu->w;
+ cpu->x_sav = cpu->x;
+ cpu->y_sav = cpu->y;
+ }
+ tv.tv_sec = Rc.delay_time;
+ tv.tv_usec = (Rc.delay_time - (int)Rc.delay_time) * 1000000;
+ select(0, NULL, NULL, NULL, &tv);
+
+ smpcpu = cpus_refresh(smpcpu);
+ }
+
if (CHKw(Curwin, View_CPUSUM)) {
// display just the 1st /proc/stat line
summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):");
@@ -3021,6 +3046,8 @@
}
SETw(Curwin, NEWFRAM_cwo);
+
+ first = 1;
return p_table;
}
--- procps-3.2.6/top.1.env-cpuloop 2006-04-19 19:42:22.000000000 +0200
+++ procps-3.2.6/top.1 2006-04-19 19:42:22.000000000 +0200
@@ -1173,6 +1173,13 @@
Send bug reports to:
Albert D\. Cahalan, <albert at users.sf.net>
+The top command calculates Cpu(s) by looking at the change in CPU time values
+between samples. When you first run it, it has no previous sample to compare
+to, so these initial values are the percentages since boot. It means you need
+at least two loops or you have to ignore summary output from the first loop.
+This is problem for example for batch mode. There is a possible workaround if
+you define the CPULOOP=1 environment variable. The top command will be run one
+extra hidden loop for CPU data before standard output.
.\" ----------------------------------------------------------------------
.SH 8. HISTORY Former top
procps-3.2.6-top-env-vmsize.patch:
top.1 | 3 ++-
top.c | 11 ++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
--- NEW FILE procps-3.2.6-top-env-vmsize.patch ---
--- procps-3.2.6/top.1.env-vmsize 2006-04-19 16:50:37.000000000 +0200
+++ procps-3.2.6/top.1 2006-04-19 16:59:23.000000000 +0200
@@ -395,7 +395,8 @@
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.
--- procps-3.2.6/top.c.env-vmsize 2006-04-19 16:35:20.000000000 +0200
+++ procps-3.2.6/top.c 2006-04-19 16:50:25.000000000 +0200
@@ -120,6 +120,8 @@
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],
@@ -1667,6 +1669,9 @@
Fieldstab[P_PPD].fmts = pid_fmt;
Fieldstab[P_PPD].head = " PPID" + 10 - pid_digits;
}
+
+ if (( getenv("STATSIZE")) && ( atoi(getenv("STATSIZE")) == 1 ))
+ VIRT_vmsize = 1;
}
@@ -2194,6 +2199,7 @@
}
if (!Frames_libflags) Frames_libflags = L_DEFAULT;
if (selection_type=='p') Frames_libflags |= PROC_PID;
+ if (VIRT_vmsize) Frames_libflags |= L_status;
}
@@ -3157,7 +3163,10 @@
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) {
procps-3.2.5-top-remcpu.patch:
top.c | 61 +++++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 43 insertions(+), 18 deletions(-)
Index: procps-3.2.5-top-remcpu.patch
===================================================================
RCS file: /cvs/dist/rpms/procps/FC-5/procps-3.2.5-top-remcpu.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- procps-3.2.5-top-remcpu.patch 1 Nov 2005 10:37:33 -0000 1.1
+++ procps-3.2.5-top-remcpu.patch 20 Apr 2006 22:37:08 -0000 1.2
@@ -1,6 +1,6 @@
---- procps-3.2.5/top.c.remcpu 2005-10-12 14:11:22.000000000 +0200
-+++ procps-3.2.5/top.c 2005-10-12 14:49:59.000000000 +0200
-@@ -910,6 +910,7 @@
+--- procps-3.2.3/top.c.remcpu 2006-04-18 12:00:28.000000000 +0200
++++ procps-3.2.3/top.c 2006-04-18 12:20:04.000000000 +0200
+@@ -901,6 +901,7 @@
static CPU_t *cpus_refresh (CPU_t *cpus)
{
static FILE *fp = NULL;
@@ -8,7 +8,7 @@
int i;
int num;
// enough for a /proc/stat CPU line (not the intr line)
-@@ -924,34 +925,33 @@
+@@ -915,34 +916,33 @@
can hold tics representing the /proc/stat cpu summary (the first
line read) -- that slot supports our View_CPUSUM toggle */
cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
@@ -58,7 +58,7 @@
if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
cpus[i].x = 0; // FIXME: can't tell by kernel version number
cpus[i].y = 0; // FIXME: can't tell by kernel version number
-@@ -959,9 +959,28 @@
+@@ -950,9 +950,34 @@
&cpus[i].id,
&cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y
);
@@ -82,8 +82,14 @@
+
+ // and just in case we're 2.2.xx compiled without SMP support...
+ if (Cpu_tot == 1) {
-+ cpus[1].id = 0;
-+ memcpy(cpus, &cpus[1], sizeof(CPU_t));
++ cpus[0].id = cpus[1].id = 0;
++ cpus[0].u = cpus[1].u;
++ cpus[0].n = cpus[1].n;
++ cpus[0].s = cpus[1].s;
++ cpus[0].i = cpus[1].i;
++ cpus[0].w = cpus[1].w;
++ cpus[0].x = cpus[1].x;
++ cpus[0].y = cpus[1].y;
+ }
+
return cpus;
Index: procps.spec
===================================================================
RCS file: /cvs/dist/rpms/procps/FC-5/procps.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- procps.spec 11 Feb 2006 05:17:46 -0000 1.46
+++ procps.spec 20 Apr 2006 22:37:08 -0000 1.47
@@ -1,18 +1,18 @@
Summary: System and process monitoring utilities.
Name: procps
Version: 3.2.6
-Release: 3.2
+Release: 3.3
License: GPL
Group: Applications/System
Source: http://procps.sourceforge.net/procps-%{version}.tar.gz
Source1: FAQ
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prereq: /bin/rm /sbin/ldconfig
+
Patch1: procps-3.2.5-selinux.patch
Patch2: procps-3.1.15-misc.patch
Patch3: procps-3.2.3-FAQ.patch
Patch4: procps-3.2.1-selinux-workaround.patch
-Patch5: procps-3.2.1-top-vmsize-env.patch
Patch6: procps-3.2.3-noproc.patch
Patch7: procps-3.2.3-pseudo.patch
Patch8: procps-3.2.4-0x9b.patch
@@ -21,8 +21,18 @@
# 161449 - "top" ignores user and system toprc
Patch10: procps-3.2.5-top-rc.patch
# 161303 - 'top' failed when remove cpus
+# 186017 - Top "Cpu0" line never updates on single processor machine
Patch11: procps-3.2.5-top-remcpu.patch
+# Selinux
Patch12: procps-3.2.6-libselinux.patch
+# 168444 - Memory usage conflicts with /proc/meminfo
+Patch13: procps-3.2.3-slabtop-man.patch
+# 177453 - for VIRT use proc->vm_size rather then proc->size (workaround)
+Patch14: procps-3.2.6-top-env-vmsize.patch
+# 174619 - workaround for reliable Cpu(s) data in the first loop
+Patch15: procps-3.2.6-top-env-cpuloop.patch
+# 185299 â cpu steal time support
+Patch16: procps-3.2.6-cpu-steal.patch
BuildRequires: ncurses-devel
@@ -54,7 +64,6 @@
%patch2 -p1 -b .misc
%patch3 -p1 -b .FAQ
%patch4 -p1 -b .selinux-workaround
-%patch5 -p1 -b .top-vmsize-env
%patch6 -p1 -b .noproc
%patch7 -p1 -b .pseudo
%patch8 -p1 -b .0x9b
@@ -62,6 +71,10 @@
%patch10 -p1 -b .rc
%patch11 -p1 -b .remcpu
%patch12 -p1 -b .libselinux
+%patch13 -p1 -b .slabman
+%patch14 -p1 -b .env-vmsize
+%patch15 -p1 -b .env-cpuloop
+%patch16 -p1 -b .steal
cp %SOURCE1 .
@@ -99,6 +112,13 @@
%attr(0644,root,root) %{_mandir}/man5/*
%changelog
+* Wed Apr 19 2006 Karel Zak <kzak at redhat.com> - 3.2.6-3.3
+- fix #186017 - top "Cpu0" line never updates on single processor machine
+ (bugfix added to the 'remcpu' patch)
+- fix #168444 - memory usage conflicts with /proc/meminfo
+- fix #174619 - top reports wrong values for CPU(s) in batch mode
+- fix #185299 â cpu steal time support
+
* Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 3.2.6-3.2
- bump again for double-long bug on ppc(64)
--- procps-3.2.1-top-vmsize-env.patch DELETED ---
- Previous message (by thread): rpms/kernel/devel patch-2.6.17-rc2-git3.bz2.sign, NONE, 1.1 .cvsignore, 1.410, 1.411 kernel-2.6.spec, 1.2142, 1.2143 sources, 1.352, 1.353 upstream, 1.323, 1.324 patch-2.6.17-rc2-git1.bz2.sign, 1.1, NONE
- Next message (by thread): rpms/avahi/devel avahi-0.6.9-bz189427.patch, NONE, 1.1 avahi.spec, 1.51, 1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list