LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-12-2007, 05:07 PM   #1
Tortanick
Member
 
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299

Rep: Reputation: 30
Saving power on a samba server


I'm running a headless debian etch samba server, it works great but I was wondering if there is any ways to reduce its power consumption. Such as putting it into sleap untill someone starts a transfer. Or useing cron to turn it off at night, but only if no one is in the middle of a transfer.

Note that this server has both Linux and Windows clients, the Linux clients mount directories, the Windows clients use mapped network drives.
 
Old 02-12-2007, 06:27 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
For my file server, I wrote a simple script that parsed the output of an nmap ping scan to detect if there were any other hosts alive on the LAN.

It would do this every 5 minutes or so from a cron job, and would shut the system down when it no longer saw other hosts up. It certainly isn't perfect, but it works fairly well.

Beyond that, you could also look into spinning down the HDDs after a certain period of inactivity.
 
Old 02-13-2007, 03:06 AM   #3
Tortanick
Member
 
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299

Original Poster
Rep: Reputation: 30
Nice script, can I have a copy?

And how do you do that to HDs?
 
Old 02-13-2007, 03:24 AM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
To control the drives, you would use the hdparm command, specifically with the -S option. Here is a bit of information on that.

I can get the script off of the server, but be warned, it is the first Bash script I have ever wrote (I think I wrote it in 2003 or so); and as such, is complete and utter trash. It does seem to work well enough though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
power saving linuxmandrake Debian 2 10-28-2005 06:48 AM
Power saving? elvee Linux - Hardware 5 09-18-2004 06:44 PM
Power saving? kleptophobiac Linux - Laptop and Netbook 2 07-18-2004 10:38 PM
Problem saving files on Samba / W2000 server heberle Linux - Networking 7 05-14-2004 05:40 AM
Power saving Sigmund Gudvang Linux - General 1 08-31-2002 06:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration