On Wed, Apr 24, 2013 at 1:13 AM, Roberto De Ioris <[email protected]> wrote:

>
> > Hi all,
> >
> > I'm using the @filemon decorator in uWSGI 1.2 to monitor a card reader
>
> _______________________________________________
> >
>
> You cannot monitor pseudo-filesystems with inotify (it is a kernel limit,
> not uWSGI limit).
>
> The right approach (in my mind :P) is using an udev rule attached to
> /sys/kernel/wiegand/read. This rule triggers a script in which you can
> touch a file (not very elegant) or directly raise a signal in uWSGI
> calling
>
> uwsgi --signal 127.0.0.1:3031,1
>
> (it will invoke signal 1 on instance 127.0.0.1:3031)
>
> Obviously we can write a plugin using libudev directly in uWSGI, if you
> want to invest money just drop me a mail ;)
>

Thanks very much for the confirmation that I can't monitor sysfs with
inotify.

I looked at udev rules; it appears that udev rules will only trigger on
events where a device is created or removed, not merely changed. This is
confirmed (I think) by using udevadm to listen for change events and seeing
nothing. I *do* think that the libudev approach could work, but in the
short term at least, I don't have the resources to pay for a plugin, though
I appreciate the offer.

In the meantime, I will just use the ugly hack of a Python script that
polls sysfs and touches a normal file. If I can find the time, I will write
a libudev-based plugin myself and share it with you, but it's not so likely
at present.

Thanks,
Brandon
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to