optimizing power drain

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

optimizing power drain

Postby djmarian » Mar 19th, '13, 00:47

Hi,

great performance i get latelly with updates from beta 3, but i was wondering about a hdd i don't use allot
i found something to spin it down

/etc/rc.d/rc.local file
#Spin down hard disks after 1 minute..
/sbin/hdparm -S12 /dev/sda
/sbin/hdparm -S12 /dev/sdb

but i don't find the file
also any ideas on reducing power drain are wellcomed

and off topic, how do i stop mageia for waiting during boot for this hdd if i remove it, do i just delete it from fstab?
DjMarian
"When you're congratulated think if you deserve it, and if you think you do, don't be proud about it!" or something like that
Mageia 3 64bit LXDE, Atom 330, 2GB RAM
User avatar
djmarian
 
Posts: 51
Joined: Jun 1st, '11, 18:24
Location: Slatina, Romania

Re: optimizing power drain

Postby doktor5000 » Mar 19th, '13, 20:11

Which file you can't find? For /etc/rc.local, that's a symlink to the actual file /etc/rc.d/rc.local:
Code: Select all
[doktor5000@Mageia2 ~]$ ls -la /etc/rc.local
lrwxrwxrwx 1 root root 13 Jun 17  2012 /etc/rc.local -> rc.d/rc.local


But maybe what you want is /etc/sysconfig/harddisks ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: optimizing power drain

Postby djmarian » Mar 26th, '13, 01:36

doktor5000 wrote:Which file you can't find? For /etc/rc.local, that's a symlink to the actual file /etc/rc.d/rc.local:
Code: Select all
[doktor5000@Mageia2 ~]$ ls -la /etc/rc.local
lrwxrwxrwx 1 root root 13 Jun 17  2012 /etc/rc.local -> rc.d/rc.local


But maybe what you want is /etc/sysconfig/harddisks ?


well, no chance with these files, i did not find any of them
DjMarian
"When you're congratulated think if you deserve it, and if you think you do, don't be proud about it!" or something like that
Mageia 3 64bit LXDE, Atom 330, 2GB RAM
User avatar
djmarian
 
Posts: 51
Joined: Jun 1st, '11, 18:24
Location: Slatina, Romania

Re: optimizing power drain

Postby doktor5000 » Mar 26th, '13, 07:53

How did you search them? Please show the output of
Code: Select all
cat /etc/rc.local
and
Code: Select all
cat /etc/sysconfig/harddisks


Either you don't have hdparm installed (for /etc/sysconfig/harddisks)
Code: Select all
[doktor5000@Mageia2 ~]$ rpm -qf /etc/sysconfig/harddisks
hdparm-9.39-1.mga2

but if you don't have the other file, your system seems severely broken, as that belongs to initscripts package:
Code: Select all
[doktor5000@Mageia2 ~]$ rpm -qf /etc/rc.local
initscripts-9.34-20.mga2
[doktor5000@Mageia2 ~]$ rpm -qf /etc/rc.d/rc.local
initscripts-9.34-20.mga2
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: optimizing power drain

Postby Ken-Bergen » Mar 26th, '13, 08:40

doktor5000

He's running MGA3 and his output is correct.
From my Cauldron install.
Code: Select all
[root@localhost bin]# rpm -qf /etc/rc.d/rc.local                                                                                           
error: file /etc/rc.d/rc.local: No such file or directory                                                                                   
[root@localhost bin]#
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: optimizing power drain

Postby doktor5000 » Mar 26th, '13, 21:15

Well, then somebody else needs to take over and help, as i'm not running cauldron.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: optimizing power drain

Postby Ken-Bergen » Mar 27th, '13, 05:11

I took a look at two Cauldron installs and it seems hdpram is not installed if you use the Live DVD but can be added post install.

For /etc/rc.d/rc.local, create the file and put in the text, if it doesn't work no harm done.

I'll move this to "Testing : Alpha, Beta, RC and Cauldron" as that's where it belongs.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: optimizing power drain

Postby djmarian » Mar 29th, '13, 09:07

Ken-Bergen wrote: if it doesn't work no harm done.

and how do i find out if it works?
DjMarian
"When you're congratulated think if you deserve it, and if you think you do, don't be proud about it!" or something like that
Mageia 3 64bit LXDE, Atom 330, 2GB RAM
User avatar
djmarian
 
Posts: 51
Joined: Jun 1st, '11, 18:24
Location: Slatina, Romania

Re: optimizing power drain

Postby gohlip » Mar 29th, '13, 09:54

Mageia3 is (finally) now on systemd.
"/etc/rc.d/rc.local" won't work, try instead...
Code: Select all
systemctl -p rc-local.service

to show properties

Systemd is continually evolving and I am not too clear how to go about it so ...., say, to shut down a partitcular hard disk, I don't know.

[edit] oh...press 'q' to exit. Sorry did not mention this.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: optimizing power drain

Postby doktor5000 » Mar 29th, '13, 16:10

gohlip wrote:Systemd is continually evolving and I am not too clear how to go about it so ...., say, to shut down a partitcular hard disk, I don't know.

What has systemd to do with controlling device shutdown?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: optimizing power drain

Postby gohlip » Mar 29th, '13, 16:19

doktor5000 wrote:What has systemd to do with controlling device shutdown?


Well...djmarian wants to..
/etc/rc.d/rc.local file
#Spin down hard disks after 1 minute..

So /etc/rc.d/rc.local file won't work anymore with systemd
and rc-local is now at /etc/systemd/system
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: optimizing power drain

Postby doktor5000 » Mar 29th, '13, 16:42

/etc/rc.d/rc.local was normally only some workaround ...

You can run custom scripts or commands in many ways, not requiring systemd.
For a more proper solution see my first reply, last line.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: optimizing power drain

Postby gohlip » Mar 29th, '13, 17:11

Excuse me, gentlemen and ladies...talking to doktor5000 requires me to talk like doktor5500 :)

For a more proper solution see my first reply, last line.

which one? :)
Code: Select all
But maybe what you want is /etc/sysconfig/harddisks ?
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts


What about the following you do not understand?
So /etc/rc.d/rc.local file won't work anymore with systemd
and rc-local is now at /etc/systemd/system

And from http://www.freedesktop.org/wiki/Softwar ... dQuestions
Code: Select all
Q: I want to change a service file, but rpm keeps overwriting it in /usr/lib/systemd/system all the time, how should I handle this?

A: The recommended way is to copy the service file from /usr/lib/systemd/system to /etc/systemd/system and edit it there. The latter directory takes precedence over the former, and rpm will never overwrite it. If you want to use the distributed service file again you can simply delete (or rename) the service file in /etc/systemd/system again.


What has /etc/sysconfig/harddisks got to do with systemd?
systemd overides everything else.

You okay, doktor5000? Heh heh heh. No hard feelings, lan?
ps: our own wiki
https://wiki.mageia.org/en/Features/Systemd
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: optimizing power drain

Postby man_drake » Mar 29th, '13, 23:21

doktor5000 wrote:Well, then somebody else needs to take over and help, as i'm not running cauldron.


:P
man_drake
 
Posts: 24
Joined: Feb 18th, '13, 00:38

Re: optimizing power drain

Postby djmarian » Mar 30th, '13, 00:23

well this is fun... but
Code: Select all
dev-disk...Z702947.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart1.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart3.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart4.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart5.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart6.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2d0963d.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart1.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart3.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart4.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart5.device loaded active   plugged       SAMSUNG_HD322GJ
dev-disk...2dpart6.device loaded active   plugged       SAMSUNG_HD322GJ

so is there somewhere to change these things?

oh and about a question not answered
how do i stop mageia for waiting during boot for this hdd if i remove it, do i just delete it from fstab?
DjMarian
"When you're congratulated think if you deserve it, and if you think you do, don't be proud about it!" or something like that
Mageia 3 64bit LXDE, Atom 330, 2GB RAM
User avatar
djmarian
 
Posts: 51
Joined: Jun 1st, '11, 18:24
Location: Slatina, Romania

Re: optimizing power drain

Postby gohlip » Mar 30th, '13, 07:26

how do i stop mageia for waiting during boot for this hdd if i remove it, do i just delete it from fstab?

Yes, but there are a few things to watch out for.
First, make sure the removed hard drive is not the sda (mbr) otherwise you will not be able to boot,
and if using grub-legacy, recheck menu.lst to ensure device mapping is to right drive.
Then make sure there are no partition there required by Mageia.
And no directories/files sym-linked to it.
And swap: is it there also? (but you can create a new one in connected hard drive with a new fstab entry)
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: Google [Bot] and 1 guest