This is a discussion on Real time log analysis and action within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Is there a program that can constantly monitor a log file (i.e. /var/log/messages) and take action in real time ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Is there a program that can constantly monitor a log file (i.e. /var/log/messages) and take action in real time when a certain action is logged? I know I can run a script that runs every minute as a cron job but I want something even more responsive than that, like on the order of 3-5 seconds. |
| |||
| Johnny Kim schrieb: > Is there a program that can constantly monitor a log file (i.e. > /var/log/messages) and take action in real time when a certain action is > logged? > > I know I can run a script that runs every minute as a cron job but I want > something even more responsive than that, like on the order of 3-5 > seconds. You can convince syslog to pipe selected messages to a command. syslog.conf Regards, Dorian |
| |||
| >> I know I can run a script that runs every minute as a cron job but I want >> something even more responsive than that, like on the order of 3-5 >> seconds. > You can convince syslog to pipe selected messages to a command. > syslog.conf > Regards, > Dorian Note when piping to `mail` IF for some reason your ISP calls you screaming MAIL BOMB DOS !! you might have a fast connection on the server and decided 24 hours earlier you would like to .forward syslog messages by mail to your private/home ISP. Changes are your file system is full heheh ] Bas Keur ] `Energizer Bunny arrested, charged with battery` |
| |||
| In article <pan.2005.02.02.12.41.55.533921@sneakemail.com>, Johnny Kim <bhhie8u02@sneakemail.com> wrote: >Is there a program that can constantly monitor a log file (i.e. >/var/log/messages) and take action in real time when a certain action is >logged? > >I know I can run a script that runs every minute as a cron job but I want >something even more responsive than that, like on the order of 3-5 >seconds. http://swatch.sourceforge.net/ -- Plus ca change, plus c'est la meme chose. |
| ||||
| Johnny Kim wrote: > Is there a program that can constantly monitor a log file (i.e. > /var/log/messages) and take action in real time when a certain action > is logged? > > I know I can run a script that runs every minute as a cron job but I > want something even more responsive than that, like on the order of > 3-5 seconds. I don't really know anything about scripting or programming, but most languages seem to have a sleep function, and there is /bin/sleep too. -- marko [dot] vihoma [at] dnainternet [dot] net Keskustelua zombeista c.u.b.freebsd.misc: Thanks, parents were stuck and had to be killed. |