April 29, 200818 yr Hi, I have a number of machines all with UPS's. I was thinking that one of my Windows machines could run an app or script that shuts down my UNRaid machine when there's a power outage. What ways are available to me to doing that? I presume I could telnet in, log in, run "shutdown " with some parameters maybe? Is that clean enough to be useful? (I'm not a Linux guru, although I might be a guru on other platform(s)... ;-) ) This method sounds error prone--if timing isn't just right. Is there a better, more foolproof way to remotely, and cleanly shutdown an UNRaid machine? Thanks, Tony
April 29, 200818 yr There used to be a shell script of commands to stop the unRAID server. It does not seem to be there in the most current beta. In any case, basically it did this, you can do it by hand: cd samba stop sync fuser -km /mnt/user for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 do fuser -km /mnt/disk${i} umount /dev/md${i} done /root/mdcmd stop poweroff
April 29, 200818 yr See this thread. http://lime-technology.com/forum/index.php?topic=812.0 I have some updates to the powerdown script, but for the most part what is there should work.
April 29, 200818 yr Author Cool! now... How do I trigger this in a foolproof way from a Windows box? (my goal being when my windows box is notified of a power outage from its UPS, it will shut down the UNRAID machine, since I know of no other way to shutdown my UNRAID machine automatically in a power outage--and we have relatively frequent, long power outages). Thanks!
May 1, 200818 yr don't most power monitoring softwares have the option to, as part of the alert, run a specific program?
May 1, 200818 yr Author Absolutely, we can trigger a program, a script, a .net app, a batch file. The question would be what program or script or whatever should we use to get the message from a Windows box over to UNRAID to shut down. What combination of programs would do it? I assume that trying to start from scratch building a shell to a telnet and feeding it text with delays is un-ideal and error prone. Is there some app, or telnet client, or command-line program that would simplify the process of executing the above commands on the UNRAID machine--calling them from an external Windows box. Thanks, Tony
May 1, 200818 yr The thread link I provided above mentions the use of the telnet scripting tool. Other then that the only option is to use wget or some other program to connect/press buttons on the web interface. First a stop, then a power down.
May 1, 200818 yr Author Okay. Sorry somehow I overlooked that very important link above. Yes that answers my question! :-) Thanks again! Tony
October 18, 201015 yr In normal use, I would expect that an Xserve is seldom shutdown - so that doesnt seem like a really important issue, per se. The problem would likely be some errant process. The system.log should show a line or two for some process or app that refuses to quit. There may be some other, more relevant log used by OS X Server, but Im not that familiar with Server. Offtop, I'm a happy owner of http://www.ps2netdrivers.net/driver/panasonic.nv-gs300/ :-)
Archived
This topic is now archived and is closed to further replies.