加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

监视,扩展和索引Linux文件系统

发布时间:2020-12-14 02:31:43 所属栏目:Linux 来源:网络整理
导读:我想在 Linux系统上捕获以下操作.是否有可能有效地这样做?我的最终目标是提供审计和另外一组索引不同的文件系统元数据.如果答案是“不”,我理解指向有用的方向. 1) open(),and its parameters (where flags is O_CREAT)2) write(),along with its parameter
我想在 Linux系统上捕获以下操作.是否有可能有效地这样做?我的最终目标是提供审计和另外一组索引不同的文件系统元数据.如果答案是“不”,我理解指向有用的方向.
1) open(),and its parameters (where flags is O_CREAT)
2) write(),along with its parameters,*buf,and the struct file for fd,including f_pos
3) the corresponding information in 2 for a memory-mapped write to a file. I realize I'm asking something very difficult here as it requires an incestuous knowledge between the layers. Setting a flag that memory-mapped IO to a given open file has occurred is good enough,similar to how O_DIRECT writes might be handled. (triggering a later re-scan).
4) rename(),unlink()
5) mkdir(),rmdir()
6) truncate(),ftruncate()

如果有竞争技术来捕获这些类型的操作,我最感兴趣的是那些持续时间最长(最稳定和社区支持)的文件,以及那些文件系统最少的文件(reiser4插件很令人兴奋,但不是似乎在政治上可行).

虽然我的列表1-6仅仅是示例,但关于我忘记的内容的想法是有帮助的.但我并不是想要全面,只是传达我的设计目标.

例如,将此数据传递给用户空间将允许保留实时locate / updatedb索引.它将允许数据库跟踪每个块和每个文件的MD5.此数据的可用性可以促进快照.

解决方法

你想使用incrond.从联机帮助页:
The inotify cron daemon (incrond) is a daemon which monitors filesystem
   events and executes commands defined in system and  user  tables.  It’s
   use is generally similar to cron(8).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读