Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41938 - updatedb (cron event) should not be started when a laptop is on battery!
Summary: updatedb (cron event) should not be started when a laptop is on battery!
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-17 11:09 UTC by Roger
Modified: 2004-07-16 09:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger 2004-02-17 11:09:16 UTC
updatedb (cron event) should not be started when a laptop is on battery!

doing so kills the battery due to harddrive useage.  

i'm thinking to avert this issue, either /etc/init.d/crond needs to be start/stopped via acpi events (messy as this would shut down crond entirely), or, creating a /etc/init.d/updatedb (/etc/init.d/locate) service to start/stop manually... 

As a quick hack, i guess one could deal with stopping crond entirely when on battery. (since it may alse contain logrotate and other items not necessarily needed during battery mode) 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



Expected Results:  
SOB (Save Our Battery)
Comment 1 Peter Johanson (RETIRED) gentoo-dev 2004-02-24 20:57:49 UTC
Interesting idea. I'm very hesitant to do things like altering services, cron, etc based on acpid by default like this. If you'd like to code something up like this which is easily configurable to be disabled and enabled, that would be great. I'd prefer not to have this by *default* though.

Also stopping cron entirely for one annoying service is not really a good thing. People on laptops might be extensively using cron to schedule other important things they want run. We'd really need something more nuanced than stopping cron
Comment 2 Roger 2004-02-25 09:32:21 UTC
Another thing that kinda bugs me are services being started, when X could be started first and these "other" start-up services could be executed to start using a lower priority (to allow X primary usage of the hdd) until the services are started, then they would resume thier normal priority.

This is a side note from the stated topic of this feature request/bug, however, even crond, gpm, cupsd, fetchmail, ... could all be started after X is started for those of us using a laptop/computer as a client computer.. for access our PIM's on Evolution, Mozilla, etc.  However, as I mentioned in the above paragraph, the disk usage after X is started would spike due to these misc services being started after X is started.  So as to why I some how proposed that these misc services to restricted to the amount of hdd bandwidth they get to start.

Just an idea. i'm going to keep kicking this one around for awhile.  True, most that are using a standard computer (networked, server, whatnot) will rarely reboot and not need to worry about this, but those of us using a laptop not as a server (or even those users rarely using their computers until they turn it on) may benefit from such a scheme.  

This sort of reminds me of pcmcia/cardbus schemes.  It's kinda difficult to mess with a scripting system once it works.  -- as to why i *hacked* my orinoco card to startup on eth1, etc.   so might first have to hack init or something to get a preliminary example working.


Any ideas on how to restrict hdd bandwidth/pipe usage to a specific executing process would be great.  Can it be even done yet? 
Comment 3 rob holland (RETIRED) gentoo-dev 2004-07-16 09:10:15 UTC
The original request just sounds too messy to me. I don't think Gentoo should be implementing shutting down services based on battery levels, thats for the user to setup if they wish imho.

Roger, you kinda went off on a tangent, so please open a fresh bug if you'd like too.. :)