[Techtalk] incrontab

Sarah Newman newmans at sonic.net
Thu Nov 5 01:40:58 UTC 2015

We needed to recursively watch directories that didn't exist when the process started. This didn't work with incrontab, so I switched to a custom
script using python-inotify. I can testify it gets the job done.

Also, as of a year ago incrontab crashed periodically on centos 6.

On 11/04/2015 05:32 PM, Bonnie King wrote:
> inotify is cool. But to be honest, I've had little but frustration in
> implementing anything with it. Your use cases aren't mine, though.
> I did a quick presentation on inotify once, here are the slides:
> https://github.com/misterbonnie/presentations/blob/master/fermi_lug/inotify.pdf
> You might have better luck with some of the other inotify-related tools
> (inotifywait, inotifywatch, lsync, the Python library) since incrontab
> appears to be limited.
> On Wed, Nov 4, 2015 at 5:00 PM, Miriam English <mim at miriam-english.org>
> wrote:
>> Hi Meryll,
>> This sounded interesting so I looked on the net to see what I could find.
>> The website seems to have changed its name a couple of times a few years
>> ago and then disappeared. It may be somewhere else on the net, but I found
>> a copy of the original site on the Internet Archive at:
>> https://web.archive.org/web/20130602173705/http://inotify.aiken.cz/?section=inotify&page=about&lang=en
>> The software now seems to exist solely on github at:
>> https://github.com/ar-/incron
>> Googling for "inotify cron system" or "incron" found some pages, but not a
>> lot.
>> One thing you might be interested in is "watcher" another program that is
>> similar in aim, but with the added ability to recursively watch
>> directories. It uses python and its setup file does take comments.
>> http://www.splitbrain.org/blog/2011-01/07-watcher_a_recursive_incron_alternative
>> The writer of that article, Andreas Gohr, forked watcher to remove
>> dependency on YAML and simplify it.
>> original watcher by Greggory Hernandez:
>> https://github.com/gregghz/Watcher
>> fork by Andreas Gohr
>> https://github.com/splitbrain/Watcher
>> Cheers,
>>         - Miriam
>> On 05/11/15 04:12, Meryll Larkin wrote:
>>> I-notify cron  aka inode cron  aka incron  is a fairly newish program
>>> available on/for most Linux distros (I think) with kernels  2.6.13 or more
>>> recent.
>>> I'm using it  to replace something that disappeared a long time ago
>>> called a
>>> sesme scheduler - of course every script/configuration on the replacement
>>> FTP/SFTP server is going to be refactored... its only 300 accounts.
>>> I'm curious if anyone has had any experiences with incrontab as I've run
>>> into some unexpected behavior and I haven't found good documentation on
>>> the
>>> web - BTW, if you DO find good documentation on the web, please point me
>>> to
>>> it.
>>> incrontab is supposed to be similar to cron except that file-events
>>> trigger
>>> the items listed rather than clock time.  I've gotten it working on my
>>> server (yay!) so this isn't about troubleshooting as much as it is about
>>> me
>>> wanting to hear from other people about technique ideas.
>>> For example, unlike crontab, the incrontab file does not accept comment
>>> lines (!).  This is problematic because I won't be the maintainer (I've
>>> given notice), and the folks who will be maintaining it are "a little
>>> light"
>>> in their Linux skills, and lazy about reading documentation.  Before I
>>> dish
>>> the company up a piece of well-deserved karma, I still have to be me ..
>>> and
>>> I'm a little OCD about leaving stuff the best way possible.  I would
>>> create
>>> a script a wrapper for this (with an alias in /root/.bashrc) , but I've
>>> got
>>> a limited amount of time and 300 accounts to configure.  Any ideas?
>>> My OS is RedHat Enterprise 6.7  and I see absolutely NOTHING related to
>>> incron in /var/log/syslog (doesn't exist on RHE) and NOTHING in
>>> /var/log/messages.  I do see some logging in /var/log/cron  but I would
>>> like
>>> to give incrontab its own dedicated log.  In the process of getting it to
>>> work initially, I wrote my own logger which I could put into /var/log and
>>> then arrange for log rotation, but is there an easier way?
>>> I think I am going to need to run incrontab as root because much of what I
>>> need to do with it is copying data files from one home directory to
>>> another
>>> and then changing ownership.  Unless anyone has a suggestion that might be
>>> more secure?
>>> Finally, if anyone has any really cool incrontab examples, I'd love to
>>> hear
>>> about/see them.
>>> thanks all,
>>> Meryll Larkin
>>> _______________________________________________
>>> Techtalk mailing list
>>> Techtalk at linuxchix.org
>>> http://mailman.linuxchix.org/mailman/listinfo/techtalk
>> --
>> If you don't have any failures then you're not trying hard enough.
>>  - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
>> -----
>> Website: http://miriam-english.org
>> Blogs:   http://miriam-e.dreamwidth.org
>>          http://miriam-e.livejournal.com
>> _______________________________________________
>> Techtalk mailing list
>> Techtalk at linuxchix.org
>> http://mailman.linuxchix.org/mailman/listinfo/techtalk

More information about the Techtalk mailing list