Mailinglist Archive: opensuse-commit (832 mails)

< Previous Next >
commit procps for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 18 Feb 2010 17:11:13 +0100
  • Message-id: <20100218161113.4E7CE202AC@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package procps for openSUSE:Factory
checked in at Thu Feb 18 17:11:13 CET 2010.



--------
--- procps/procps.changes 2010-01-29 15:36:58.000000000 +0100
+++ procps/procps.changes 2010-02-18 12:23:10.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Feb 18 12:12:04 CET 2010 - werner@xxxxxxx
+
+- Modify accuracy for %CPU calculation to avoid apperent CPU load
+ above 100% (bnc#496705)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ procps.spec ++++++
--- /var/tmp/diff_new_pack.pNlktV/_old 2010-02-18 17:07:51.000000000 +0100
+++ /var/tmp/diff_new_pack.pNlktV/_new 2010-02-18 17:07:51.000000000 +0100
@@ -27,7 +27,7 @@
PreReq: %fillup_prereq %insserv_prereq
AutoReqProv: on
Version: 3.2.8
-Release: 8
+Release: 9
Summary: ps utilities for /proc
Provides: ps
Obsoletes: ps

++++++ procps-3.2.7-accuracy.dif ++++++
--- /var/tmp/diff_new_pack.pNlktV/_old 2010-02-18 17:07:51.000000000 +0100
+++ /var/tmp/diff_new_pack.pNlktV/_new 2010-02-18 17:07:51.000000000 +0100
@@ -1,5 +1,5 @@
--- ps/common.h
-+++ ps/common.h 2008-09-16 18:57:14.862641102 +0200
++++ ps/common.h 2008-09-16 16:57:14.862641102 +0000
@@ -302,6 +302,7 @@ extern int running_only;
extern int screen_cols;
extern int screen_rows;
@@ -9,7 +9,7 @@
extern unsigned simple_select;
extern sort_node *sort_list;
--- ps/global.c
-+++ ps/global.c 2008-09-16 18:56:28.218297961 +0200
++++ ps/global.c 2008-09-16 16:56:28.218297961 +0000
@@ -70,6 +70,7 @@ int prefer_bsd_defaults = -1
int screen_cols = -1;
int screen_rows = -1;
@@ -37,7 +37,7 @@
simple_select = 0;
sort_list = NULL;
--- ps/output.c
-+++ ps/output.c 2008-09-16 19:00:48.510541613 +0200
++++ ps/output.c 2010-02-18 11:21:40.112125962 +0000
@@ -426,11 +426,12 @@ static int pr_etime(char *restrict const
static int pr_c(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */
@@ -54,7 +54,7 @@
if (pcpu > 99U) pcpu = 99U;
return snprintf(outbuf, COLWID, "%2u", pcpu);
}
-@@ -438,11 +439,12 @@ static int pr_c(char *restrict const out
+@@ -438,24 +439,26 @@ static int pr_c(char *restrict const out
static int pr_pcpu(char *restrict const outbuf, const proc_t *restrict const
pp){
unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
@@ -65,12 +65,15 @@
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz;
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
+- if (pcpu > 999U)
+- return snprintf(outbuf, COLWID, "%u", pcpu/10U);
+ jiffies = jiffies_since_boot - pp->start_time;
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies;
- if (pcpu > 999U)
- return snprintf(outbuf, COLWID, "%u", pcpu/10U);
++ if (pcpu/10U => 100U) /* do not confuse the user by scale
effects */
++ return snprintf(outbuf, COLWID, "100");
return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U);
-@@ -451,11 +453,12 @@ static int pr_pcpu(char *restrict const
+ }
+ /* this is a "per-mill" format, like %cpu with no decimal point */
static int pr_cp(char *restrict const outbuf, const proc_t *restrict const
pp){
unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread