On 07/12/2015 05:24 PM, Natu wrote: > On 07/12/2015 01:52 PM, E.B. wrote: >>>> pyinotify uses the Linux kernel's inotify system calls. polling >>>> actually causes fail2ban to sleep and check the file's mtime >>>> periodically, iirc. >>> It's a matter of efficiency, mostly CPU usage. polling is the most >>> primitive and requires the process to wake up frequently to check >>> weather the log file has changed. So the process runs even if the log >>> file has not changed. The only reason to use polling is if you are >>> using an older OS that doesn't support the others. Gamin is somewhat >>> better, I don't personally know the exact details, but pyinotify is the >>> most efficient, cause your telling the kernel to wake up the process >>> automatically when the file changes, so it doesn't have to run until >>> something get's written to the log file. >> THIS is the kind of answer I was looking for! THANK YOU! >> However, I think you missed that Gamin uses inotify so >> not differeent than pyinotify excetp in implementation. > > I am willing to have some trust that the developers and some people in > the community know what they are doing. pyinotify is presumably a newer > implementation and seems to be preferred over gamin.
Appreciated...check git blame for that commit that changed the `auto` order :) > >> Besides having another daemon (rsyslog) in middle, do you know >> the scheme used for the systemd backend? Does it also poll >> or use some type of notify method? >> >> > > I don't know off hand, but newer implementations tend to be interrupt > driven and don't use polling. You could look at the source code. > Otherwise the developers would know. You could try both and note the > CPU usage of your fail2ban process/threads. You could also compare the > response times of the different interfaces by noting the date/time when > the message was logged and then compare that to the fail2ban log telling > what time the banning occured. > > Natu > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Fail2ban-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/fail2ban-users > ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Fail2ban-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fail2ban-users
