Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Message added by EDACerton,

This version of the plugin is no longer available in Community Applications. Future updates and support will be provided at:

https://forums.unraid.net/topic/191179-plugin-open-files-see-whats-preventing-unraid-from-shutting-down/

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

Featured Replies

This plugin will only work with unRAID V6.1 and later versions.

 

This is a plugin I put together that shows open files and which processes have the files open.  The files that are open that would potentially prevent server shutdown are shown.  You can kill the processes that have files open.

 

This plugin does not replace the Dynamix Active Streams.  Different information is shown on Open Files about all processes that have files open.

 

This plugin installs into Tools->System Information.

 

The preferred method to install this plugin is with CA.

 

Cut and then paste this link into the "Install Plugin" line to install the plugin:

https://github.com/dlandon/open.files/raw/master/open.files.plg
 
Credits: This was put together with permission from BubbaQ and is based on his Open Files Alert package.

Edited by dlandon

  • Replies 129
  • Views 51.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • The author did remove it.  At this time, I am unsure as to why.  Assuming that the copyrights etc allow it, I will publish a replacement from my repository tonight / tomorrow.  This will necessitate a

  • EDACerton
    EDACerton

    I have a fork working and submitted to CA, just waiting for it to get approved. 

  • Right now, I've decided that I'm not going to fork and republish the plugins.  At this time I do have far too much on my plate to take on any additional plugins.   I do not know why the author chose t

Posted Images

This is awesome!  Thank you dlandon (and BubbaQ)!

 

The list is currently sorted by PID, would you consider sorting it by program instead, so all of the Plex processes are together, the smdb processes are together, etc.

 

Also, could this be integrated with the Main -> Array Operation tab?  Perhaps by adding a link in the Stop area that shows the number of open files and links over to this tool?

 

  • Author

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

Sorry I wasn't clear.  I agree that grouping by PID is important, I was suggesting to change the sort order of the groups. 

 

Currently it sorts the groups by PID:

  PID 17665 - Plex (a group of 30 individual rows)

  PID 18880 - smbd (a group of 4 individual rows)

  PIC 19851 - Plex (a group of 10 individual rows)

  PIC 20281 - smdb (a group of 2 individual rows)

 

If we were to re-sort by Program it would look more like this:

  Plex - PID 17665 (a group of 30 individual rows)

  Plex - PIC 19851 (a group of 10 individual rows)

  smbd - PID 18880 (a group of 4 individual rows)

  smbd - PIC 20281 (a group of 2 individual rows)

 

I think that would make it easier to see what apps really have open, but if you disagree that is fine.  This is still really helpful :)

 

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

 

I was hoping to modify the existing Array Operations tab, rather than create a new one.  But maybe that isn't possible without incorporating this into unraid itself.  We certainly wouldn't want to break that particular tab :)

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

You could add the "tablesorter" class to the table and then it could be sorted dynamically however anyone wants. Similar to the Installed Plugins page. I have it in my wol and ipmi plugin.

  • Author

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

You could add the "tablesorter" class to the table and then it could be sorted dynamically however anyone wants. Similar to the Installed Plugins page. I have it in my wol and ipmi plugin.

 

I'll take a look at it when I get some time.

I was hoping to modify the existing Array Operations tab, rather than create a new one.

 

You have to do a search and replace to insert custom html/javascript into the stock unRAID html.  I've done it but it is fraught with peril of 1) it not working on a different version and 2) hosing up the page so a user couldn't get to the buttons to shut down unRAID.

 

But as I said in the original thread, that is a perfect place to put it..... plus adding an extra click-through when stopping the array when there are open files that may block it, so you don't get stuck in a loop.

I was hoping to modify the existing Array Operations tab, rather than create a new one.

 

You have to do a search and replace to insert custom html/javascript into the stock unRAID html.  I've done it but it is fraught with peril of 1) it not working on a different version and 2) hosing up the page so a user couldn't get to the buttons to shut down unRAID.

 

But as I said in the original thread, that is a perfect place to put it..... plus adding an extra click-through when stopping the array when there are open files that may block it, so you don't get stuck in a loop.

You can add another tab to the main tabs by just setting the Menu option in the .page file to be something like "Main:x" where x is the tab number to use (use something like 9 so that you won't be overwriting any other existing tab)  Its no different than setting it to be in the tools section (and is exactly how CA winds up on the docker page)

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

You could add the "tablesorter" class to the table and then it could be sorted dynamically however anyone wants. Similar to the Installed Plugins page. I have it in my wol and ipmi plugin.

 

I'll take a look at it when I get some time.

You would just need to change the table headers from td to th. Then add tablesorter class and an id.

<table class='tablesorter share_status small' id='tblOpenFiles'>
<thead><tr><th width='8%'>Program <strong>*<strong></th><th width='8%'>Process ID</th><th width='6%'>Open Files</th><th width='20%'>Files that may prevent unRAID shutdown</th><th width='auto'>File Name and Path</th></tr></thead>
<tbody id="streams"><?echo(ofiles());?></tbody>
</table>

Then add this bit of javascript at the end of the page and column 0, 1 and 4 will be sortable

<script type="text/javascript">
$(function(){
$('#tblOpenFiles').tablesorter({headers:{2:{sorter:false},3:{sorter:false}}});
});
</script>

I have to say (and it deserves the format of the line below) ....

 

I F*****g LOVE this Plugin!!!

 

Thank you! Excellent work!!!  :D

VERY nicely done !!  Thanks to both you & BubbaQ

You can add another tab to the main tabs by just setting the Menu option in the .page file to be something like "Main:x" where x is the tab number to use (use something like 9 so that you won't be overwriting any other existing tab)  Its no different than setting it to be in the tools section (and is exactly how CA winds up on the docker page)

 

That's what my original did:

 

http://lime-technology.com/forum/index.php?topic=42773.msg407486

  • Author

You can add another tab to the main tabs by just setting the Menu option in the .page file to be something like "Main:x" where x is the tab number to use (use something like 9 so that you won't be overwriting any other existing tab)  Its no different than setting it to be in the tools section (and is exactly how CA winds up on the docker page)

 

That's what my original did:

 

http://lime-technology.com/forum/index.php?topic=42773.msg407486

 

That can easily be done.

  • Author

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

You could add the "tablesorter" class to the table and then it could be sorted dynamically however anyone wants. Similar to the Installed Plugins page. I have it in my wol and ipmi plugin.

 

I'll take a look at it when I get some time.

You would just need to change the table headers from td to th. Then add tablesorter class and an id.

<table class='tablesorter share_status small' id='tblOpenFiles'>
<thead><tr><th width='8%'>Program <strong>*<strong></th><th width='8%'>Process ID</th><th width='6%'>Open Files</th><th width='20%'>Files that may prevent unRAID shutdown</th><th width='auto'>File Name and Path</th></tr></thead>
<tbody id="streams"><?echo(ofiles());?></tbody>
</table>

Then add this bit of javascript at the end of the page and column 0, 1 and 4 will be sortable

<script type="text/javascript">
$(function(){
$('#tblOpenFiles').tablesorter({headers:{2:{sorter:false},3:{sorter:false}}});
});
</script>

 

Done.  Thanks for the help you got me there faster than if I did it on my own.

  • Author

I was hoping to modify the existing Array Operations tab, rather than create a new one.

 

You have to do a search and replace to insert custom html/javascript into the stock unRAID html.  I've done it but it is fraught with peril of 1) it not working on a different version and 2) hosing up the page so a user couldn't get to the buttons to shut down unRAID.

 

But as I said in the original thread, that is a perfect place to put it..... plus adding an extra click-through when stopping the array when there are open files that may block it, so you don't get stuck in a loop.

 

This approach is too messy for a plugin and is prone to many problems.  That should be done by LT.

 

I can look into adding the tab back that bubbaQ originally had in his Open Files Alert package.

  • Author

I was hoping to modify the existing Array Operations tab, rather than create a new one.

 

You have to do a search and replace to insert custom html/javascript into the stock unRAID html.  I've done it but it is fraught with peril of 1) it not working on a different version and 2) hosing up the page so a user couldn't get to the buttons to shut down unRAID.

 

But as I said in the original thread, that is a perfect place to put it..... plus adding an extra click-through when stopping the array when there are open files that may block it, so you don't get stuck in a loop.

You can add another tab to the main tabs by just setting the Menu option in the .page file to be something like "Main:x" where x is the tab number to use (use something like 9 so that you won't be overwriting any other existing tab)  Its no different than setting it to be in the tools section (and is exactly how CA winds up on the docker page)

 

Yes.  That's the way bubbaQ originally had it in his package.  I was holding off on that for some feedback.  I obviously got the feedback.

  • Author

New release.  I added the ability to sort on Process, PID, or files.  Just click on title of the table.  I also added a 'Files Open' tab in Main.

The organization has to be by pid so the process can be killed by pid.  Grouping the files together by program would be an issue when stopping a particular pid.  Which one gets stopped?

 

BubbaQ had an alert tab on the Main tab with a link to the open files page in his Files Alert package.  I'm a bit nervous about interfering with the unRAID tab organization.  I don't want to cause any problems or create confusion when some users don't see that tab.

 

I really only intended this to be a troubleshooting tool, and not necessarily a daily operational tool.

You could add the "tablesorter" class to the table and then it could be sorted dynamically however anyone wants. Similar to the Installed Plugins page. I have it in my wol and ipmi plugin.

 

I'll take a look at it when I get some time.

You would just need to change the table headers from td to th. Then add tablesorter class and an id.

<table class='tablesorter share_status small' id='tblOpenFiles'>
<thead><tr><th width='8%'>Program <strong>*<strong></th><th width='8%'>Process ID</th><th width='6%'>Open Files</th><th width='20%'>Files that may prevent unRAID shutdown</th><th width='auto'>File Name and Path</th></tr></thead>
<tbody id="streams"><?echo(ofiles());?></tbody>
</table>

Then add this bit of javascript at the end of the page and column 0, 1 and 4 will be sortable

<script type="text/javascript">
$(function(){
$('#tblOpenFiles').tablesorter({headers:{2:{sorter:false},3:{sorter:false}}});
});
</script>

 

Done.  Thanks for the help you got me there faster than if I did it on my own.

No problem. Thank you for putting this together.

Very nicely done -- this is something that I've often wished for.

 

One less thing to need unMenu for now.  Thanks.

... I also added a 'Files Open' tab in Main.

 

Personally I am not so much in favor of adding an additional tab under Main, for two reasons:

 

1. In tabbed mode a tracking system is used to remember the parent tab when descending into some child view. Unfortunately Main is the only page where this 'special' tracking needs to be done. This is based on the existing devices tabs defined under Main, adding a new tab breaks this mechanism.

 

2. The current tabs under Main all refer to devices, but Open Files are not devices and therefore looks misplaced.

 

I see Open Files more as a tool /aid to help in troubleshooting and its placement under Tools - in my view - is the better approach.

 

  • Author

... I also added a 'Files Open' tab in Main.

 

Personally I am not so much in favor of adding an additional tab under Main, for two reasons:

 

1. In tabbed mode a tracking system is used to remember the parent tab when descending into some child view. Unfortunately Main is the only page where this 'special' tracking needs to be done. This is based on the existing devices tabs defined under Main, adding a new tab breaks this mechanism.

 

2. The current tabs under Main all refer to devices, but Open Files are not devices and therefore looks misplaced.

 

I see Open Files more as a tool /aid to help in troubleshooting and its placement under Tools - in my view - is the better approach.

 

The Main->Files Open tab is only a status of the files open on the system that can prevent an array shutdown and provides a link to the 'Tools->Files' Open web page.

 

I've renamed 'Main->Files Open' to 'Main->Open Files'.

 

I'll try to find a better answer to the 'Main->Open Files' tab.

The Main->Files Open tab is only a status of the files open on the system that can prevent an array shutdown and provides a link to the 'Tools->Files' Open web page.

 

I've renamed 'Main->Files Open' to 'Main->Open Files'.

Not sure that is any better ;D    Maybe something like "Active Files" would be better (or "Active Array Files" if you want to be more exact).

Thank you for this....! can I make a cosmetic request please...  the triangular "Warning" icon freaks me out every time I go to the Main page. I am conditioned that when I see this icon, something is wrong. Can you please change the icon to something less "alarming"... Below are some ideas. Please let me know if you need help re-sizing any image or tweaking anything.

 

Many thanks,

 

http://cdn.mysitemyway.com/etc-mysitemyway/icons/legacy-previews/icons-256/green-jelly-icons-business/082258-green-jelly-icon-business-document8.png

https://lh4.ggpht.com/lUcLbewm2mffnhc1_BbZYi5zjEXAzfeYf73cg2SXjFDX3_xNnHGUMkSRdh86TN8HqcSq7Qr3vA=w512

http://findicons.com/files/icons/1580/devine_icons_part_2/128/defult_text.png

 

I can also colorize or tweak the b&w images a little as welll... just let me know your thoughts.

 

 

 

 

 

  • Author

Thank you for this....! can I make a cosmetic request please...  the triangular "Warning" icon freaks me out every time I go to the Main page. I am conditioned that when I see this icon, something is wrong. Can you please change the icon to something less "alarming"... Below are some ideas. Please let me know if you need help re-sizing any image or tweaking anything.

 

Many thanks,

 

http://cdn.mysitemyway.com/etc-mysitemyway/icons/legacy-previews/icons-256/green-jelly-icons-business/082258-green-jelly-icon-business-document8.png

https://lh4.ggpht.com/lUcLbewm2mffnhc1_BbZYi5zjEXAzfeYf73cg2SXjFDX3_xNnHGUMkSRdh86TN8HqcSq7Qr3vA=w512

http://findicons.com/files/icons/1580/devine_icons_part_2/128/defult_text.png

 

I can also colorize or tweak the b&w images a little as welll... just let me know your thoughts.

 

I agree.  That is a bit alarming.

 

You pick one, re-size it to 16x16 and be sure it has a transparent background.  They all look good.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.