General discussion

Locked

Remote shutdown in linux

By asgr86 ·
hello

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

I suggest a rsh to each system and shut it down.

by X-MarCap In reply to Remote shutdown in linux

This is brute force, but pretty solid.

Edit the .rhosts file in root's home directory. Put in your control machine's name.

rsh to every machine that on the list and create this simple script on each box in /usr/local/bin and call it nightly_turnoff.sh.


#!/bin/sh
cd /
shutdown -i0 -g0 -y

in your master script

#!/bin/sh
rsh boy0 /usr/local/bin/nightly_turnoff.sh

Just replace boy0 with the name for your systems and duplicate it with many lines.

The last line on your script is to run the script on your own machine...

Collapse -

Remote Shutdown

by asgr86 In reply to I suggest a rsh to each s ...

hi, Thanks for the reply

Collapse -

this script all runs from the linux box.

by X-MarCap In reply to I suggest a rsh to each s ...

This just takes a few minutes of setup.

1. You should be root on a linux box.
2. put the .rhosts in every ~root that needs shutdown.

the cron entry should look like this:

00 22 * * * /usr/local/bin/nightly_turnoff

Collapse -

Wait a second

by jmgarvin In reply to Remote shutdown in linux

Let's address the cause and not just us a band-aid.

1) Why are they crashing? Have you looked at the logs?
2) Why is the performance going down? top will let you see what is running and ps aux (as root) will let you see all running processes.
3) Free disk space and swap space can be the cause
4) Hardware, heat, and other causes have been investigated?
5) If you are running older Dell systems with RAID controllers, update the RAID driver.

As for rebooting remotely, why bother, just setup a cron job that reboots your machines everyday at 11:55pm.

crontab -e
55 23 * * * reboot

There you go...

Collapse -

Remote Shutdown

by asgr86 In reply to Wait a second

thanz
Sai.Gunaranjan

Collapse -

cron job

by jmgarvin In reply to Remote Shutdown

Just setup the cron job like I and the others have suggested.

You just push the script to the machines and be done with it.

Back to Linux Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums