wgstarks Posted September 11, 2015 Share Posted September 11, 2015 Will powerdown-r work via telnet? Quote Link to comment
trurl Posted September 11, 2015 Share Posted September 11, 2015 Will powerdown-r work via telnet? powerdown -r must have the space or Linux is going to look for some command actually named powerdown-r Quote Link to comment
wgstarks Posted September 11, 2015 Share Posted September 11, 2015 Will powerdown-r work via telnet? powerdown -r must have the space or Linux is going to look for some command actually named powerdown-r Had it right on my quick reference list. Guess the list doesn't do much good if I don't check it. Quote Link to comment
dlandon Posted September 11, 2015 Author Share Posted September 11, 2015 Will powerdown-r work via telnet? Or just reboot. Does the same thing. Quote Link to comment
aptalca Posted September 11, 2015 Share Posted September 11, 2015 When I reboot my system without the ctrl key I find a file syslog.zip in boot/Logs. I think this is the one saved by Powerdown. It doesn't have this line in the log- JacoBack powerdown[9248]: Powerdown V2.18, but it does have a line that references Powerdown V2.18. I can't attach logs in this forum but here's an example. syslog.zip. Maybe this isn't the log being mentioned? The powerdown plugin replaces the standard unRAID powerdown script. No matter how the system is shutdown, powerdown will always be run. Here is the sequence of operations with each different click of the reboot: - Click "Reboot". The emhttp sequence is run to stop the array and reboot. This is the same as pressing the stop button on the webgui, and then clicking reboot. - Click "Reboot" with the CTRL key pressed. Powerdown is executed to stop all running tasks, unmount the drives, and then reboot. This is the same as typing "reboot" at the console. Either sequence gets you the syslog saved. If the array has been stopped when powerdown is called, it will merely save the log and reboot the systen. The difference is that the emhttp initiated reboot can sometimes get hung waiting for a task to stop. This is the situation where you see the unmounting drives message on the screen constantly. Powerdown is a bit more forceful and will shut down the array even if a task is keeping it from doing that. When powerdown is used to shut down the array and unmount the drives, you will see in the log a long list of entries where it is performing the work. If it's only a few lines at the end, the array has already been stopped. The million dollar question is, does the built in apcupsd plugin initiate the emhttp method or powerdown in case of power loss? The gui restart is fine if it hangs, because if someone presses the button, that means someone is watching to make sure it really powers down. But when it's initiated by power loss, that means most likely nobody is watching and if it hangs, you get unclean shutdown. If powerdown is initiated and it is the one that is replaced by the script, no problem. Thanks Quote Link to comment
dlandon Posted September 11, 2015 Author Share Posted September 11, 2015 When I reboot my system without the ctrl key I find a file syslog.zip in boot/Logs. I think this is the one saved by Powerdown. It doesn't have this line in the log- JacoBack powerdown[9248]: Powerdown V2.18, but it does have a line that references Powerdown V2.18. I can't attach logs in this forum but here's an example. syslog.zip. Maybe this isn't the log being mentioned? The powerdown plugin replaces the standard unRAID powerdown script. No matter how the system is shutdown, powerdown will always be run. Here is the sequence of operations with each different click of the reboot: - Click "Reboot". The emhttp sequence is run to stop the array and reboot. This is the same as pressing the stop button on the webgui, and then clicking reboot. - Click "Reboot" with the CTRL key pressed. Powerdown is executed to stop all running tasks, unmount the drives, and then reboot. This is the same as typing "reboot" at the console. Either sequence gets you the syslog saved. If the array has been stopped when powerdown is called, it will merely save the log and reboot the systen. The difference is that the emhttp initiated reboot can sometimes get hung waiting for a task to stop. This is the situation where you see the unmounting drives message on the screen constantly. Powerdown is a bit more forceful and will shut down the array even if a task is keeping it from doing that. When powerdown is used to shut down the array and unmount the drives, you will see in the log a long list of entries where it is performing the work. If it's only a few lines at the end, the array has already been stopped. The million dollar question is, does the built in apcupsd plugin initiate the emhttp method or powerdown in case of power loss? The gui restart is fine if it hangs, because if someone presses the button, that means someone is watching to make sure it really powers down. But when it's initiated by power loss, that means most likely nobody is watching and if it hangs, you get unclean shutdown. If powerdown is initiated and it is the one that is replaced by the script, no problem. Thanks When powerdown is installed all power events are sent to the powerdown plugin, including apcupsd. Please re-read the OP and you'll see this described there. Quote Link to comment
wgstarks Posted September 11, 2015 Share Posted September 11, 2015 When powerdown is installed all power events are sent to the powerdown plugin, including apcupsd. Please re-read the OP and you'll see this described there. It was that statement in the OP that confused me to start with. Just to make sure I'm understanding correctly; Powerdown handles power events differently depending on how that power event was initiated, so the end result can be different from one type of power event to another. Is that right? Sorry if I'm being a little dense. Just trying to get a basic understanding. Quote Link to comment
dlandon Posted September 11, 2015 Author Share Posted September 11, 2015 When powerdown is installed all power events are sent to the powerdown plugin, including apcupsd. Please re-read the OP and you'll see this described there. It was that statement in the OP that confused me to start with. Just to make sure I'm understanding correctly; Powerdown handles power events differently depending on how that power event was initiated, so the end result can be different from one type of power event to another. Is that right? Sorry if I'm being a little dense. Just trying to get a basic understanding. No. All power events are the same with powerdown handling them. The only difference is whether or not the computer is powered off. Quote Link to comment
dlandon Posted September 14, 2015 Author Share Posted September 14, 2015 I've put together a plugin that is called 'open.files' that shows what process has files open, and what files are potentially preventing an array shutdown. The post about the plugin is here: http://lime-technology.com/forum/index.php?topic=42881.0 This can help you with troubleshooting what processes are holding files open. Quote Link to comment
jbuszkie Posted September 21, 2015 Share Posted September 21, 2015 Ok.. please excuse my ignorance here.. I'm running a really old powerdown (1.02)! I'd like to use the latest.. I'm still running V5. From unmenu it says there is a 2.06.. But the link, I think, is broken. I found a 2.18 version, but don't remember how to manually install it! It's been a while since I've had to do any manual install. I know V6 does things differently.. but I'm still on V5 with tgz file in the packages directory. Quote Link to comment
dlandon Posted September 21, 2015 Author Share Posted September 21, 2015 Ok.. please excuse my ignorance here.. I'm running a really old powerdown (1.02)! I'd like to use the latest.. I'm still running V5. From unmenu it says there is a 2.06.. But the link, I think, is broken. I found a 2.18 version, but don't remember how to manually install it! It's been a while since I've had to do any manual install. I know V6 does things differently.. but I'm still on V5 with tgz file in the packages directory. I moved the repository so that's why the unmenu link is broken. Go to the OP and use the V5 plugin link to get the plugin and install it. It will install V2.18 which should work fine with V5. Let me know if you have any problems. Quote Link to comment
jbuszkie Posted September 21, 2015 Share Posted September 21, 2015 Is the the plg method? (installed in the plugins directory?) Should I abandon the unmenu method then? and I have some version of apcupsd installed through unmenu.. is there anything special I have to do with that? Thanks! Jim Quote Link to comment
dlandon Posted September 21, 2015 Author Share Posted September 21, 2015 Is the the plg method? (installed in the plugins directory?) Should I abandon the unmenu method then? and I have some version of apcupsd installed through unmenu.. is there anything special I have to do with that? Thanks! Jim Install the plugin in the /boot/config/plugins folder and then reboot and powerdown will install. Yes. The link is broken for unmenu. If you're installing apcupsd and there is a reference in the plugin for powerdown, set the version to 2.18 and it will install the powerdown package and you won't need the powerdown plugin. Quote Link to comment
jbuszkie Posted September 21, 2015 Share Posted September 21, 2015 I'm using the unmenu method and I don't think it calls for the powerdown plugin... I'll have to double check unless someone knows off the top of their head.. Thanks again! Jim Quote Link to comment
RobJ Posted September 22, 2015 Share Posted September 22, 2015 jbuszkie, please consider upgrading to UnRAID v6. * All older versions have security vulnerabilities, increasingly so as time goes by. * Support is getting harder and harder to provide, as older versions get farther from supporters memory. * Tom and LimeTech want to end-of-life all older versions. * Many more features in v6 ... --- and --- * Apcupsd is built in. * System plugins like Powerdown are really easy to add, from the webGui, and almost automatically updated. Quote Link to comment
jbuszkie Posted September 22, 2015 Share Posted September 22, 2015 jbuszkie, please consider upgrading to UnRAID v6. I'm too scared!!! Everything just (mostly) works right now! But....I've probably put it off too long now. The upgrade guide is very thorough.. kudos to whomever wrote it. *sigh* You're probably right, Rob. It's time to upgrade! Thanks, Jim Quote Link to comment
garycase Posted October 5, 2015 Share Posted October 5, 2015 Question r.e. the best way to install APCUPSD with v5 [i'm reverting one of my systems to v5 to do some tests on parity check speeds and want it to have the latest APCUPSD w/powerdown without bothering to install UnMenu ... just to keep it as "vanilla" as possible.] Your OP says "... Apcupsd and Dynamix load powerdown as a part of their plugin for V5." I've read that this was true for APCUPSD v3.14.10, so I assume all that's needed is to put this plugin in the Config\Plugins folder and reboot. ... HOWEVER, there's no link to download the plugin !! [This is shown on the OP for the APCUPSD 3.14.10 thread, but the link doesn't lead to any downloads: " The plugin can be download from the Unraid Plugin Wiki Page: http://lime-technology.com/wiki/index.php?title=UnRAID_Plugins "] So ... question #1: Is there a good download link for APCUPSD v3.14.10 ? and question #2: Does that plugin indeed include the requisite Clean Powerdown package? (or does it need to be installed separately, as is required with UnMenu ?) Quote Link to comment
jbuszkie Posted November 16, 2015 Share Posted November 16, 2015 This might be a dumb question... But does this powerdown script handle multiple log files for archiving? Doesn't unraid move the syslog file to something like syslog_0 (I can't remember what it actually is) when the file gets to a certain size? does the power down script attempt to copy those files too to the log directory on the flash drive? I was looking at the code and it doesn't not appear to.. unless I'm missing something... Quote Link to comment
dlandon Posted November 16, 2015 Author Share Posted November 16, 2015 This might be a dumb question... But does this powerdown script handle multiple log files for archiving? Doesn't unraid move the syslog file to something like syslog_0 (I can't remember what it actually is) when the file gets to a certain size? does the power down script attempt to copy those files too to the log directory on the flash drive? I was looking at the code and it doesn't not appear to.. unless I'm missing something... The only log archived on the flash drive is the latest. Quote Link to comment
jbuszkie Posted November 16, 2015 Share Posted November 16, 2015 This might be a dumb question... But does this powerdown script handle multiple log files for archiving? Doesn't unraid move the syslog file to something like syslog_0 (I can't remember what it actually is) when the file gets to a certain size? does the power down script attempt to copy those files too to the log directory on the flash drive? I was looking at the code and it doesn't not appear to.. unless I'm missing something... The only log archived on the flash drive is the latest. hmm.. Maybe I'll have to try and hack it so it will save all of the syslogs.. Thanks for the confirmation. Jim Quote Link to comment
RobJ Posted November 16, 2015 Share Posted November 16, 2015 In general, the only reason the syslog is rotated (making additional huge syslog files) is because something is seriously wrong, in which case the diagnostics zip would probably be a better choice, and it DOES include all syslog files. Perhaps if you are modifying Powerdown, execute 'diagnostics' if more than one syslog file exists. Quote Link to comment
jbuszkie Posted November 16, 2015 Share Posted November 16, 2015 In general, the only reason the syslog is rotated (making additional huge syslog files) is because something is seriously wrong, in which case the diagnostics zip would probably be a better choice, and it DOES include all syslog files. Perhaps if you are modifying Powerdown, execute 'diagnostics' if more than one syslog file exists. Considering it could be months between powercycles.. The syslogs could get big. I know the mover generates a lot of syslog entries.. If you've got a crapload of files that get moved.... But that might be a good idea anyway to do the diagnostic thing.. Jim Quote Link to comment
JonathanM Posted November 16, 2015 Share Posted November 16, 2015 The syslogs could get big. I know the mover generates a lot of syslog entries.. If you've got a crapload of files that get moved. Personally, I don't enable logging for the mover, unless there is a specific issue I'm troubleshooting. Quote Link to comment
archedraft Posted November 30, 2015 Share Posted November 30, 2015 Is powerdown designed to send the Kxx.sh scripts twice when unRAID gets rebooted? My logs show it happening twice: Nov 30 14:08:58 Pithos powerdown[29990]: Powerdown initiated Nov 30 14:08:58 Pithos powerdown[29996]: Powerdown V2.18 Nov 30 14:08:58 Pithos rc.unRAID[30000][30004]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts. Nov 30 14:08:58 Pithos rc.unRAID[30008][30012]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts. Nov 30 14:08:58 Pithos rc.unRAID[30008][30016]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh" .... 30ish lines removed .... Nov 30 14:10:21 Pithos logger: Stopping libvirtd... Nov 30 14:10:24 Pithos rc.unRAID[30194][31694]: Running: "/usr/local/emhttp/plugins/powerdown/event/stopping_svcs" Nov 30 14:10:24 Pithos rc.unRAID[31698][31702]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts. Nov 30 14:10:24 Pithos rc.unRAID[30194][31706]: Running: "/usr/local/emhttp/plugins/powerdown/event/unmounting_disks" Nov 30 14:10:24 Pithos rc.unRAID[31710][31715]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts. Nov 30 14:10:24 Pithos rc.unRAID[31710][31719]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh" Quote Link to comment
dlandon Posted November 30, 2015 Author Share Posted November 30, 2015 Is powerdown designed to send the Kxx.sh scripts twice when unRAID gets rebooted? My logs show it happening twice: Nov 30 14:08:58 Pithos powerdown[29990]: Powerdown initiated Nov 30 14:08:58 Pithos powerdown[29996]: Powerdown V2.18 Nov 30 14:08:58 Pithos rc.unRAID[30000][30004]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts. Nov 30 14:08:58 Pithos rc.unRAID[30008][30012]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts. Nov 30 14:08:58 Pithos rc.unRAID[30008][30016]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh" .... 30ish lines removed .... Nov 30 14:10:21 Pithos logger: Stopping libvirtd... Nov 30 14:10:24 Pithos rc.unRAID[30194][31694]: Running: "/usr/local/emhttp/plugins/powerdown/event/stopping_svcs" Nov 30 14:10:24 Pithos rc.unRAID[31698][31702]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts. Nov 30 14:10:24 Pithos rc.unRAID[30194][31706]: Running: "/usr/local/emhttp/plugins/powerdown/event/unmounting_disks" Nov 30 14:10:24 Pithos rc.unRAID[31710][31715]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts. Nov 30 14:10:24 Pithos rc.unRAID[31710][31719]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh" No. Can you post the complete log? It looks like powerdown was started a second time about two minutes later. There is supposed to be a block to prevent it from running if it is already running. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.