Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Is there a way to send a shutdown command from my main DNS_323 to my two other DNS_323.
They are connected to the same UPS but only one had the USB between the NAS and the UPS.
I would like to have a shutdown request sent so they all shutdown when an outage occurs.
My UPS doesnt have the option to perform that.
Thanks
Offline
If you have ssh setup with keypairs you could probably do smthng like this:
ssh root@dns323_1 'shutdown'
ssh root@dns323_2 'shutdown'
You could also poll for when the main dns323 goes down. Shedule a job in cron in other two dns323. In case main dns323 does not respond to ping then shutdown.
I hope that helped.
Last edited by bjby (2009-12-22 02:24:36)
Offline
I never scripted in unix... any example on how I can check the status of the main DNS323 using cron?
Thanks
Offline
You can try to add this command below to cron for start. For your purpose you need to write
some if blocks around it around it. But you an do it. Good luck.
/ffp/bin/ping -c 1 127.0.0.1 | /ffp/bin/grep packet >> /mnt/HD_a2/testcron.log
http://www.cyberciti.biz/faq/how-do-i-a … unix-oses/
http://www.freeos.com/guides/lsst/
Offline
bjby wrote:
You can try to add this command below to cron for start. For your purpose you need to write
some if blocks around it around it. But you an do it. Good luck.
/ffp/bin/ping -c 1 127.0.0.1 | /ffp/bin/grep packet >> /mnt/HD_a2/testcron.log
http://www.cyberciti.biz/faq/how-do-i-a … unix-oses/
http://www.freeos.com/guides/lsst/
Out of curiosity - in this particular scenario what purpose would pinging the "local host" serve??
Offline
Hi helsan,
Using "nut" you can achieve what you want. Designate one DNS-323 as a master, and the other two as slaves units. You will need to install nut on all three units. Correctly configured, the master DNS-323 will communicate with the UPS and send the shutdown commands to the slaves when the battery on the UPS gets low, then shut itself down.
You mentioned that your UPS has a USB port, so you can connect the UPS to one of the DNS-323, set this DNS-323 as a master in nut, and the other two using nut as slaves.
FYI, if your UPS has only a serial port you will have a significantly greater degree of difficulty. For a start you will have to add serial port h/w to your primary DNS-323, but even then I recall having lots of problems getting this working, as UPS serial port communications is not simple Tx/Rx. They use all sorts of tricks used with DTS/DTR lines which are not supported with the DNS-323 serial port. I recall getting simple comms working, but not battery state. So shutdown timers are required as well.
It must be said that nut has a pretty steep learning curve, and while reasonably well documented there is a lot to wade through to get it to work.
Regards,
Andrew.
Offline
Just so that you are aware, with firmware versions 1.06 and later, nut - network UPS tools - is already installed, so it's essentially a matter or configuring it to do what you want.
Offline
Thanks for the 'nut' tools.
Was easy to Install.... but Im now receiving : Can't open POWERWARE USB device
It is with a APC UPS ES 650
Any idea where I could find more guides on the NUT??
Thanks
Offline
Also giving this error:
No matching USB/HID UPS found
Driver failed to start (exit status=1)
Offline
When issuing command LSUSB i get the following:
root@xxxxxxxxx:~# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
And on my DNS-323 status page:
Manufacturer: APC
Product: Back-UPS ES 650 FW:818.w1.D USB FW:w1
Battery Charge: N/A
Status : N/A
Offline
helsan wrote:
When issuing command LSUSB i get the following:
root@xxxxxxxxx:~# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
And on my DNS-323 status page:
Manufacturer: APC
Product: Back-UPS ES 650 FW:818.w1.D USB FW:w1
Battery Charge: N/A
Status : N/A
Which version of firmware are you running on the DNS323? If 1.06 or later then you'll need to disable built-in UPS support. I do that through a script that loads at startup;
############################################
# Stop built in NUT UPS deamons in preparation for starting ffp NUT UPS #
############################################
if ps | grep /usr/local/ups/bin/usbhid-ups | grep -v grep
then
echo "* Stopping Default UPS Services"
# Stop NUT Network Server
/sys/crfs/sbin/upsd -c stop
# Stop NUT driver for UPS hardware.
/sys/crfs/sbin/upsdrvctl stop
fi
sleep 2
Offline