Change watch-dir frequency/interval?

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Headcase_Fargone
Posts: 17
Joined: Fri Nov 06, 2009 1:39 pm

Change watch-dir frequency/interval?

Post by Headcase_Fargone »

Title says it all. I've searched and I've searched and haven't found a way to do this. Right now it appears watch-dir has Transmission checking that directory every few seconds. I'd like to set it to once every 15 minutes, maybe even an hour. Is this doable?
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Change watch-dir frequency/interval?

Post by rb07 »

No.

It is hard-coded (#define WATCHDIR_POLL_INTERVAL_SECS 10).
killemov
Posts: 573
Joined: Sat Jul 31, 2010 5:04 pm

Re: Change watch-dir frequency/interval?

Post by killemov »

On Linux/Unix systems it is usually done by putting an event-trigger on the file system itself. Any change of a file or dir should trigger an event that is handled by the application. Is the hardcoded stuff only meant for Windows?

Oh, and @Headcase_Fargone: Don't crosspost and continue here: Option to change watch-dir interval
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Change watch-dir frequency/interval?

Post by rb07 »

killemov wrote:On Linux/Unix systems it is usually done by putting an event-trigger on the file system itself. Any change of a file or dir should trigger an event that is handled by the application. Is the hardcoded stuff only meant for Windows?
Wrong, in Linux you need a kernel version equal or newer than 2.6.13 AND to enable inotify on that kernel; he obviously doesn't have met those conditions and therefore is watching his daemon poll. On Unix... there are too many versions to generalize. As for Windows very few people use Transmission on Windows, much less the daemon, so your comment is just an uninformed guess.
Oh, and @Headcase_Fargone: Don't crosspost and continue here: Option to change watch-dir interval
He is not cross-posting, he asked here, then made a request for enhancement in the correct forum.
Headcase_Fargone
Posts: 17
Joined: Fri Nov 06, 2009 1:39 pm

Re: Change watch-dir frequency/interval?

Post by Headcase_Fargone »

I'm very new to Linux so inotify is a new one to me. I'll do some reading on it. Do I need to do anything specific to get Transmission set up to use it?
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Change watch-dir frequency/interval?

Post by rb07 »

Headcase_Fargone wrote:Do I need to do anything specific to get Transmission set up to use it?
Not really, its auto-configured (i.e. the configure script is supposed to be able to tell if you have it), but in any case there is a configure parameter:

Code: Select all

  --with-inotify          Enable inotify support (default=auto)
More interesting is looking if your kernel does have it (and configure didn't detect it). In that case you could try with the configure parameter.

Is your kernel recent? try:

Code: Select all

uname -a
and see what's the version that comes out... as I said, it has to be 2.6.13 or newer (current is .34 or .35 if it already came out), if it is recent it usually has inotify enabled by default, so not having it would be strange. If you build your own kernel you can look at the .config file and just see if it has it enabled, for instance:

Code: Select all

$ grep -i inotify /usr/src/linux/.config
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
On a different approach, if you are building transmission then why not just change the fixed value to something else? Is just a simple edit of daemon/watch.c, put 3600 instead of 10, and you have your polling every hour.
hippy dave
Posts: 133
Joined: Tue Mar 13, 2007 6:34 pm

Re: Change watch-dir frequency/interval?

Post by hippy dave »

out of curiosity, does the os x version use timed polling or file system notification? cheers.
Post Reply