Jump to content
dlandon

File Activity Plugin - How can I figure out what keeps spinning up my disks?

114 posts in this topic Last Reply

Recommended Posts

3 hours ago, karateo said:

I use latest Unraid and latest File Activity plugin.

 

I set settings to Yes, No, No and apply,

but it doesn't show anything in file activity tab.

I tried to open a movie, browse folder but it doesn't show anything there.

Any idea of what I should try?

I have the same problem.
I've tried different browsers but nothing is showing on the array for file activity
I'm not using the cache for any shares.

Kevin.

Share this post


Link to post

You may not have any shares on the cache, but that doesn't mean the files aren't temporarily on the cache until moved at night by the mover.

Go to the Tools->Processes and look for a line that starts like this:

inotifywait -m -r -q -e open,attrib,move,create,delete --excludei appdata/...

Copy the complete line and post it here so I can verify inotify is running as it should on your system.  Also tell me how many disks you have in your system.

Edited by dlandon

Share this post


Link to post
47 minutes ago, dlandon said:

You may not have any shares on the cache, but that doesn't mean the files aren't temporarily on the cache until moved at night by the mover.

Go to the Tools->Processes and look for a line that starts like this:


inotifywait -m -r -q -e open,attrib,move,create,delete --excludei appdata/...

Copy the complete line and post it here so I can verify inotify is running as it should on your system.  Also tell me how many disks you have in your system.

I have no line like that in Tools->Processes.
Plugin is showing as running.
Array has 16 drives including 2 parity.

I have also tried stopping and restarting it. Still no inotifywait line.

58ac2e3739a44_ScreenShot2017-02-21at12_06_43pm.thumb.png.6693091d288750a18590c612d3cb750f.png58ac2e53c05cb_ScreenShot2017-02-21at12_07_37pm.thumb.png.2cdf8c5f0b6e754c4a9f7c6fda9fa0bc.png
 

Kevin.

Edited by digitalfixer

Share this post


Link to post

inotify did not start.  Look in your syslog and on the console and see if there is an error message about inotify not starting.  Also try to stop and re-start and see if it is then shown in the processes.

How many disks are in your array?

Edited by dlandon

Share this post


Link to post

I don't have a screen attached to my server so no console.
I have theses 2 lines twice in my syslog

 

Feb 19 13:05:34 Tower inotifywait[22253]: Failed to watch /mnt/disk3; upper limit on inotify watches reached!
Feb 19 13:05:34 Tower inotifywait[22253]: Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.

Stop and start made no difference.

Kevin

Solved.
Doubled the number of inotifywait max_user_watches and it is now running properly.

Edited by digitalfixer
Problem solved.

Share this post


Link to post
1 hour ago, dlandon said:

You may not have any shares on the cache, but that doesn't mean the files aren't temporarily on the cache until moved at night by the mover.

Go to the Tools->Processes and look for a line that starts like this:


inotifywait -m -r -q -e open,attrib,move,create,delete --excludei appdata/...

Copy the complete line and post it here so I can verify inotify is running as it should on your system.  Also tell me how many disks you have in your system.

I have this line

 

root      8465     1  0 01:24 ?        00:00:04 inotifywait -dsrqo /var/run/hash.pipe -e close_write --exclude ^/mnt/disk[0-9]+/Backups|CommunityApplicationsAppdataBackup,Do*****,Squidbait-beef,Squidbait-blue,Squidbait-compare,Squidbait-could,Squidbait-evidently,Squidbait-glimpse,Squidbait-hand,Squidbait-isten,Squidbait-other,Squidbait-place,TV***** --format %w%f /mnt/disk1

 

I have parity, disk1, disk2 and cache.

The files I tried to open definately are not in cache drive.

Share this post


Link to post
Just now, karateo said:

I have this line

 


root      8465     1  0 01:24 ?        00:00:04 inotifywait -dsrqo /var/run/hash.pipe -e close_write --exclude ^/mnt/disk[0-9]+/Backups|CommunityApplicationsAppdataBackup,Do*****,Squidbait-beef,Squidbait-blue,Squidbait-compare,Squidbait-could,Squidbait-evidently,Squidbait-glimpse,Squidbait-hand,Squidbait-isten,Squidbait-other,Squidbait-place,TV***** --format %w%f /mnt/disk1

 

I have parity, disk1, disk2 and cache.

The files I tried to open definately are not in cache drive.

And I just remembered this inotifywait must be from the File Integrity plugin!

Share this post


Link to post
1 hour ago, digitalfixer said:

I don't have a screen attached to my server so no console.
I have theses 2 lines twice in my syslog

 


Feb 19 13:05:34 Tower inotifywait[22253]: Failed to watch /mnt/disk3; upper limit on inotify watches reached!
Feb 19 13:05:34 Tower inotifywait[22253]: Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.

Stop and start made no difference.

Kevin

Solved.
Doubled the number of inotifywait max_user_watches and it is now running properly.

I'll have to account for this.

Share this post


Link to post

I think the issue that several of you have run into is the number of max_user_watches value being too low.  I'm working on an update that will adjust that value when the plugin is installed or updated.  I also will change the list of disks to be read from a file and not on the command line.  With a large array, the command line could be too long for Linux to handle.

Share this post


Link to post
13 minutes ago, dlandon said:

I think the issue that several of you have run into is the number of max_user_watches value being too low.  I'm working on an update that will adjust that value when the plugin is installed or updated.  I also will change the list of disks to be read from a file and not on the command line.  With a large array, the command line could be too long for Linux to handle.

You should make it user adjustable.With any number of plugins (Notably Dynamix FIP) all trying to have watches, whatever value you set may always be too low, especially on large, complex structures.

Share this post


Link to post
5 hours ago, Squid said:

You should make it user adjustable.With any number of plugins (Notably Dynamix FIP) all trying to have watches, whatever value you set may always be too low, especially on large, complex structures.

Done.

Share this post


Link to post
Feb 21 22:55:38 Tower emhttp: Spinning up all drives...
Feb 21 22:55:38 Tower emhttp: shcmd (411): /usr/sbin/hdparm -S0 /dev/sdc &> /dev/null
Feb 21 22:55:38 Tower kernel: mdcmd (60): spinup 0
Feb 21 22:55:38 Tower kernel: mdcmd (61): spinup 1
Feb 21 22:55:38 Tower kernel: mdcmd (62): spinup 2
Feb 21 22:55:38 Tower kernel: mdcmd (63): spinup 3
Feb 21 22:55:38 Tower kernel: mdcmd (64): spinup 4
Feb 21 22:55:38 Tower kernel: mdcmd (65): spinup 5
Feb 21 22:55:38 Tower kernel: mdcmd (66): spinup 6
Feb 21 22:55:38 Tower kernel: mdcmd (67): spinup 7
Feb 21 22:55:38 Tower kernel: mdcmd (68): spinup 8
Feb 21 22:55:38 Tower kernel: mdcmd (69): spinup 29
Feb 21 22:55:51 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'start'
Feb 21 22:55:51 Tower file.activity: Starting File Activity
Feb 21 22:55:53 Tower file.activity: Error: inotify failed to start for File Activity
Feb 21 22:56:01 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'update'
Feb 21 22:56:01 Tower file.activity: Stopping File Activity
Feb 21 22:56:01 Tower file.activity: File Activity is not running

Using version 2017.02.21b  - Nothing happens.  Am I missing something?

Share this post


Link to post

For testing I set the Max user watches to 1000000 and it worked with version 2017.02.21.

 

Very very useful plugin. 

Thank you.

 

What value so I change the Max user watches to?

 

Ps.

Is it possible, when the file is accessed to catch who is doint it?

Even if it's just a localhost or some other ip is very useful.

Edited by karateo

Share this post


Link to post
6 hours ago, bakes82 said:

Feb 21 22:55:38 Tower emhttp: Spinning up all drives...
Feb 21 22:55:38 Tower emhttp: shcmd (411): /usr/sbin/hdparm -S0 /dev/sdc &> /dev/null
Feb 21 22:55:38 Tower kernel: mdcmd (60): spinup 0
Feb 21 22:55:38 Tower kernel: mdcmd (61): spinup 1
Feb 21 22:55:38 Tower kernel: mdcmd (62): spinup 2
Feb 21 22:55:38 Tower kernel: mdcmd (63): spinup 3
Feb 21 22:55:38 Tower kernel: mdcmd (64): spinup 4
Feb 21 22:55:38 Tower kernel: mdcmd (65): spinup 5
Feb 21 22:55:38 Tower kernel: mdcmd (66): spinup 6
Feb 21 22:55:38 Tower kernel: mdcmd (67): spinup 7
Feb 21 22:55:38 Tower kernel: mdcmd (68): spinup 8
Feb 21 22:55:38 Tower kernel: mdcmd (69): spinup 29
Feb 21 22:55:51 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'start'
Feb 21 22:55:51 Tower file.activity: Starting File Activity
Feb 21 22:55:53 Tower file.activity: Error: inotify failed to start for File Activity
Feb 21 22:56:01 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'update'
Feb 21 22:56:01 Tower file.activity: Stopping File Activity
Feb 21 22:56:01 Tower file.activity: File Activity is not running

Using version 2017.02.21b  - Nothing happens.  Am I missing something?

 

Update to 2017.02.22 and try again.  The inotify errors are now logged to the syslog and you should be able to see why it is not starting.

Share this post


Link to post
4 hours ago, karateo said:

For testing I set the Max user watches to 1000000 and it worked with version 2017.02.21.

 

Very very useful plugin. 

Thank you.

 

What value so I change the Max user watches to?

 

Ps.

Is it possible, when the file is accessed to catch who is doint it?

Even if it's just a localhost or some other ip is very useful.

 

Set Max User Watches to whatever works for you system.  Start with the default and if that doesn't work, try doubling it.

 

I can't get any information on who is accessing the file from inotify.

Share this post


Link to post

Updated, no errors in log, says "starting" but that's it.

 

Feb 22 08:58:35 Tower root: plugin: creating: /boot/config/plugins/file.activity/file.activity-2017.02.22.tgz - downloading from URL https://github.com/dlandon/file.activity/raw/master/file.activity-2017.02.22.tgz
Feb 22 08:58:36 Tower root: plugin: checking: /boot/config/plugins/file.activity/file.activity-2017.02.22.tgz - MD5
Feb 22 08:58:36 Tower root: plugin: running: anonymous
Feb 22 08:58:36 Tower root: plugin: skipping: /boot/config/plugins/file.activity/file.activity.cfg already exists
Feb 22 08:58:36 Tower root: plugin: running: anonymous
Feb 22 08:58:51 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'start'
Feb 22 08:58:51 Tower file.activity: Starting File Activity
Feb 22 09:00:51 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'update'
Feb 22 09:00:51 Tower file.activity: Stopping File Activity
Feb 22 09:00:51 Tower file.activity: File Activity is not running
Feb 22 09:00:57 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'update'
Feb 22 09:00:57 Tower file.activity: Stopping File Activity
Feb 22 09:00:57 Tower file.activity: File Activity is not running
Feb 22 09:00:57 Tower file.activity: Starting File Activity
Feb 22 09:01:04 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'start'
Feb 22 09:01:04 Tower file.activity: Starting File Activity

 

Share this post


Link to post
3 hours ago, bakes82 said:

Updated, no errors in log, says "starting" but that's it.

 


Feb 22 08:58:35 Tower root: plugin: creating: /boot/config/plugins/file.activity/file.activity-2017.02.22.tgz - downloading from URL https://github.com/dlandon/file.activity/raw/master/file.activity-2017.02.22.tgz
Feb 22 08:58:36 Tower root: plugin: checking: /boot/config/plugins/file.activity/file.activity-2017.02.22.tgz - MD5
Feb 22 08:58:36 Tower root: plugin: running: anonymous
Feb 22 08:58:36 Tower root: plugin: skipping: /boot/config/plugins/file.activity/file.activity.cfg already exists
Feb 22 08:58:36 Tower root: plugin: running: anonymous
Feb 22 08:58:51 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'start'
Feb 22 08:58:51 Tower file.activity: Starting File Activity
Feb 22 09:00:51 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'update'
Feb 22 09:00:51 Tower file.activity: Stopping File Activity
Feb 22 09:00:51 Tower file.activity: File Activity is not running
Feb 22 09:00:57 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'update'
Feb 22 09:00:57 Tower file.activity: Stopping File Activity
Feb 22 09:00:57 Tower file.activity: File Activity is not running
Feb 22 09:00:57 Tower file.activity: Starting File Activity
Feb 22 09:01:04 Tower php: /usr/local/emhttp/plugins/file.activity/scripts/rc.file.activity 'start'
Feb 22 09:01:04 Tower file.activity: Starting File Activity

 

 

Go to a command line and run this command:

/usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity

See if you get any errors.  If it looks like the program is hanging, then it is running.  Ctrl-C to stop the program.  Let me know the results.

Share this post


Link to post

root@Tower:~# /usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity
/usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity: line 38: inotifywait: command not found

 

Share this post


Link to post
3 minutes ago, bakes82 said:

root@Tower:~# /usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity
/usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity: line 38: inotifywait: command not found

 

 

Ok. Now I know the problem. I'll have to set the full path.

Share this post


Link to post
18 minutes ago, dlandon said:

 

Ok. Now I know the problem. I'll have to set the full path.

 

Update and try again.  2017.02.22b.

Share this post


Link to post


Tower login: root
Linux 4.4.30-unRAID.
Last login: Wed Feb 22 17:56:32 -0500 2017 on /dev/pts/1 from 192.168.0.34.
root@Tower:~# /usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity
/usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity: line 41: /usr/bin/inotifywait: No such file or directory
 

Share this post


Link to post
1 minute ago, bakes82 said:


Tower login: root
Linux 4.4.30-unRAID.
Last login: Wed Feb 22 17:56:32 -0500 2017 on /dev/pts/1 from 192.168.0.34.
root@Tower:~# /usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity
/usr/local/emhttp/plugins/file.activity/scripts/inotify.file.activity: line 41: /usr/bin/inotifywait: No such file or directory
 

 

Go to a command line and enter:

whereis inotifywait

 

it looks like you are missing inotifywait.

Share this post


Link to post

Its just empty.  I would assume your plugin would install everything it needs to work.

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