
On Sun, Jul 15, 2018 at 04:33:46PM +1000, russell@coker.com.au wrote:
What's a good real-time log watching program?
This is something I've wanted for a while but not had the inclination to get it going. [...]
Any suggestions?
Perl's File::Tail module is made for this. It shouldn't take more than 10 or 15 lines of mostly boilerplate code to monitor the kernel log and reload the modules when it sees the xhci errors. Alternatively, if you're already running fail2ban, you can use it to monitor the kernel log, and create a custom action to unload and reload xhci. BTW, long before fail2ban existed, I implemented a very primitive version of what it does using perl + File::Tail. craig PS: xhci shouldn't be dying like that. Restarting it is just a work-around hack - you really ought to find out what the real problem is and fix it. -- craig sanders <cas@taz.net.au>