Stefan Seyfried | 16 Jul 2005 14:00
Picon

Re: Re: CVS commit to /cvsroot/powersave/powersave/daemon by hmacht

Holger Macht wrote:
> On Fri 15. Jul 18:09:51, Stefan Seyfried wrote:
>> Hi Holger,

>> > +	/* this client did not connect through old socket interface */
>> > +	client.fd = -10;
>> 
>> If this '-10' is some magic number, can we add an #define for it, please?
> 
> No, it's not magic. It's just a value to distinguish that this client did
> not connect through the old socket way. With the new dbus method, the

so i still vote for "#define CLIENT_IS_DBUS=-42" and then using
"client.fd = CLIENT_IS_DBUS" or something like that.
--

-- 
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen
Holger Macht | 16 Jul 2005 14:05
Picon

Re: Re: CVS commit to /cvsroot/powersave/powersave/daemon by hmacht

On Sat 16. Jul 14:00:52, Stefan Seyfried wrote:
> Holger Macht wrote:
> > On Fri 15. Jul 18:09:51, Stefan Seyfried wrote:
> >> Hi Holger,
> 
> >> > +	/* this client did not connect through old socket interface */
> >> > +	client.fd = -10;
> >> 
> >> If this '-10' is some magic number, can we add an #define for it, please?
> > 
> > No, it's not magic. It's just a value to distinguish that this client did
> > not connect through the old socket way. With the new dbus method, the
> 
> so i still vote for "#define CLIENT_IS_DBUS=-42" and then using
> "client.fd = CLIENT_IS_DBUS" or something like that.

Ok, I will add it.

Bye,
	Holger
Thomas Renninger | 20 Jul 2005 19:42
Picon

scripts, configs and other files ...

Hi,

I just wanted to commit Wilken's "optimize_configs.sh" script for
post installation.

I wonder in which directory it should go...

It should only be installed into /usr/share/doc/packages
-> docs/

and it should run once at installation (at least it still is a script)
-> scripts/

Any ideas how to clean up a bit the directory structures?

   Thomas
Holger Macht | 20 Jul 2005 21:12
Picon

Re: scripts, configs and other files ...

On Wed 20. Jul 19:42:57, Thomas Renninger wrote:
> Hi,
> 
> I just wanted to commit Wilken's "optimize_configs.sh" script for
> post installation.
> 
> I wonder in which directory it should go...
> 
> It should only be installed into /usr/share/doc/packages
> -> docs/
> 
> and it should run once at installation (at least it still is a script)
> -> scripts/
> 
> Any ideas how to clean up a bit the directory structures?

Maybe we should create a new directory for scripts which get installed
below /usr/lib/powersave/. Maybe called 'event_scripts' (bad name, I know
;-).

Because we have other scripts like rcpowersave which also do not really
belong to scripts/. A directory scripts/ would then also contain things
like powersave_logs or restore_default_config. We could install them
wherever we like anyway, but the repository would be sorted.

Bye,
	Holger
Anton Farygin | 21 Jul 2005 08:06
Favicon

[PATCH} powersave-0.9.25: powersaved use 100% cpu

Hi !

I'm build powersave-0.9.25 for ALT Linux and resolve bug into
powersaved polling code (incorrect timespec calclualtion for poll interval).

With this patch powersaved works fine.

Rgds,
Anton Farygin
ALT Linux Team

diff -urN powersave-0.9.25.orig/daemon/powersaved.cpp powersave-0.9.25/daemon/powersaved.cpp
--- powersave-0.9.25.orig/daemon/powersaved.cpp 2005-03-19 18:36:52 +0300
+++ powersave-0.9.25/daemon/powersaved.cpp      2005-07-05 20:10:28 +0400
 <at>  <at>  -504,12 +504,13  <at>  <at> 
                        req.tv_usec = 0;
                }
                else {
-                       req.tv_sec  = config->current_scheme->POLL_INTERVAL / 1000
-                               - process_time / (1000*1000);
-                       req.tv_usec = (config->current_scheme->POLL_INTERVAL * 1000 % 1000000)
-                               - process_time % (1000*1000);
+                       struct timeval timedec;
+                       req.tv_sec  = config->current_scheme->POLL_INTERVAL / 1000;
+                       req.tv_usec = (config->current_scheme->POLL_INTERVAL * 1000 % 1000000);
+                       timersub(&tv_stop,&tv_start,&timedec);
+                       timersub(&req, &timedec, &req);
                        pDebug (DBG_DEBUG, "Needed %lu sec and %lu usec time to process functions after select\n",
-                       process_time / (1000*1000), process_time % (1000*1000));
+                       timedec.tv_sec,timedec.tv_usec);
(Continue reading)

Anton Farygin | 21 Jul 2005 08:38
Favicon

Re: [PATCH} powersave-0.9.25: powersaved use 100% cpu

On Thu, 21 Jul 2005 10:06:15 +0400, Anton Farygin wrote:

> Hi !
> 
> I'm build powersave-0.9.25 for ALT Linux and resolve bug into powersaved
> polling code (incorrect timespec calclualtion for poll interval).
> 
> With this patch powersaved works fine.
> 

oops.

corrected patch:

diff -urN powersave-0.9.25.orig/daemon/powersaved.cpp powersave-0.9.25/daemon/powersaved.cpp
--- powersave-0.9.25.orig/daemon/powersaved.cpp 2005-03-19 18:36:52 +0300
+++ powersave-0.9.25/daemon/powersaved.cpp      2005-07-05 20:10:28 +0400
 <at>  <at>  -504,12 +504,13  <at>  <at> 
                        req.tv_usec = 0;
                }
                else {
-                       req.tv_sec  = config->current_scheme->POLL_INTERVAL / 1000
-                               - process_time / (1000*1000);
-                       req.tv_usec = (config->current_scheme->POLL_INTERVAL * 1000 % 1000000)
-                               - process_time % (1000*1000);
+                       struct timeval timedec;
+                       req.tv_sec  = config->current_scheme->POLL_INTERVAL / 1000;
+                       req.tv_usec = (config->current_scheme->POLL_INTERVAL * 1000 % 1000000);
+                       timersub(&tv_stop,&tv_start,&timedec);
+                       timersub(&req, &timedec, &req);
(Continue reading)

Danny Kukawka | 21 Jul 2005 11:29
Picon

Re: Re: [PATCH} powersave-0.9.25: powersaved use 100% cpu

Hi,

thanks for the patch. 

If you builded powersave for ALT Linux, could you also build a rpm package for 
ALT Linux, which we can release on Novellforge/Sourceforge? 

Have you also tried to build KPowersave?

Rgds,

Danny Kukawka

On Thursday 21 July 2005 08:38, Anton Farygin wrote:
> On Thu, 21 Jul 2005 10:06:15 +0400, Anton Farygin wrote:
> > Hi !
> >
> > I'm build powersave-0.9.25 for ALT Linux and resolve bug into powersaved
> > polling code (incorrect timespec calclualtion for poll interval).
> >
> > With this patch powersaved works fine.
>
> oops.
>
> corrected patch:
>
> diff -urN powersave-0.9.25.orig/daemon/powersaved.cpp
> powersave-0.9.25/daemon/powersaved.cpp ---
> powersave-0.9.25.orig/daemon/powersaved.cpp 2005-03-19 18:36:52 +0300 +++
> powersave-0.9.25/daemon/powersaved.cpp      2005-07-05 20:10:28 +0400  <at>  <at> 
(Continue reading)

Stefan Seyfried | 21 Jul 2005 12:02
Picon

Re: Re: [PATCH} powersave-0.9.25: powersaved use 100% cpu

Anton Farygin wrote:
> On Thu, 21 Jul 2005 10:06:15 +0400, Anton Farygin wrote:
> 
>> Hi !
>> 
>> I'm build powersave-0.9.25 for ALT Linux and resolve bug into powersaved
>> polling code (incorrect timespec calclualtion for poll interval).
>> 
>> With this patch powersaved works fine.
>> 
> 
> oops.
> 
> corrected patch:

Thanks. I already have a similar patch in the "SUSE_LINUX_9_3" branch
(which is an alias for "this is stable" ;-).

If you run into any other problems, don't hesitate to ask, also if you
have patches to adapt to ALT Linux specifics, i am glad to get those
into our repository.

Have fun :-)
--

-- 
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen
Anton Farygin | 21 Jul 2005 13:25
Favicon

Re: Re: [PATCH} powersave-0.9.25: powersaved use 100% cpu

Hi.

All rpm packages available from ALT Linux Sisyphus (apt-get repository):

ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS/kpowersave-0.4.5-alt1.src.rpm
ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS/powersave-0.9.25-alt2.src.rpm

also, powersave required for build rpm macros from fillup:
ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS/fillup-1.42-alt3.src.rpm

and will be included to next release ALT Linux 3.0 (currently
Sisyphus-branch-3.0)

Thanks for great powersave daemon.

Rgds,
Anton Farygin
ALT Linux Team

P.S.
After next week i'm write powersave configuration module for alterator -
modules based configuration engine, writed by ALT Linux Team.

On Thu, 21 Jul 2005 11:29:13 +0200, Danny Kukawka wrote:

> Hi,
> 
> thanks for the patch.
> 
> If you builded powersave for ALT Linux, could you also build a rpm package
(Continue reading)

Thomas Renninger | 21 Jul 2005 15:57
Picon

Re: scripts, configs and other files ...

Holger Macht wrote:
> On Wed 20. Jul 19:42:57, Thomas Renninger wrote:
>>Hi,
>>
>>I just wanted to commit Wilken's "optimize_configs.sh" script for
>>post installation.
>>
>>I wonder in which directory it should go...
>>
>>It should only be installed into /usr/share/doc/packages
>>-> docs/
>>
>>and it should run once at installation (at least it still is a script)
>>-> scripts/
>>
>>Any ideas how to clean up a bit the directory structures?
> 
> Maybe we should create a new directory for scripts which get installed
> below /usr/lib/powersave/. Maybe called 'event_scripts' (bad name, I know
> ;-).
> 
> Because we have other scripts like rcpowersave which also do not really
> belong to scripts/. A directory scripts/ would then also contain things
> like powersave_logs or restore_default_config. We could install them
> wherever we like anyway, but the repository would be sorted.
> 
So in which direction should we go, I like to add the file now.

I also vote for:
moving all /usr/lib/powersave/ helper scripts into directory
(Continue reading)


Gmane