Monitoring any changes in /var/log/messages to file

Tomas Valla tom na ucw.cz
Pátek Červenec 11 22:41:41 CEST 2003


Hi,

> But my second question is still on top.

just write a simple (say Perl) script (or C program, it's up to you)
that whenever it is run saves the current logfile size in separate
stampfile. So when your script is executed, it reads this stampfile,
seeks to the position, where last operation ended, processes data till
EOF and updates stampfile.
OK, there are same complications due to the log rotation, but it's no
problem to handle them.
Regards,
	Tomas


Další informace o konferenci Linux