Re: Anyone using sysutils/nut ?
Mikhail Goriachev wrote: Tuc at T-B-O-H wrote: Tuc at T-B-O-H wrote: The issue isn't with the upsmon or SHUTDOWNCMD... Its with the fact that /etc/killpower gets set, and somewhere you need to put upsdrvctl shutdown. Its during the shutdown -p now that at some point needs to be run, and if its run in /etc/rc.shutdown then the shutdown isn't finished and shutting it off at that point the filesystems are dirty. Oh, I see the dilemma now. In my case my box powers off but the UPS stays on till it drastically dies (if power is still unavailable). You're trying to shutdown both the system and the UPS, aren't you? Exactly, yes. So then they can automatically come back up again when power returns. That what I want to do, yea. I think I'm finding that the UPS I bought (MGE Ellipse Pulsar) isn't really a UPS, but a toy. Now to decide if I give the next step up (Evolution) a try or is it just wasting more money. I got an MGE Pulsar EXtreme C 3200. In current setup it lasts for hours. When deployed, my main objective was to shutdown the box, hence saving it from disasters. I never considered doing the same with the UPS. I guess it is time for me to finish the job. How unlucky. I can't get my UPS to power off: $/usr/local/libexec/nut/upsdrvctl shutdown Network UPS Tools - UPS driver controller 2.0.3 Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.65 (2.0.3) Unable to get Report Descriptor Driver failed to start (exit status=1) Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: [EMAIL PROTECTED] Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Mikhail Goriachev wrote: Tuc at T-B-O-H wrote: Tuc at T-B-O-H wrote: The issue isn't with the upsmon or SHUTDOWNCMD... Its with the fact that /etc/killpower gets set, and somewhere you need to put upsdrvctl shutdown. Its during the shutdown -p now that at some point needs to be run, and if its run in /etc/rc.shutdown then the shutdown isn't finished and shutting it off at that point the filesystems are dirty. Oh, I see the dilemma now. In my case my box powers off but the UPS stays on till it drastically dies (if power is still unavailable). You're trying to shutdown both the system and the UPS, aren't you? Exactly, yes. So then they can automatically come back up again when power returns. That what I want to do, yea. I think I'm finding that the UPS I bought (MGE Ellipse Pulsar) isn't really a UPS, but a toy. Now to decide if I give the next step up (Evolution) a try or is it just wasting more money. I got an MGE Pulsar EXtreme C 3200. In current setup it lasts for hours. When deployed, my main objective was to shutdown the box, hence saving it from disasters. I never considered doing the same with the UPS. I guess it is time for me to finish the job. How unlucky. I can't get my UPS to power off: $/usr/local/libexec/nut/upsdrvctl shutdown Network UPS Tools - UPS driver controller 2.0.3 Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.65 (2.0.3) Unable to get Report Descriptor Driver failed to start (exit status=1) Only another reason I regret MGE. Tuc/TBOH ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
I'm going by : /usr/local/share/doc/nut/shutdown.txt Subsection How you set it up, item #2 : 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know when to power off the UPS. You must check for this file, as you don't want this to happen during normal shutdowns! You can use upsdrvctl to start the shutdown process in your UPS hardware. Use this script as an example, but change the paths to suit your system: My bad. I did edit rc.shutdown on both a 5.4 and a 6.0 system with no troubles. The end of my file shows this: # Inserted next 5 lines March 13, 2006 for UPS shutdown. if (test -f /etc/killpower) then echo Killing the power, bye! /usr/local/libexec/nut/upsdrvctl shutdown fi echo '.' exit 0 But doesn't that immediately shut down your system causing it to need FSCK when it comes back up? Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
--- Scott Tuc Ellentuch at T-B-O-H [EMAIL PROTECTED] wrote: I'm going by : /usr/local/share/doc/nut/shutdown.txt Subsection How you set it up, item #2 : 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know when to power off the UPS. You must check for this file, as you don't want this to happen during normal shutdowns! You can use upsdrvctl to start the shutdown process in your UPS hardware. Use this script as an example, but change the paths to suit your system: My bad. I did edit rc.shutdown on both a 5.4 and a 6.0 system with no troubles. The end of my file shows this: # Inserted next 5 lines March 13, 2006 for UPS shutdown. if (test -f /etc/killpower) then echo Killing the power, bye! /usr/local/libexec/nut/upsdrvctl shutdown fi echo '.' exit 0 But doesn't that immediately shut down your system causing it to need FSCK when it comes back up? Thanks, Tuc I did not observe this happening. Is there any other way? What tips did you get on the nut list? Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Scott Tuc Ellentuch at T-B-O-H wrote: I'm going by : /usr/local/share/doc/nut/shutdown.txt Subsection How you set it up, item #2 : 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know when to power off the UPS. You must check for this file, as you don't want this to happen during normal shutdowns! You can use upsdrvctl to start the shutdown process in your UPS hardware. Use this script as an example, but change the paths to suit your system: My bad. I did edit rc.shutdown on both a 5.4 and a 6.0 system with no troubles. The end of my file shows this: # Inserted next 5 lines March 13, 2006 for UPS shutdown. if (test -f /etc/killpower) then echo Killing the power, bye! /usr/local/libexec/nut/upsdrvctl shutdown fi echo '.' exit 0 But doesn't that immediately shut down your system causing it to need FSCK when it comes back up? Hi, I got the following line in /usr/local/etc/nut/upsmon.conf: SHUTDOWNCMD /sbin/shutdown -p now As far as I'm concerned the system powers off cleanly without the need of FSCK. Cheers, Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: [EMAIL PROTECTED] Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Scott Tuc Ellentuch at T-B-O-H wrote: I'm going by : /usr/local/share/doc/nut/shutdown.txt Subsection How you set it up, item #2 : 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know when to power off the UPS. You must check for this file, as you don't want this to happen during normal shutdowns! You can use upsdrvctl to start the shutdown process in your UPS hardware. Use this script as an example, but change the paths to suit your system: My bad. I did edit rc.shutdown on both a 5.4 and a 6.0 system with no troubles. The end of my file shows this: # Inserted next 5 lines March 13, 2006 for UPS shutdown. if (test -f /etc/killpower) then echo Killing the power, bye! /usr/local/libexec/nut/upsdrvctl shutdown fi echo '.' exit 0 But doesn't that immediately shut down your system causing it to need FSCK when it comes back up? Hi, I got the following line in /usr/local/etc/nut/upsmon.conf: SHUTDOWNCMD /sbin/shutdown -p now As far as I'm concerned the system powers off cleanly without the need of FSCK. Cheers, Mikhail. The issue isn't with the upsmon or SHUTDOWNCMD... Its with the fact that /etc/killpower gets set, and somewhere you need to put upsdrvctl shutdown. Its during the shutdown -p now that at some point needs to be run, and if its run in /etc/rc.shutdown then the shutdown isn't finished and shutting it off at that point the filesystems are dirty. Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Tuc at T-B-O-H wrote: The issue isn't with the upsmon or SHUTDOWNCMD... Its with the fact that /etc/killpower gets set, and somewhere you need to put upsdrvctl shutdown. Its during the shutdown -p now that at some point needs to be run, and if its run in /etc/rc.shutdown then the shutdown isn't finished and shutting it off at that point the filesystems are dirty. Oh, I see the dilemma now. In my case my box powers off but the UPS stays on till it drastically dies (if power is still unavailable). You're trying to shutdown both the system and the UPS, aren't you? So then they can automatically come back up again when power returns. Cheers, Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: [EMAIL PROTECTED] Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Tuc at T-B-O-H wrote: The issue isn't with the upsmon or SHUTDOWNCMD... Its with the fact that /etc/killpower gets set, and somewhere you need to put upsdrvctl shutdown. Its during the shutdown -p now that at some point needs to be run, and if its run in /etc/rc.shutdown then the shutdown isn't finished and shutting it off at that point the filesystems are dirty. Oh, I see the dilemma now. In my case my box powers off but the UPS stays on till it drastically dies (if power is still unavailable). You're trying to shutdown both the system and the UPS, aren't you? Exactly, yes. So then they can automatically come back up again when power returns. That what I want to do, yea. I think I'm finding that the UPS I bought (MGE Ellipse Pulsar) isn't really a UPS, but a toy. Now to decide if I give the next step up (Evolution) a try or is it just wasting more money. Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Tuc at T-B-O-H wrote: Tuc at T-B-O-H wrote: The issue isn't with the upsmon or SHUTDOWNCMD... Its with the fact that /etc/killpower gets set, and somewhere you need to put upsdrvctl shutdown. Its during the shutdown -p now that at some point needs to be run, and if its run in /etc/rc.shutdown then the shutdown isn't finished and shutting it off at that point the filesystems are dirty. Oh, I see the dilemma now. In my case my box powers off but the UPS stays on till it drastically dies (if power is still unavailable). You're trying to shutdown both the system and the UPS, aren't you? Exactly, yes. So then they can automatically come back up again when power returns. That what I want to do, yea. I think I'm finding that the UPS I bought (MGE Ellipse Pulsar) isn't really a UPS, but a toy. Now to decide if I give the next step up (Evolution) a try or is it just wasting more money. I got an MGE Pulsar EXtreme C 3200. In current setup it lasts for hours. When deployed, my main objective was to shutdown the box, hence saving it from disasters. I never considered doing the same with the UPS. I guess it is time for me to finish the job. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: [EMAIL PROTECTED] Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
At 10:54 AM -0400 5/22/06, Scott Tuc Ellentuch at T-B-O-H wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. I seem to recall someone saying that the best way to do this was to create some flag-file, and then reboot instead of shutdown. Then very early in the system-startup you look for that flag-file, and run 'upsdrvctl shutdown'. Since you just successfully went through the complete shutdown, all the disks should be in a safe state. So, the UPS will yank the power out from under the computer, but it won't matter. The trick, of course, is to add some logic there so you can boot up after the power has returned! Either check the last-change date of the flag-file, or maybe do something to re-mount '/' as writable, delete the one file, and re-mount it back as read-only. I have never done any of this with my own UPS, so I'm not sure of the details... :-) -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
At 10:54 AM -0400 5/22/06, Scott Tuc Ellentuch at T-B-O-H wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. It occurs to me that I did save away the message that said the right way to do it: At 11:21 AM -0700 5/19/00, Mike Smith wrote: The canonical way to do this is actually to shudown and reboot. In the _startup_ phase, while the root filesystem is still mounted readonly, you check the UPS status. At this point, you have access to the disk in a read-only fashion, and you can power-off (or have the UPS die) at any time. So, you don't create any flag-file as I had guessed in my previous message. The one thing you need to make sure if is that your UPS-reading program can *run* before /usr is mounted. You could test that by booting up in single-user mode, and see if the program works. -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Anyone using sysutils/nut ?
Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
I use nut. The port puts an rc script in /usr/local/etc/rc.d to start and stop nut. -Derek At 09:54 AM 5/22/2006, Scott Tuc Ellentuch at T-B-O-H wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
Hi Derek, This isn't starting and stopping nut, this is shutting the UPS itself off. The supplied scripts don't take care of anything having to do with upsdrvctl doing a shutdown, only a stop or start. Tuc I use nut. The port puts an rc script in /usr/local/etc/rc.d to start and stop nut. -Derek At 09:54 AM 5/22/2006, Scott Tuc Ellentuch at T-B-O-H wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
--- Scott Tuc Ellentuch at T-B-O-H [EMAIL PROTECTED] wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. You don't. Instead, use the nut configuration files (ups.conf, upsd.conf, upsmon.conf, hosts.conf, upsd.users). upsdrvctl is called internally from upsd. That is how I understand it. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
--- Scott Tuc Ellentuch at T-B-O-H [EMAIL PROTECTED] wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. You don't. Instead, use the nut configuration files (ups.conf, upsd.conf, upsmon.conf, hosts.conf, upsd.users). upsdrvctl is called internally from upsd. That is how I understand it. I'm going by : /usr/local/share/doc/nut/shutdown.txt Subsection How you set it up, item #2 : 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know when to power off the UPS. You must check for this file, as you don't want this to happen during normal shutdowns! You can use upsdrvctl to start the shutdown process in your UPS hardware. Use this script as an example, but change the paths to suit your system: if (test -f /etc/killpower) then echo Killing the power, bye! /usr/local/ups/bin/upsdrvctl shutdown sleep 120 # uh oh... the UPS poweroff failed! # you probably should reboot here to avoid getting stuck # *** see the section on power races below *** fi (There is more.) In talking to the people on the NUT list, no one mentioned that it was called from upsd. Thanks, Tuc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Anyone using sysutils/nut ?
--- Scott Tuc Ellentuch at T-B-O-H [EMAIL PROTECTED] wrote: --- Scott Tuc Ellentuch at T-B-O-H [EMAIL PROTECTED] wrote: Hi, I'd like to find out where to put the upsdrvctl shutdown in the shutdown process. Putting it in rc.shutdown causes me to have dirty filesystems constantly that sometimes don't allow the system to come up. You don't. Instead, use the nut configuration files (ups.conf, upsd.conf, upsmon.conf, hosts.conf, upsd.users). upsdrvctl is called internally from upsd. That is how I understand it. I'm going by : /usr/local/share/doc/nut/shutdown.txt Subsection How you set it up, item #2 : 2. Edit your shutdown scripts to check for the POWERDOWNFLAG so they know when to power off the UPS. You must check for this file, as you don't want this to happen during normal shutdowns! You can use upsdrvctl to start the shutdown process in your UPS hardware. Use this script as an example, but change the paths to suit your system: My bad. I did edit rc.shutdown on both a 5.4 and a 6.0 system with no troubles. The end of my file shows this: # Inserted next 5 lines March 13, 2006 for UPS shutdown. if (test -f /etc/killpower) then echo Killing the power, bye! /usr/local/libexec/nut/upsdrvctl shutdown fi echo '.' exit 0 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]