Open Files Plugin - Can help with troubleshooting why server won't shut down


dlandon

Recommended Posts

Just released the new version.  Let me know what you think.

 

It is really quite safe to stop all array processes.  All it does is the part of the shutdown done exactly like emhttp and powerdown and then stops just before the array is stopped.  You don't need the powerdown plugin.  This plugin is totally separate.

 

Just remember when you stop all array processes, you are effectively shutting down the array.  Shares will stop, Docker will stop, and VMs will stop.

Link to comment

A technical question.... when I go to Main and click on button to Stop the array... it normally goes through the process of stopping the dockers and all the other stuff. When something is not going well, I get the "Retrying to..." (cant recall exact words) that just keeps cycling over.

 

If one is stuck in this loop, are we able to then click on the Open Files link and it will take us to the Open Files page with the ability to kill the open stuff? In the past, when I am in one of those loops, I cannot go navigate anywhere on the unRAID web ui.

 

No, once the webGUI is doing a shutdown, you can't use it for anything else.  If you end up in that loop, your only choices are to 1) login via telnet and deal with it by hand at the CLI, or 2) the big red switch.

 

But there is a way to create a back door HTTP listener on another port using awk.  I used that for a long time so I had HTTP access to do some things like a "kill-anything-that-has-files-open-and-stop-array-now-damnit" script.  But logging in via ssh and doing it from the command line ended up being easier for me than maintaining and upgrading that code with new stuff I wanted.

Link to comment

Just released the new version.  Let me know what you think.

 

It is really quite safe to stop all array processes.  All it does is the part of the shutdown done exactly like emhttp and powerdown and then stops just before the array is stopped.  You don't need the powerdown plugin.  This plugin is totally separate.

 

Just remember when you stop all array processes, you are effectively shutting down the array.  Shares will stop, Docker will stop, and VMs will stop.

 

Worked like a charm for me... basically I clicked the "Stop Array Process" button and it went to work. I got nothing left open, which is as it should have... and then I was able to stop the array. I will test later tonight by opening a folder and a terminal window to ssome array folder and see.

 

I feel this deserves to somehow be in the Array Operations on Main... but that is above my pay grade.  :-X

 

Many thanks for this!

Link to comment
  • 1 month later...

Having problem with installing this plugin. When I install via "Install Plugin" it looks like it is installed, but there is no icon under System Information group (I have just "Active Streams" from Dynamix there).

 

When I try via telnet I get "plugin: run failed: /bin/bash retval: 1"

 

Any clue what is going on? I have just upgraded to 6.1.3 (from 5.0.6)

 

root@UNRAiD:~# wget https://github.com/dlandon/open.files/raw/master/open.files.plg
--2015-11-07 23:00:18--  https://github.com/dlandon/open.files/raw/master/open.files.plg
Resolving github.com (github.com)... 192.30.252.129
Connecting to github.com (github.com)|192.30.252.129|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/dlandon/open.files/master/open.files.plg [following]
--2015-11-07 23:00:19--  https://raw.githubusercontent.com/dlandon/open.files/master/open.files.plg
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.17.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3063 (3.0K) [text/plain]
Saving to: ‘open.files.plg.1’

open.files.plg.1    100%[=====================>]   2.99K  --.-KB/s   in 0s

2015-11-07 23:00:19 (241 MB/s) - ‘open.files.plg.1’ saved [3063/3063]

root@UNRAiD:~# installplg open.files.plg                                        plugin: installing: open.files.plg
plugin: run failed: /bin/bash retval: 1

Link to comment

Having problem with installing this plugin. When I install via "Install Plugin" it looks like it is installed, but there is no icon under System Information group (I have just "Active Streams" from Dynamix there).

 

When I try via telnet I get "plugin: run failed: /bin/bash retval: 1"

 

Any clue what is going on? I have just upgraded to 6.1.3 (from 5.0.6)

 

root@UNRAiD:~# wget https://github.com/dlandon/open.files/raw/master/open.files.plg
--2015-11-07 23:00:18--  https://github.com/dlandon/open.files/raw/master/open.files.plg
Resolving github.com (github.com)... 192.30.252.129
Connecting to github.com (github.com)|192.30.252.129|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/dlandon/open.files/master/open.files.plg [following]
--2015-11-07 23:00:19--  https://raw.githubusercontent.com/dlandon/open.files/master/open.files.plg
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.17.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3063 (3.0K) [text/plain]
Saving to: ‘open.files.plg.1’

open.files.plg.1    100%[=====================>]   2.99K  --.-KB/s   in 0s

2015-11-07 23:00:19 (241 MB/s) - ‘open.files.plg.1’ saved [3063/3063]

root@UNRAiD:~# installplg open.files.plg                                        plugin: installing: open.files.plg
plugin: run failed: /bin/bash retval: 1

 

Delete /boot/config/plugins/open.files and try again.

Link to comment
  • 1 year later...

This post is a bit old, but I wanted to check if the Open Files plg is still supported and works on v6.2.x ?  That being said; since it is accessed through the Tools section within the WebGUI, does this mean that the plugin would not be accessible if the WebGUI becomes unresponsive?   

Link to comment

This post is a bit old, but I wanted to check if the Open Files plg is still supported and works on v6.2.x ?  That being said; since it is accessed through the Tools section within the WebGUI, does this mean that the plugin would not be accessible if the WebGUI becomes unresponsive? 

 

The Open Files Plugin is still supported and works on the 6.2.x versions of unRAID.  It depends on the webGui being responsive to work.  If you have problems with the webGui becoming unresponsive, use the "Fix Common Problems" plugin to troubleshoot.

Link to comment
  • 1 month later...

Dlandon, as author of both OpenFiles and FileActivity... maybe you can help...

 

My system is set to use Cache drive on everything and I have Dynamix directory cache plugin too... I cannot seem to get my machine to spin down disks... One in particular is always whirring away reading (I assume) files and consequently gets MILES warmer than I want.

 

The ONLY access to any HDD is reported to any /mnt/diskXXXX - all other entries are to /var /config or /mnt/cache -   Any ideas? Should I be using OpenFiles instead?

 

It's driving me MAD!!

 

 

find 17781 Kill 1 1 /mnt/disk5/Share/Games/GOG_Installs/Icewind Dale Complete/Sounds (working directory)

 

Link to comment
3 hours ago, methanoid said:

Dlandon, as author of both OpenFiles and FileActivity... maybe you can help...

 

My system is set to use Cache drive on everything and I have Dynamix directory cache plugin too... I cannot seem to get my machine to spin down disks... One in particular is always whirring away reading (I assume) files and consequently gets MILES warmer than I want.

 

The ONLY access to any HDD is reported to any /mnt/diskXXXX - all other entries are to /var /config or /mnt/cache -   Any ideas? Should I be using OpenFiles instead?

 

It's driving me MAD!!

 

 

find 17781 Kill 1 1 /mnt/disk5/Share/Games/GOG_Installs/Icewind Dale Complete/Sounds (working directory)

 

I need more information.  Post a system diagnostics and I'll take a look.

 

Open files is helpful when shutting down the server is troublesome.  Open files shows files opened that might cause the shutdown to hang.

 

Files Activity can catch file activity that potentially spins up a disk.

Link to comment
On 01/04/2017 at 1:10 AM, dlandon said:

I need more information.  Post a system diagnostics and I'll take a look.

 

Open files is helpful when shutting down the server is troublesome.  Open files shows files opened that might cause the shutdown to hang.

 

Files Activity can catch file activity that potentially spins up a disk.

 

Thanks for taking time to respond. This is possibly something else. Whenever I boot my unRAID server it always thrashes drives away (understandable) but one disk is thrashing more than others.. its always disk 5 - and OpenFiles says nothing accessing it...  So I wonder if this is XFS file system checking files or something cos its always the same HDD and unRAID recognises this with recording a massive number of reads (as per image).

 

So nothing I think your Plugin can help with but any ideas?

 

edit.jpg

Link to comment
5 minutes ago, methanoid said:

Whenever I boot my unRAID server it always thrashes drives away (understandable) but one disk is thrashing more than others.. its always disk 5

 

Do you have cache dirs? If yes the initial scan is normal, and maybe disk 5 has more total files (smaller files), in that case also normal.

Link to comment
50 minutes ago, johnnie.black said:

 

Probably good idea.

 

Well I had Scan User Shares enabled but Included Folders had none included! I added Games as a User Share and moved files out from my main Share into that. But the thing still spins like mad on startup and same sorta number of reads...  Will make sure I have Share folder as included ONLY now and see what happens....

Link to comment
1 hour ago, methanoid said:

 

Thanks for taking time to respond. This is possibly something else. Whenever I boot my unRAID server it always thrashes drives away (understandable) but one disk is thrashing more than others.. its always disk 5 - and OpenFiles says nothing accessing it...  So I wonder if this is XFS file system checking files or something cos its always the same HDD and unRAID recognises this with recording a massive number of reads (as per image).

 

So nothing I think your Plugin can help with but any ideas?

 

edit.jpg

Boot in safe mode without plugins and see if it stops.  If it does, then remove all plugins and add them back one at a time to determine which one is causing the issue,

 

There are a lot more file events that Open Files can collect, but I didn't enable those events because it would overwhelm the logging.  Maybe I could set a switch to include more of the file events with the understanding that logging will be massive.  Open Files does limit the log length so it will not blow up the log space, but the Open Files logging might bog down unRAID with this switch turned on.  Let me ponder it for a bit.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.