最智能的方式来实时监控日志文件? [英] Smartest way to monitor log-files in realtime?

查看:125
本文介绍了最智能的方式来实时监控日志文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个实时监控应用程序,它将来自日志文件的信息存储到一个gridview中。 +他们可以进一步处理我的应用程序中的其他功能/功能。



我在我的服务器上运行一个应用程序,它在奇怪的时间创建日志文件。 (csv格式)

这些文件有时最多可以有100mbs。我并不总是希望扫描/检查整个文件,因为我知道新的参数将始终添加到文件底部。



我应该如何构建更新函数(在我的实时监控应用程序中)?


  • 我应该比较文件大小,文件大小已更改? - >检查/更新

  • 我应该每隔1分钟检查一次文件吗?

  • 我应该检查日期修改吗?


    顺便说一下,全面扫描非常耗时,只需扫描新条目就可以减少这项工作吗?

    所以我的问题是:什么是解决这个问题的最好方法?!

    解决方案

    我使用baretail。它可以不断更新,只要您的日志中包含有意义的语句,就可以轻松跟踪正在发生的更改。


    I need to write a realtime monitoring application, which stores information from log-files into a gridview. + that they can be process further from other features/functions in my application.

    I've running a Application on my server, which creates entries into a logfile at odd times. (csv-formatted)
    These files can sometimes have up to 100mbs. I don't always want to scan/examine the whole file, because I know that new etries will always be added to the bottom of the file.

    How should I construct the update-function (in my realtime monitoring application)?

    • Should I compare the filesize, and if the filesize has changed? -> examine/update
    • Should I examine the files every 1minute?
    • Should I check for "Date-modified"?

    By the way, a full scan is time-consuming, can this be reduced by only scanning for new entries?

    So my question is: What is the best way to solve it?!

    解决方案

    I use baretail. It works well constantly updating, and as long as your logs have meaningful statements in them, you can easily track the changes that are occurring.

    这篇关于最智能的方式来实时监控日志文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆