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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-12-2007, 05:07 PM
|
#1
|
Member
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299
Rep:
|
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.
|
|
|
02-12-2007, 06:27 PM
|
#2
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
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.
|
|
|
02-13-2007, 03:06 AM
|
#3
|
Member
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299
Original Poster
Rep:
|
Nice script, can I have a copy?
And how do you do that to HDs?
|
|
|
02-13-2007, 03:24 AM
|
#4
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
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.
|
|
|
All times are GMT -5. The time now is 05:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|