Jump to content
bubbaQ

Open Files Alert package

12 posts in this topic Last Reply

Recommended Posts

Here is a little something I have been using for a long time that alerts me when there are open files on the unRAID array that will (likely) prevent shutdown.  I haven't had time to change it to a .plg plugin so I thought I'd throw it out there for whoever wanted it.

 

It has saved my bacon several times when I went to do a shutdown and something I forgot was running had files open on the array.

 

It will also show you the name of the application that has the files open and permit you to kill the process if necessary.

 

It adds a new tab called "Alerts" to the Main display with an icon that changes if there are any open files that may block shutdown.

 

Ultimately I'd like to add an alert on the Array Actions Operation page and require an extra click-through when stopping the array if files blocking dismount are open.

 

Unzip and use installpkg.

 

Enjoy.

OpenFileAlert-0.5.0-unraid-bubba.zip

Image2.jpg.09d5dd31b3053a1e8e0fc7caf43ee32c.jpg

Image3.jpg.f57c3c7f6627706061a1d7f554565733.jpg

Image4.jpg.dca468dc7ceea0be2bf4c73ac32c75c5.jpg

Share this post


Link to post

I am considering turning this into a plugin to help those that can't figure out why their server isn't shutting down cleanly.  Can I get your permission to do that?

Share this post


Link to post

Other than the support for the Alerts tab is not all this functionality already available via Dynamix Active Streams plugin?    If so might a better (and easier) way forward might be to see if a request to add the alerts tab (or some other equivalent) to that plugin would be accepted.

 

The Dynamix Active streams plugin already shows on the Dashboard if there are streams open so gives an indication that shutdown might be an issue, and more details via Tools->Active Streams so it seems everything essential might already be there.

 

Also, since the current GUI is based on Dynamix that might mean there is more chance of the functionality being integrated into the standard build?

Share this post


Link to post

Just looking at options at this point.  I think this might offer a little more functionality.  I am going to have a look.

 

If it makes sense to be a dynamix add on, or functionality enhancement, then I can offer it to bonienl.

Share this post


Link to post

I am considering turning this into a plugin to help those that can't figure out why their server isn't shutting down cleanly.  Can I get your permission to do that?

 

Sure... go ahead.

 

This has features that are not in Active Streams.... such as interactively identifying and killing processes, as well as identifying loopback mounts.  It uses at the core:

 

lsof -F facn /mnt/disk* /mnt/user* /dev/loop* /dev/md* /mnt/cache

Share this post


Link to post

Can't kill a process.  Something is missing.

 

	window.open(document.location.href + "?pnum=" + pnum +"&action=kill");

 

Edit: I got it.

Share this post


Link to post

BubbaQ, Can you give me your script for creating the package?  Right now I am just zipping the emhttp files and I'd like to make a package instead.  I am not that familiar with making packages.

 

Thank you.

Share this post


Link to post

I don't use a script.... I build by hand and CLI.

 

Ok.  It's fine.  I will use what I have.  It works.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now