LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-12-2006, 01:20 PM   #1
eppur_si_muove
LQ Newbie
 
Registered: Feb 2006
Posts: 7

Rep: Reputation: 0
Setting up an energy efficient server -- Windows better than Linux?


Hi everyone -- I am new to Linux, using Xandros for the first time on a home server to share files and backup lots of Windows XP clients. I want to administer this server in the most energy efficient way.

I have succeeded in using "Wake on LAN" to remotely powerup the Linux server from the Windows clients. But I cannot find a way to remotely shutdown the Linux server from the Windows clients. I don't want to run the server on a timer, because the uptime I need will vary on different occasions. I want the Linux server shutdown to occur when demanded by a client.

In Windows, there are many freeware tools allowing a client to remotely shutdown a Windows server when it's not needed, saving about 100 watts of electricity (=$90 a year). Here's one of them:

users.pandora.be/jbosman/poweroff/poweroff.htm

Others I've asked say there is not an equivalent tool I can run on my Windows XP clients to remotely shutdown a Linux server. Really? I'll throw this out as a challenge to all the Linux partisans on this list, because as it now appears, for an energy efficient, ecologically responsible server, Windows beats Linux. Ideas anyone?

Thanks - Amir

Last edited by eppur_si_muove; 02-12-2006 at 01:31 PM.
 
Old 02-12-2006, 02:11 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 168Reputation: 168
It sounds like you need hardware that supports hibernate modes, a kernel with support for those power saving modes and SSH so you can remote in and issue commands. I haven't tried this - there's a lot of different metrics I've seen over the years for evaluating Linux servers but being able to shut one down from Windows isn't one of them
 
Old 02-12-2006, 03:29 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
It could be done as easily as writing a shell-script that shuts
the sever down, and access that script from /etc/hosts.allow when
the box is being contacted on a given port. All it would take
on the windows box is a bookmark to http://server:port , you click
that, and down she goes ...


Cheers,
Tink
 
Old 02-12-2006, 05:04 PM   #4
eppur_si_muove
LQ Newbie
 
Registered: Feb 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Tink, thank you for that suggestion. Write a script? As in my own program?? It's intriguing, but I've never done that before, and "just" learning to write scripts is not on the cards.

Is there no easy way for a person VERY new to Linux servers (that is, me) to configure existing options in the Xandros distro, or to install someone else's program, to enable a client to shutdown the server by remote command? There must be a dozen freeware programs available which enable Windows servers to do exactly that.

It's easy to deride Windows and Microsoft for making heaps of money, but if they make it easier for home users to set up energy efficient and ecological servers, that is a very big deal. Any ecologically-minded coders out there?

Last edited by eppur_si_muove; 02-12-2006 at 05:05 PM.
 
Old 02-12-2006, 05:08 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
Well ... it's next to trivial if you have putty on the windows
box, really. Open a session to the server and do
sudo /sbin/poweroff

Slightly safer against accidental shutdowns ;)


Cheers,
Tink
 
Old 02-12-2006, 05:16 PM   #6
eppur_si_muove
LQ Newbie
 
Registered: Feb 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, telnetting from Windows to the Linux box is one option, and I struggled mightily to make it work before posting my question on this list. Trouble is, whenever I attempt to telnet to the Linux box, it won't accept the connection. In the time it would take me at my skill level to diagnose the hitch in the Xandros distro which rejects incoming telnet requests, I could reinstall Windows XP on the server.

Again, I'm after a SIMPLE, direct, minimally inventive solution here please: a solution which resembles "click to shut down server". That kind of simplicity is just imperative, if a household of non-experts are going to use it correctly. In the interest of finding that solution, please don't post to this thread unless it's a suggestion aimed at that outcome.
 
Old 02-12-2006, 05:26 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 168Reputation: 168
If all you're doing is using the Linux box to hold shared files and backups - why not just get an external hard drive and plug it into your USB port when you need it. You can create a Windows share so that other users can see it.

I should point out that I wasn't deriding MS or Windows. Also, it's not MS making it easier for you to do this under Windows - it's software developers who are providing their work free of charge
 
Old 02-12-2006, 05:50 PM   #8
eppur_si_muove
LQ Newbie
 
Registered: Feb 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, thanks for the clever alternative, but it's not what I asked. Can we stay on topic please? How to make a Linux sever shut down remotely and easily????
 
Old 02-12-2006, 06:05 PM   #9
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Create a new user
and add the following script to its .profile
nohup shutdown -now

If you login to your system with that user account it with shutdown.
if shutdown is allowed by that user

Last edited by arno; 02-12-2006 at 06:07 PM.
 
Old 02-12-2006, 06:16 PM   #10
eppur_si_muove
LQ Newbie
 
Registered: Feb 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Arno, how to trigger the shutdown from a Windows client then? I don't see that.
 
Old 02-12-2006, 06:18 PM   #11
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
You use telnet on a windows pc to login on your linux box
 
Old 02-12-2006, 06:25 PM   #12
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster
Well ... it's next to trivial if you have putty on the windows
box, really. Open a session to the server and do
sudo /sbin/poweroff

Slightly safer against accidental shutdowns
What is wrong with this advice? Telnet is deprecated and your Xandros probably does not have the telnet server running, but I'm sure it has ssh server running.
 
Old 02-12-2006, 06:44 PM   #13
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Sorry I missed the fact that telnet was not an option.

Create a script with a loop in it and a sleep timer, let the script test is a map contains a file.
If the script finds a file then remove that file and start the shutdown instruction.
Make sure that the script is active after the system startup.


Setup ftp or samba to give a certain user access to that map to write a file
 
Old 02-12-2006, 07:50 PM   #14
shaunw
Member
 
Registered: Dec 2005
Posts: 77

Rep: Reputation: 15
Thumbs down Everything for free

Essentially it seems you want a free operating system and
some free programming to make it do what you want it to do
and you want to save money on your electricity bill.
Try giving something for a change instead of demanding things
from other people.
Just stick to paying for Windows instead of wasting your time
annoying people on this site.
Is this on topic and concise enough for you?
 
Old 02-12-2006, 07:56 PM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
Quote:
Originally Posted by eppur_si_muove
Yes, thanks for the clever alternative, but it's not what I asked. Can we stay on topic please? How to make a Linux sever shut down remotely and easily????
I really must say that I find the tone of your last couple
of responses quite obnoxious. You're coming here, getting
advice from people for free (in their own spare time) and
you're making demands as to what kind of advice it's got
to be?

"I want that free car, but can't be bothered to learn stick,
make it an automatic, and quickly."


Cheers,
Tink
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Solutions for the Energy Crises -- Part 1: Alternate Energy and Conservation LXer Syndicated Linux News 0 02-03-2006 11:16 AM
energy efficient apache server paranoid times Linux - General 10 10-24-2005 11:01 PM
Tutorials/Guidance on setting up a Linux file Server (on a Windows network) Smiles483 Linux - Networking 4 08-26-2005 06:27 AM
Fastest, most efficient server Input DirtyDan Programming 5 02-08-2005 04:25 AM
Setting up linux networking on windows server david.cormie Linux - Networking 8 07-22-2004 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration