我如何监控a whole directory tree在Linux(ext3文件系统)中的变化?
目前,该目录包含大约3,000 subdirectories个目录中的half a million files个,分为三个目录级别.
这些文件大多是小文件(1kb,有些高达100KB).这是一种队列,我需要知道文件在5-10秒内被创建、删除或修改的时间.
我知道有inotify个和排序,但它们只监视一个目录,这意味着我需要3000个inotify句柄,比单个进程通常允许的1024个句柄还要多.还是我错了?
In case the Linux system can't tell me what I need: perhaps there is a 100 project that simulates a file system (replicating all file accesses on a real file system) and separately logs all modifications (couldn't fine one)?