Hello community, here is the log from the commit of package WindowMaker-applets for openSUSE:Factory checked in at Tue Apr 20 02:29:59 CEST 2010. -------- --- WindowMaker-applets/WindowMaker-applets.changes 2010-02-22 21:53:46.000000000 +0100 +++ /mounts/work_src_done/STABLE/WindowMaker-applets/WindowMaker-applets.changes 2010-04-08 13:33:22.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Apr 8 11:24:45 UTC 2010 - ma@novell.com + +- wmSMPmon: Add options -c1/-c2 to define which CPUs data to show + in case the system has more than two CPUs. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- wmSMPmon-Support-selecting-CPUs-to-display.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ WindowMaker-applets.spec ++++++ --- /var/tmp/diff_new_pack.R2Nfg1/_old 2010-04-20 02:29:51.000000000 +0200 +++ /var/tmp/diff_new_pack.R2Nfg1/_new 2010-04-20 02:29:51.000000000 +0200 @@ -26,7 +26,7 @@ Provides: wmweath wmapps AutoReqProv: on Version: 1.0.1 -Release: 2 +Release: 3 Summary: Window Maker Applets # %define wmcdplay_version 1.0-beta1 @@ -210,6 +210,7 @@ Patch42: wmisdn-%{wmisdn_version}.dif Patch44: WMMail-automake.patch Patch45: WMMail-fewargs.patch +Patch46: wmSMPmon-Support-selecting-CPUs-to-display.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -307,6 +308,7 @@ %patch36 cd ../wmSMPmon-%{wmSMPmon_version} %patch37 +%patch46 -p1 cd ../wmappl-%{wmappl_version} %patch38 cd ../wmnd_%{wmnd_version} ++++++ wmSMPmon-Support-selecting-CPUs-to-display.patch ++++++
From 44951834af92649eaa364a586b883960a7dce22f Mon Sep 17 00:00:00 2001 From: Michael Andres
Date: Thu, 8 Apr 2010 12:00:28 +0200 Subject: [PATCH] Support selecting CPUs to display
---
wmSMPmon/wmSMPmon.1 | 5 +++++
wmSMPmon/wmSMPmon.c | 44 +++++++++++++++++++++++++++++++++++++++++---
2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/wmSMPmon/wmSMPmon.1 b/wmSMPmon/wmSMPmon.1
index d231128..601c539 100644
--- a/wmSMPmon/wmSMPmon.1
+++ b/wmSMPmon/wmSMPmon.1
@@ -40,6 +40,11 @@ little graphs. Style 2 shows the two graphs on top of each
other. Style 3 uses a mirror like type. The default style is 1, which
is also the style used on single CPU systems.
.TP
+.B \-c1 IDX, \-c2 IDX
+On systems with more than 2 CPUs, select the CPUs to show. Per default CPU
+number 1 and 2 are shown. On a quad CPU systems you may launch second wmSMPmon
+showing CPUs number 3 and 4.
+.TP
.B \-no-swap
Do not monitor swap.
.SH "SEE ALSO"
diff --git a/wmSMPmon/wmSMPmon.c b/wmSMPmon/wmSMPmon.c
index 47cdc55..ebb621c 100644
--- a/wmSMPmon/wmSMPmon.c
+++ b/wmSMPmon/wmSMPmon.c
@@ -56,6 +56,8 @@ int main(int argc, char **argv)
no_swap = FAUX,
draw_graph = FAUX,
NumCPUs, /* number of CPUs */
+ CPUidx0 = 0,
+ CPUidx1 = 1,
i = 0, /* counter */
mem = 0, /* current memory/swap scaled to 0-100 */
prec_mem = 0, /* memory from previous round */
@@ -107,6 +109,36 @@ int main(int argc, char **argv)
{
usage(NumCPUs, NULL) ;
}
+ if(!strncmp(argv[i], "-c1", 3))
+ {
+ i ++ ;
+ if(i == argc)
+ /* parameter missing! */
+ usage(NumCPUs, "no CPU number given when using -c1");
+ else
+ CPUidx0 = atoi(argv[i])-1; /* argv numbered 1..numCPUs */
+
+ if (CPUidx0 >= NumCPUs)
+ usage(NumCPUs, "CPU number too high (-c1)");
+
+ i ++ ;
+ continue;
+ }
+ if(!strncmp(argv[i], "-c2", 3))
+ {
+ i ++ ;
+ if(i == argc)
+ /* parameter missing! */
+ usage(NumCPUs, "no CPU number given when using -c2");
+ else
+ CPUidx1 = atoi(argv[i])-1; /* argv numbered 1..numCPUs */
+
+ if (CPUidx1 >= NumCPUs)
+ usage(NumCPUs, "CPU number too high (-c2)");
+
+ i ++ ;
+ continue;
+ }
if(!strncmp(argv[i], "-g", 2) && NumCPUs > 1)
{
/* we only support this on SMP systems */
@@ -180,7 +212,7 @@ int main(int argc, char **argv)
{
CPU_Load = Get_CPU_Load(CPU_Load, NumCPUs);
- load = CPU_Load[0];
+ load = CPU_Load[CPUidx0];
load0t = load0t + load ;
if(load != load0o)
{
@@ -195,7 +227,7 @@ int main(int argc, char **argv)
{
/* we have two CPUs -> do CPU 1 */
/* FIXME: What about more CPUs? */
- load = CPU_Load[1];
+ load = CPU_Load[CPUidx1];
if(load != load1o)
{
@@ -341,7 +373,13 @@ void usage(int cpus, const char *str)
{
fputs(" -g STYLE graph style (try 2 or 3, default is 1).\n", stderr);
}
-
+
+ if(cpus > 2)
+ {
+ fputs(" -c1 IDX CPU to show as 1st CPU (1..numCPUs, default 1).\n", stderr);
+ fputs(" -c2 IDX CPU to show as 2nd CPU (1..numCPUs, default 2).\n", stderr);
+ }
+
fputs(" -no-swap don't monitore swap size.\n\n"
"