OBS User unknown 2008-12-15 14:04:01 +00:00 committed by Git OBS Bridge
parent 8f0c3e24f8
commit 09d3a52ffd
4 changed files with 89 additions and 21 deletions

View File

@ -0,0 +1,52 @@
--- vmstat.c
+++ vmstat.c 2008-12-10 13:32:25.667300056 +0100
@@ -150,15 +150,15 @@ static int format_1000(unsigned long lon
////////////////////////////////////////////////////////////////////////////
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 %4s %2s %2s %2s %2s\n",
+ "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %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,7 +173,7 @@ static unsigned long unitConvert(unsigne
////////////////////////////////////////////////////////////////////////////
static void new_format(void) {
- const char format[]="%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u\n";
+ const char format[]="%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
unsigned int tog=0; /* toggle switch for cleaner code */
unsigned int i;
unsigned int hz = Hertz;
@@ -217,8 +217,8 @@ static void new_format(void) {
(unsigned)( (100*duse + divo2) / Div ),
(unsigned)( (100*dsys + divo2) / Div ),
(unsigned)( (100*didl + divo2) / Div ),
- (unsigned)( (100*diow + divo2) / Div ) /* ,
- (unsigned)( (100*dstl + divo2) / Div ) */
+ (unsigned)( (100*diow + divo2) / Div ),
+ (unsigned)( (100*dstl + divo2) / Div )
);
for(i=1;i<num_updates;i++) { /* \\\\\\\\\\\\\\\\\\\\ main loop ////////////////// */
@@ -266,8 +266,8 @@ static void new_format(void) {
(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*dstl+divo2)/Div ) //st */
+ (unsigned)( (100*diow+divo2)/Div ), //wa
+ (unsigned)( (100*dstl+divo2)/Div ) //st
);
}
}

View File

@ -1,5 +1,5 @@
--- top.c --- top.c
+++ top.c 2008-10-22 13:00:06.976330812 +0200 +++ top.c 2008-12-10 16:28:41.000000000 +0100
@@ -2514,7 +2514,7 @@ static void do_key (unsigned c) @@ -2514,7 +2514,7 @@ static void do_key (unsigned c)
switch (c) { switch (c) {
@ -27,22 +27,25 @@
show_special( show_special(
0, 0,
fmtmk( fmtmk(
@@ -3013,6 +3013,14 @@ static proc_t **summary_show (void) @@ -3015,21 +3015,29 @@ static proc_t **summary_show (void)
smpcpu = cpus_refresh(smpcpu);
+ if (Screen_rows <= Msg_row+Cpu_tot+1) {
+ if (!CHKw(Curwin, View_CPUSUM)) {
+ show_msg("\aSorry, terminal is not big enough\n");
+ TOGw(Curwin, View_CPUSUM);
+ }
+ goto skip;
+ }
+
if (CHKw(Curwin, View_CPUSUM)) { if (CHKw(Curwin, View_CPUSUM)) {
// display just the 1st /proc/stat line // display just the 1st /proc/stat line
+ if (Screen_rows <= Msg_row+2)
+ goto skip;
summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):"); summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):");
@@ -3026,10 +3034,11 @@ static proc_t **summary_show (void) } else {
int i;
char tmp[SMLBUFSIZ];
// display each cpu's states separately
+ if (Screen_rows <= Msg_row+Cpu_tot+1) {
+ show_msg("\aSorry, terminal is not big enough\n");
+ TOGw(Curwin, View_CPUSUM);
+ goto skip;
+ }
for (i = 0; i < Cpu_tot; i++) {
snprintf(tmp, sizeof(tmp), "Cpu%-3d:", smpcpu[i].id);
summaryhlp(&smpcpu[i], tmp);
} }
} }
} }

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Dec 10 13:38:35 CET 2008 - werner@suse.de
- Make steal time part in vmstat active (bnc#457383)
- Modify the patch for bnc#435544 to show summary CPU even on
big irons (bnc#457980)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 22 13:07:41 CEST 2008 - werner@suse.de Wed Oct 22 13:07:41 CEST 2008 - werner@suse.de

View File

@ -27,7 +27,7 @@ Group: System/Monitoring
PreReq: %fillup_prereq %insserv_prereq PreReq: %fillup_prereq %insserv_prereq
AutoReqProv: on AutoReqProv: on
Version: 3.2.7 Version: 3.2.7
Release: 147 Release: 148
Summary: ps utilities for /proc Summary: ps utilities for /proc
Provides: ps Provides: ps
Obsoletes: ps Obsoletes: ps
@ -39,6 +39,7 @@ Patch: procps-3.2.3-make.diff
Patch1: procps-3.2.2-100cpus.diff Patch1: procps-3.2.2-100cpus.diff
Patch2: procps-3.2.5-eof.diff Patch2: procps-3.2.5-eof.diff
Patch3: procps-3.2.2-ia64.diff Patch3: procps-3.2.2-ia64.diff
Patch4: procps-3.2.7-stealtime.patch
Patch6: procps-3.2.7-manycpus.diff Patch6: procps-3.2.7-manycpus.diff
Patch7: procps-3.2.2-w-notruncate.diff Patch7: procps-3.2.2-w-notruncate.diff
Patch8: procps-3.2.2-w-simply-work.diff Patch8: procps-3.2.2-w-simply-work.diff
@ -92,6 +93,7 @@ Authors:
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p0
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
@ -177,6 +179,10 @@ rm -rf $RPM_BUILD_ROOT
%_mandir/man8/sysctl.8.gz %_mandir/man8/sysctl.8.gz
%changelog %changelog
* Wed Dec 10 2008 werner@suse.de
- Make steal time part in vmstat active (bnc#457383)
- Modify the patch for bnc#435544 to show summary CPU even on
big irons (bnc#457980)
* Wed Oct 22 2008 werner@suse.de * Wed Oct 22 2008 werner@suse.de
- Add patch for support of cgroups of processes (fate#305346) - Add patch for support of cgroups of processes (fate#305346)
* Wed Oct 15 2008 werner@suse.de * Wed Oct 15 2008 werner@suse.de
@ -306,7 +312,7 @@ rm -rf $RPM_BUILD_ROOT
* ps: STAT shows l for multi-threaded processes * ps: STAT shows l for multi-threaded processes
* vmstat: some overflow problems fixed -- thanks Holger Kiehl * vmstat: some overflow problems fixed -- thanks Holger Kiehl
- Use ps manpage from from the package. - Use ps manpage from from the package.
* Wed Aug 04 2004 garloff@suse.de * Tue Aug 03 2004 garloff@suse.de
- Update to procps-3.2.2: - Update to procps-3.2.2:
* build tweaks and docu updates * build tweaks and docu updates
* ps: k option and personality-specific -x support * ps: k option and personality-specific -x support
@ -395,7 +401,7 @@ rm -rf $RPM_BUILD_ROOT
* Fri Sep 05 2003 stepan@suse.de * Fri Sep 05 2003 stepan@suse.de
- top: fix 4G overflow on 64bit platforms (bug #28539) - top: fix 4G overflow on 64bit platforms (bug #28539)
(procps-3.1.11-bigproc.diff) (procps-3.1.11-bigproc.diff)
* Sat Aug 09 2003 stepan@suse.de * Fri Aug 08 2003 stepan@suse.de
- update procps to version 3.1.11: - update procps to version 3.1.11:
* compile with gcc 2.95 again (C99 issue) * compile with gcc 2.95 again (C99 issue)
- fix sysctl insertion (bug #28593) - fix sysctl insertion (bug #28593)
@ -465,7 +471,7 @@ rm -rf $RPM_BUILD_ROOT
- port all required patches to 2.0.10 - port all required patches to 2.0.10
- Update psmisc to 21.2 - Update psmisc to 21.2
- port all required patches to 21.2 - port all required patches to 21.2
* Wed Sep 11 2002 adrian@suse.de * Tue Sep 10 2002 adrian@suse.de
- fix split alias - fix split alias
-Obsoletes: ps:/usr/X11R6/bin/xcpustate -Obsoletes: ps:/usr/X11R6/bin/xcpustate
+Provides: ps:/usr/X11R6/bin/xcpustate +Provides: ps:/usr/X11R6/bin/xcpustate
@ -473,7 +479,7 @@ rm -rf $RPM_BUILD_ROOT
- fix PreRequires. - fix PreRequires.
* Fri Aug 16 2002 werner@suse.de * Fri Aug 16 2002 werner@suse.de
- Add PreReq (bug #17963) - Add PreReq (bug #17963)
* Fri Aug 16 2002 ro@suse.de * Thu Aug 15 2002 ro@suse.de
- modify required-start in boot.sysctl: boot.setup is gone - modify required-start in boot.sysctl: boot.setup is gone
* Tue Aug 06 2002 werner@suse.de * Tue Aug 06 2002 werner@suse.de
- Statistics of cpu usage: no negative averages (bug #17449) - Statistics of cpu usage: no negative averages (bug #17449)
@ -582,7 +588,7 @@ rm -rf $RPM_BUILD_ROOT
- ran old prepare_spec on spec file to switch to new prepare_spec. - ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Sep 07 1999 werner@suse.de * Tue Sep 07 1999 werner@suse.de
- Avoid SEGV if /proc isn't mounted (e.g. in single user mode) - Avoid SEGV if /proc isn't mounted (e.g. in single user mode)
* Tue Sep 07 1999 werner@suse.de * Mon Sep 06 1999 werner@suse.de
- Fix some maunal page (missed tbl mark, some nasty .TH's) - Fix some maunal page (missed tbl mark, some nasty .TH's)
* Wed Aug 18 1999 werner@suse.de * Wed Aug 18 1999 werner@suse.de
- Update procinfo (ver 17), procps (ver 2.0.2) but hold - Update procinfo (ver 17), procps (ver 2.0.2) but hold
@ -629,10 +635,10 @@ rm -rf $RPM_BUILD_ROOT
- add procinfo 0.11 - add procinfo 0.11
* Tue May 20 1997 florian@suse.de * Tue May 20 1997 florian@suse.de
- update to version 1.11.6 - update to version 1.11.6
* Mon Apr 14 1997 florian@suse.de * Sun Apr 13 1997 florian@suse.de
- update to new version 1.11.3 - update to new version 1.11.3
- update to psmisc 12a - update to psmisc 12a
* Thu Jan 23 1997 florian@suse.de * Wed Jan 22 1997 florian@suse.de
- update to version 1.11.1 - update to version 1.11.1
* Thu Jan 02 1997 florian@suse.de * Thu Jan 02 1997 florian@suse.de
new version 1.01 new version 1.01